@databricks/sdk-uc-externallocations 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.
- package/LICENSE +203 -0
- package/dist/v1/client.d.ts +41 -0
- package/dist/v1/client.d.ts.map +1 -0
- package/dist/v1/client.js +221 -0
- package/dist/v1/client.js.map +1 -0
- package/dist/v1/index.d.ts +4 -0
- package/dist/v1/index.d.ts.map +1 -0
- package/dist/v1/index.js +4 -0
- package/dist/v1/index.js.map +1 -0
- package/dist/v1/model.d.ts +304 -0
- package/dist/v1/model.d.ts.map +1 -0
- package/dist/v1/model.js +381 -0
- package/dist/v1/model.js.map +1 -0
- package/dist/v1/transport.d.ts +5 -0
- package/dist/v1/transport.d.ts.map +1 -0
- package/dist/v1/transport.js +57 -0
- package/dist/v1/transport.js.map +1 -0
- package/dist/v1/utils.d.ts +22 -0
- package/dist/v1/utils.d.ts.map +1 -0
- package/dist/v1/utils.js +113 -0
- package/dist/v1/utils.js.map +1 -0
- package/package.json +38 -4
- package/src/v1/client.ts +287 -0
- package/src/v1/index.ts +22 -0
- package/src/v1/model.ts +687 -0
- package/src/v1/transport.ts +73 -0
- package/src/v1/utils.ts +156 -0
- package/README.md +0 -1
- package/index.js +0 -1
package/src/v1/model.ts
ADDED
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import {z} from 'zod';
|
|
4
|
+
|
|
5
|
+
export enum IsolationMode {
|
|
6
|
+
ISOLATION_MODE_UNSPECIFIED = 'ISOLATION_MODE_UNSPECIFIED',
|
|
7
|
+
ISOLATION_MODE_OPEN = 'ISOLATION_MODE_OPEN',
|
|
8
|
+
ISOLATION_MODE_ISOLATED = 'ISOLATION_MODE_ISOLATED',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export enum SseEncryptionAlgorithm {
|
|
12
|
+
SSE_ENCRYPTION_ALGORITHM_UNSPECIFIED = 'SSE_ENCRYPTION_ALGORITHM_UNSPECIFIED',
|
|
13
|
+
AWS_SSE_S3 = 'AWS_SSE_S3',
|
|
14
|
+
AWS_SSE_KMS = 'AWS_SSE_KMS',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface AwsSqsQueue {
|
|
18
|
+
/**
|
|
19
|
+
* The AQS queue url in the format https://sqs.{region}.amazonaws.com/{account id}/{queue name}.
|
|
20
|
+
* Only required for provided_sqs.
|
|
21
|
+
*/
|
|
22
|
+
queueUrl?: string | undefined;
|
|
23
|
+
/** Unique identifier included in the name of file events managed cloud resources. */
|
|
24
|
+
managedResourceId?: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface AzureQueueStorage {
|
|
28
|
+
/**
|
|
29
|
+
* The AQS queue url in the format https://{storage account}.queue.core.windows.net/{queue name}
|
|
30
|
+
* Only required for provided_aqs.
|
|
31
|
+
*/
|
|
32
|
+
queueUrl?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Optional subscription id for the queue, event grid subscription, and external location storage
|
|
35
|
+
* account.
|
|
36
|
+
* Required for locations with a service principal storage credential
|
|
37
|
+
*/
|
|
38
|
+
subscriptionId?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Optional resource group for the queue, event grid subscription, and external location storage
|
|
41
|
+
* account.
|
|
42
|
+
* Only required for locations with a service principal storage credential
|
|
43
|
+
*/
|
|
44
|
+
resourceGroup?: string | undefined;
|
|
45
|
+
/** Unique identifier included in the name of file events managed cloud resources. */
|
|
46
|
+
managedResourceId?: string | undefined;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface CreateExternalLocationRequest {
|
|
50
|
+
/** Skips validation of the storage credential associated with the external location. */
|
|
51
|
+
skipValidation?: boolean | undefined;
|
|
52
|
+
/** Name of the external location. */
|
|
53
|
+
name?: string | undefined;
|
|
54
|
+
/** Path URL of the external location. */
|
|
55
|
+
url?: string | undefined;
|
|
56
|
+
/** Name of the storage credential used with this location. */
|
|
57
|
+
credentialName?: string | undefined;
|
|
58
|
+
/** Indicates whether the external location is read-only. */
|
|
59
|
+
readOnly?: boolean | undefined;
|
|
60
|
+
/** User-provided free-form text description. */
|
|
61
|
+
comment?: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Whether to enable file events on this external location. Default to `true`. Set to `false` to disable file events.
|
|
64
|
+
* The actual applied value may differ due to server-side defaults; check `effective_enable_file_events` for the effective state.
|
|
65
|
+
*/
|
|
66
|
+
enableFileEvents?: boolean | undefined;
|
|
67
|
+
/** File event queue settings. If `enable_file_events` is not `false`, must be defined and have exactly one of the documented properties. */
|
|
68
|
+
fileEventQueue?: FileEventQueue | undefined;
|
|
69
|
+
/** The owner of the external location. */
|
|
70
|
+
owner?: string | undefined;
|
|
71
|
+
encryptionDetails?: EncryptionDetails | undefined;
|
|
72
|
+
/** Unique identifier of metastore hosting the external location. */
|
|
73
|
+
metastoreId?: string | undefined;
|
|
74
|
+
/** Unique ID of the location's storage credential. */
|
|
75
|
+
credentialId?: string | undefined;
|
|
76
|
+
/** Time at which this external location was created, in epoch milliseconds. */
|
|
77
|
+
createdAt?: bigint | undefined;
|
|
78
|
+
/** Username of external location creator. */
|
|
79
|
+
createdBy?: string | undefined;
|
|
80
|
+
/** Time at which external location this was last modified, in epoch milliseconds. */
|
|
81
|
+
updatedAt?: bigint | undefined;
|
|
82
|
+
/** Username of user who last modified the external location. */
|
|
83
|
+
updatedBy?: string | undefined;
|
|
84
|
+
/** Indicates whether the principal is limited to retrieving metadata for the associated object through the BROWSE privilege when include_browse is enabled in the request. */
|
|
85
|
+
browseOnly?: boolean | undefined;
|
|
86
|
+
isolationMode?: IsolationMode | undefined;
|
|
87
|
+
/** Indicates whether fallback mode is enabled for this external location. When fallback mode is enabled, the access to the location falls back to cluster credentials if UC credentials are not sufficient. */
|
|
88
|
+
fallback?: boolean | undefined;
|
|
89
|
+
/** The effective value of `enable_file_events` after applying server-side defaults. */
|
|
90
|
+
effectiveEnableFileEvents?: boolean | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* The effective file event queue configuration after applying server-side defaults.
|
|
93
|
+
* Always populated when a queue is provisioned, regardless of whether the user explicitly
|
|
94
|
+
* set `enable_file_events`. Use this field instead of `file_event_queue` for reading
|
|
95
|
+
* the actual queue state.
|
|
96
|
+
*/
|
|
97
|
+
effectiveFileEventQueue?: FileEventQueue | undefined;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface DeleteExternalLocationRequest {
|
|
101
|
+
/** Name of the external location. */
|
|
102
|
+
nameArg?: string | undefined;
|
|
103
|
+
/** Force deletion even if there are dependent external tables or mounts. */
|
|
104
|
+
force?: boolean | undefined;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
|
|
108
|
+
export interface DeleteExternalLocationRequest_Response {}
|
|
109
|
+
|
|
110
|
+
/** Encryption options that apply to clients connecting to cloud storage. */
|
|
111
|
+
export interface EncryptionDetails {
|
|
112
|
+
encryptionDetailsType?:
|
|
113
|
+
| {
|
|
114
|
+
$case: 'sseEncryptionDetails';
|
|
115
|
+
/** Server-Side Encryption properties for clients communicating with AWS s3. */
|
|
116
|
+
sseEncryptionDetails: SseEncryptionDetails;
|
|
117
|
+
}
|
|
118
|
+
| undefined;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface ExternalLocationInfo {
|
|
122
|
+
/** Name of the external location. */
|
|
123
|
+
name?: string | undefined;
|
|
124
|
+
/** Path URL of the external location. */
|
|
125
|
+
url?: string | undefined;
|
|
126
|
+
/** Name of the storage credential used with this location. */
|
|
127
|
+
credentialName?: string | undefined;
|
|
128
|
+
/** Indicates whether the external location is read-only. */
|
|
129
|
+
readOnly?: boolean | undefined;
|
|
130
|
+
/** User-provided free-form text description. */
|
|
131
|
+
comment?: string | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* Whether to enable file events on this external location. Default to `true`. Set to `false` to disable file events.
|
|
134
|
+
* The actual applied value may differ due to server-side defaults; check `effective_enable_file_events` for the effective state.
|
|
135
|
+
*/
|
|
136
|
+
enableFileEvents?: boolean | undefined;
|
|
137
|
+
/** File event queue settings. If `enable_file_events` is not `false`, must be defined and have exactly one of the documented properties. */
|
|
138
|
+
fileEventQueue?: FileEventQueue | undefined;
|
|
139
|
+
/** The owner of the external location. */
|
|
140
|
+
owner?: string | undefined;
|
|
141
|
+
encryptionDetails?: EncryptionDetails | undefined;
|
|
142
|
+
/** Unique identifier of metastore hosting the external location. */
|
|
143
|
+
metastoreId?: string | undefined;
|
|
144
|
+
/** Unique ID of the location's storage credential. */
|
|
145
|
+
credentialId?: string | undefined;
|
|
146
|
+
/** Time at which this external location was created, in epoch milliseconds. */
|
|
147
|
+
createdAt?: bigint | undefined;
|
|
148
|
+
/** Username of external location creator. */
|
|
149
|
+
createdBy?: string | undefined;
|
|
150
|
+
/** Time at which external location this was last modified, in epoch milliseconds. */
|
|
151
|
+
updatedAt?: bigint | undefined;
|
|
152
|
+
/** Username of user who last modified the external location. */
|
|
153
|
+
updatedBy?: string | undefined;
|
|
154
|
+
/** Indicates whether the principal is limited to retrieving metadata for the associated object through the BROWSE privilege when include_browse is enabled in the request. */
|
|
155
|
+
browseOnly?: boolean | undefined;
|
|
156
|
+
isolationMode?: IsolationMode | undefined;
|
|
157
|
+
/** Indicates whether fallback mode is enabled for this external location. When fallback mode is enabled, the access to the location falls back to cluster credentials if UC credentials are not sufficient. */
|
|
158
|
+
fallback?: boolean | undefined;
|
|
159
|
+
/** The effective value of `enable_file_events` after applying server-side defaults. */
|
|
160
|
+
effectiveEnableFileEvents?: boolean | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* The effective file event queue configuration after applying server-side defaults.
|
|
163
|
+
* Always populated when a queue is provisioned, regardless of whether the user explicitly
|
|
164
|
+
* set `enable_file_events`. Use this field instead of `file_event_queue` for reading
|
|
165
|
+
* the actual queue state.
|
|
166
|
+
*/
|
|
167
|
+
effectiveFileEventQueue?: FileEventQueue | undefined;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface FileEventQueue {
|
|
171
|
+
provided?:
|
|
172
|
+
| {$case: 'providedAqs'; providedAqs: AzureQueueStorage}
|
|
173
|
+
| {$case: 'providedSqs'; providedSqs: AwsSqsQueue}
|
|
174
|
+
| {$case: 'providedPubsub'; providedPubsub: GcpPubsub}
|
|
175
|
+
| undefined;
|
|
176
|
+
managed?:
|
|
177
|
+
| {$case: 'managedAqs'; managedAqs: AzureQueueStorage}
|
|
178
|
+
| {$case: 'managedSqs'; managedSqs: AwsSqsQueue}
|
|
179
|
+
| {$case: 'managedPubsub'; managedPubsub: GcpPubsub}
|
|
180
|
+
| undefined;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface GcpPubsub {
|
|
184
|
+
/**
|
|
185
|
+
* The Pub/Sub subscription name in the format projects/{project}/subscriptions/{subscription name}.
|
|
186
|
+
* Only required for provided_pubsub.
|
|
187
|
+
*/
|
|
188
|
+
subscriptionName?: string | undefined;
|
|
189
|
+
/** Unique identifier included in the name of file events managed cloud resources. */
|
|
190
|
+
managedResourceId?: string | undefined;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface GetExternalLocationRequest {
|
|
194
|
+
/** Name of the external location. */
|
|
195
|
+
nameArg?: string | undefined;
|
|
196
|
+
/** Whether to include external locations in the response for which the principal can only access selective metadata for */
|
|
197
|
+
includeBrowse?: boolean | undefined;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface ListExternalLocationsRequest {
|
|
201
|
+
/** Whether to include external locations in the response for which the principal can only access selective metadata for */
|
|
202
|
+
includeBrowse?: boolean | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* Maximum number of external locations to return.
|
|
205
|
+
* If not set, all the external locations are returned (not recommended).
|
|
206
|
+
* - when set to a value greater than 0, the page length is the minimum of this value and a server configured value;
|
|
207
|
+
* - when set to 0, the page length is set to a server configured value (recommended);
|
|
208
|
+
* - when set to a value less than 0, an invalid parameter error is returned;
|
|
209
|
+
*/
|
|
210
|
+
maxResults?: number | undefined;
|
|
211
|
+
/** Opaque pagination token to go to next page based on previous query. */
|
|
212
|
+
pageToken?: string | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Whether to include external locations not bound to the workspace.
|
|
215
|
+
* Effective only if the user has permission to update the location–workspace binding.
|
|
216
|
+
*/
|
|
217
|
+
includeUnbound?: boolean | undefined;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
221
|
+
export interface ListExternalLocationsRequest_Response {
|
|
222
|
+
/** An array of external locations. */
|
|
223
|
+
externalLocations?: ExternalLocationInfo[] | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* Opaque token to retrieve the next page of results. Absent if there are no more pages.
|
|
226
|
+
* __page_token__ should be set to this value for the next request (for the next page of results).
|
|
227
|
+
*/
|
|
228
|
+
nextPageToken?: string | undefined;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Server-Side Encryption properties for clients communicating with AWS s3. */
|
|
232
|
+
export interface SseEncryptionDetails {
|
|
233
|
+
/** Sets the value of the 'x-amz-server-side-encryption' header in S3 request. */
|
|
234
|
+
algorithm?: SseEncryptionAlgorithm | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* Optional. The ARN of the SSE-KMS key used with the S3 location, when algorithm = "SSE-KMS".
|
|
237
|
+
* Sets the value of the 'x-amz-server-side-encryption-aws-kms-key-id' header.
|
|
238
|
+
*/
|
|
239
|
+
awsKmsKeyArn?: string | undefined;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface UpdateExternalLocationRequest {
|
|
243
|
+
/** Name of the external location. */
|
|
244
|
+
nameArg?: string | undefined;
|
|
245
|
+
/** New name for the external location. */
|
|
246
|
+
newName?: string | undefined;
|
|
247
|
+
/** Force update even if changing url invalidates dependent external tables or mounts. */
|
|
248
|
+
force?: boolean | undefined;
|
|
249
|
+
/** Skips validation of the storage credential associated with the external location. */
|
|
250
|
+
skipValidation?: boolean | undefined;
|
|
251
|
+
/** Name of the external location. */
|
|
252
|
+
name?: string | undefined;
|
|
253
|
+
/** Path URL of the external location. */
|
|
254
|
+
url?: string | undefined;
|
|
255
|
+
/** Name of the storage credential used with this location. */
|
|
256
|
+
credentialName?: string | undefined;
|
|
257
|
+
/** Indicates whether the external location is read-only. */
|
|
258
|
+
readOnly?: boolean | undefined;
|
|
259
|
+
/** User-provided free-form text description. */
|
|
260
|
+
comment?: string | undefined;
|
|
261
|
+
/**
|
|
262
|
+
* Whether to enable file events on this external location. Default to `true`. Set to `false` to disable file events.
|
|
263
|
+
* The actual applied value may differ due to server-side defaults; check `effective_enable_file_events` for the effective state.
|
|
264
|
+
*/
|
|
265
|
+
enableFileEvents?: boolean | undefined;
|
|
266
|
+
/** File event queue settings. If `enable_file_events` is not `false`, must be defined and have exactly one of the documented properties. */
|
|
267
|
+
fileEventQueue?: FileEventQueue | undefined;
|
|
268
|
+
/** The owner of the external location. */
|
|
269
|
+
owner?: string | undefined;
|
|
270
|
+
encryptionDetails?: EncryptionDetails | undefined;
|
|
271
|
+
/** Unique identifier of metastore hosting the external location. */
|
|
272
|
+
metastoreId?: string | undefined;
|
|
273
|
+
/** Unique ID of the location's storage credential. */
|
|
274
|
+
credentialId?: string | undefined;
|
|
275
|
+
/** Time at which this external location was created, in epoch milliseconds. */
|
|
276
|
+
createdAt?: bigint | undefined;
|
|
277
|
+
/** Username of external location creator. */
|
|
278
|
+
createdBy?: string | undefined;
|
|
279
|
+
/** Time at which external location this was last modified, in epoch milliseconds. */
|
|
280
|
+
updatedAt?: bigint | undefined;
|
|
281
|
+
/** Username of user who last modified the external location. */
|
|
282
|
+
updatedBy?: string | undefined;
|
|
283
|
+
/** Indicates whether the principal is limited to retrieving metadata for the associated object through the BROWSE privilege when include_browse is enabled in the request. */
|
|
284
|
+
browseOnly?: boolean | undefined;
|
|
285
|
+
isolationMode?: IsolationMode | undefined;
|
|
286
|
+
/** Indicates whether fallback mode is enabled for this external location. When fallback mode is enabled, the access to the location falls back to cluster credentials if UC credentials are not sufficient. */
|
|
287
|
+
fallback?: boolean | undefined;
|
|
288
|
+
/** The effective value of `enable_file_events` after applying server-side defaults. */
|
|
289
|
+
effectiveEnableFileEvents?: boolean | undefined;
|
|
290
|
+
/**
|
|
291
|
+
* The effective file event queue configuration after applying server-side defaults.
|
|
292
|
+
* Always populated when a queue is provisioned, regardless of whether the user explicitly
|
|
293
|
+
* set `enable_file_events`. Use this field instead of `file_event_queue` for reading
|
|
294
|
+
* the actual queue state.
|
|
295
|
+
*/
|
|
296
|
+
effectiveFileEventQueue?: FileEventQueue | undefined;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export const unmarshalAwsSqsQueueSchema: z.ZodType<AwsSqsQueue> = z
|
|
300
|
+
.object({
|
|
301
|
+
queue_url: z.string().optional(),
|
|
302
|
+
managed_resource_id: z.string().optional(),
|
|
303
|
+
})
|
|
304
|
+
.transform(d => ({
|
|
305
|
+
queueUrl: d.queue_url,
|
|
306
|
+
managedResourceId: d.managed_resource_id,
|
|
307
|
+
}));
|
|
308
|
+
|
|
309
|
+
export const unmarshalAzureQueueStorageSchema: z.ZodType<AzureQueueStorage> = z
|
|
310
|
+
.object({
|
|
311
|
+
queue_url: z.string().optional(),
|
|
312
|
+
subscription_id: z.string().optional(),
|
|
313
|
+
resource_group: z.string().optional(),
|
|
314
|
+
managed_resource_id: z.string().optional(),
|
|
315
|
+
})
|
|
316
|
+
.transform(d => ({
|
|
317
|
+
queueUrl: d.queue_url,
|
|
318
|
+
subscriptionId: d.subscription_id,
|
|
319
|
+
resourceGroup: d.resource_group,
|
|
320
|
+
managedResourceId: d.managed_resource_id,
|
|
321
|
+
}));
|
|
322
|
+
|
|
323
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
324
|
+
export const unmarshalDeleteExternalLocationRequest_ResponseSchema: z.ZodType<DeleteExternalLocationRequest_Response> =
|
|
325
|
+
z.object({});
|
|
326
|
+
|
|
327
|
+
export const unmarshalEncryptionDetailsSchema: z.ZodType<EncryptionDetails> = z
|
|
328
|
+
.object({
|
|
329
|
+
sse_encryption_details: z
|
|
330
|
+
.lazy(() => unmarshalSseEncryptionDetailsSchema)
|
|
331
|
+
.optional(),
|
|
332
|
+
})
|
|
333
|
+
.transform(d => ({
|
|
334
|
+
encryptionDetailsType:
|
|
335
|
+
d.sse_encryption_details !== undefined
|
|
336
|
+
? {
|
|
337
|
+
$case: 'sseEncryptionDetails' as const,
|
|
338
|
+
sseEncryptionDetails: d.sse_encryption_details,
|
|
339
|
+
}
|
|
340
|
+
: undefined,
|
|
341
|
+
}));
|
|
342
|
+
|
|
343
|
+
export const unmarshalExternalLocationInfoSchema: z.ZodType<ExternalLocationInfo> =
|
|
344
|
+
z
|
|
345
|
+
.object({
|
|
346
|
+
name: z.string().optional(),
|
|
347
|
+
url: z.string().optional(),
|
|
348
|
+
credential_name: z.string().optional(),
|
|
349
|
+
read_only: z.boolean().optional(),
|
|
350
|
+
comment: z.string().optional(),
|
|
351
|
+
enable_file_events: z.boolean().optional(),
|
|
352
|
+
file_event_queue: z.lazy(() => unmarshalFileEventQueueSchema).optional(),
|
|
353
|
+
owner: z.string().optional(),
|
|
354
|
+
encryption_details: z
|
|
355
|
+
.lazy(() => unmarshalEncryptionDetailsSchema)
|
|
356
|
+
.optional(),
|
|
357
|
+
metastore_id: z.string().optional(),
|
|
358
|
+
credential_id: z.string().optional(),
|
|
359
|
+
created_at: z
|
|
360
|
+
.union([z.number(), z.bigint()])
|
|
361
|
+
.transform(v => BigInt(v))
|
|
362
|
+
.optional(),
|
|
363
|
+
created_by: z.string().optional(),
|
|
364
|
+
updated_at: z
|
|
365
|
+
.union([z.number(), z.bigint()])
|
|
366
|
+
.transform(v => BigInt(v))
|
|
367
|
+
.optional(),
|
|
368
|
+
updated_by: z.string().optional(),
|
|
369
|
+
browse_only: z.boolean().optional(),
|
|
370
|
+
isolation_mode: z.enum(IsolationMode).optional(),
|
|
371
|
+
fallback: z.boolean().optional(),
|
|
372
|
+
effective_enable_file_events: z.boolean().optional(),
|
|
373
|
+
effective_file_event_queue: z
|
|
374
|
+
.lazy(() => unmarshalFileEventQueueSchema)
|
|
375
|
+
.optional(),
|
|
376
|
+
})
|
|
377
|
+
.transform(d => ({
|
|
378
|
+
name: d.name,
|
|
379
|
+
url: d.url,
|
|
380
|
+
credentialName: d.credential_name,
|
|
381
|
+
readOnly: d.read_only,
|
|
382
|
+
comment: d.comment,
|
|
383
|
+
enableFileEvents: d.enable_file_events,
|
|
384
|
+
fileEventQueue: d.file_event_queue,
|
|
385
|
+
owner: d.owner,
|
|
386
|
+
encryptionDetails: d.encryption_details,
|
|
387
|
+
metastoreId: d.metastore_id,
|
|
388
|
+
credentialId: d.credential_id,
|
|
389
|
+
createdAt: d.created_at,
|
|
390
|
+
createdBy: d.created_by,
|
|
391
|
+
updatedAt: d.updated_at,
|
|
392
|
+
updatedBy: d.updated_by,
|
|
393
|
+
browseOnly: d.browse_only,
|
|
394
|
+
isolationMode: d.isolation_mode,
|
|
395
|
+
fallback: d.fallback,
|
|
396
|
+
effectiveEnableFileEvents: d.effective_enable_file_events,
|
|
397
|
+
effectiveFileEventQueue: d.effective_file_event_queue,
|
|
398
|
+
}));
|
|
399
|
+
|
|
400
|
+
export const unmarshalFileEventQueueSchema: z.ZodType<FileEventQueue> = z
|
|
401
|
+
.object({
|
|
402
|
+
provided_aqs: z.lazy(() => unmarshalAzureQueueStorageSchema).optional(),
|
|
403
|
+
provided_sqs: z.lazy(() => unmarshalAwsSqsQueueSchema).optional(),
|
|
404
|
+
provided_pubsub: z.lazy(() => unmarshalGcpPubsubSchema).optional(),
|
|
405
|
+
managed_aqs: z.lazy(() => unmarshalAzureQueueStorageSchema).optional(),
|
|
406
|
+
managed_sqs: z.lazy(() => unmarshalAwsSqsQueueSchema).optional(),
|
|
407
|
+
managed_pubsub: z.lazy(() => unmarshalGcpPubsubSchema).optional(),
|
|
408
|
+
})
|
|
409
|
+
.transform(d => ({
|
|
410
|
+
provided:
|
|
411
|
+
d.provided_aqs !== undefined
|
|
412
|
+
? {$case: 'providedAqs' as const, providedAqs: d.provided_aqs}
|
|
413
|
+
: d.provided_sqs !== undefined
|
|
414
|
+
? {$case: 'providedSqs' as const, providedSqs: d.provided_sqs}
|
|
415
|
+
: d.provided_pubsub !== undefined
|
|
416
|
+
? {
|
|
417
|
+
$case: 'providedPubsub' as const,
|
|
418
|
+
providedPubsub: d.provided_pubsub,
|
|
419
|
+
}
|
|
420
|
+
: undefined,
|
|
421
|
+
managed:
|
|
422
|
+
d.managed_aqs !== undefined
|
|
423
|
+
? {$case: 'managedAqs' as const, managedAqs: d.managed_aqs}
|
|
424
|
+
: d.managed_sqs !== undefined
|
|
425
|
+
? {$case: 'managedSqs' as const, managedSqs: d.managed_sqs}
|
|
426
|
+
: d.managed_pubsub !== undefined
|
|
427
|
+
? {$case: 'managedPubsub' as const, managedPubsub: d.managed_pubsub}
|
|
428
|
+
: undefined,
|
|
429
|
+
}));
|
|
430
|
+
|
|
431
|
+
export const unmarshalGcpPubsubSchema: z.ZodType<GcpPubsub> = z
|
|
432
|
+
.object({
|
|
433
|
+
subscription_name: z.string().optional(),
|
|
434
|
+
managed_resource_id: z.string().optional(),
|
|
435
|
+
})
|
|
436
|
+
.transform(d => ({
|
|
437
|
+
subscriptionName: d.subscription_name,
|
|
438
|
+
managedResourceId: d.managed_resource_id,
|
|
439
|
+
}));
|
|
440
|
+
|
|
441
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
442
|
+
export const unmarshalListExternalLocationsRequest_ResponseSchema: z.ZodType<ListExternalLocationsRequest_Response> =
|
|
443
|
+
z
|
|
444
|
+
.object({
|
|
445
|
+
external_locations: z
|
|
446
|
+
.array(z.lazy(() => unmarshalExternalLocationInfoSchema))
|
|
447
|
+
.optional(),
|
|
448
|
+
next_page_token: z.string().optional(),
|
|
449
|
+
})
|
|
450
|
+
.transform(d => ({
|
|
451
|
+
externalLocations: d.external_locations,
|
|
452
|
+
nextPageToken: d.next_page_token,
|
|
453
|
+
}));
|
|
454
|
+
|
|
455
|
+
export const unmarshalSseEncryptionDetailsSchema: z.ZodType<SseEncryptionDetails> =
|
|
456
|
+
z
|
|
457
|
+
.object({
|
|
458
|
+
algorithm: z.enum(SseEncryptionAlgorithm).optional(),
|
|
459
|
+
aws_kms_key_arn: z.string().optional(),
|
|
460
|
+
})
|
|
461
|
+
.transform(d => ({
|
|
462
|
+
algorithm: d.algorithm,
|
|
463
|
+
awsKmsKeyArn: d.aws_kms_key_arn,
|
|
464
|
+
}));
|
|
465
|
+
|
|
466
|
+
export const marshalAwsSqsQueueSchema: z.ZodType = z
|
|
467
|
+
.object({
|
|
468
|
+
queueUrl: z.string().optional(),
|
|
469
|
+
managedResourceId: z.string().optional(),
|
|
470
|
+
})
|
|
471
|
+
.transform(d => ({
|
|
472
|
+
queue_url: d.queueUrl,
|
|
473
|
+
managed_resource_id: d.managedResourceId,
|
|
474
|
+
}));
|
|
475
|
+
|
|
476
|
+
export const marshalAzureQueueStorageSchema: z.ZodType = z
|
|
477
|
+
.object({
|
|
478
|
+
queueUrl: z.string().optional(),
|
|
479
|
+
subscriptionId: z.string().optional(),
|
|
480
|
+
resourceGroup: z.string().optional(),
|
|
481
|
+
managedResourceId: z.string().optional(),
|
|
482
|
+
})
|
|
483
|
+
.transform(d => ({
|
|
484
|
+
queue_url: d.queueUrl,
|
|
485
|
+
subscription_id: d.subscriptionId,
|
|
486
|
+
resource_group: d.resourceGroup,
|
|
487
|
+
managed_resource_id: d.managedResourceId,
|
|
488
|
+
}));
|
|
489
|
+
|
|
490
|
+
export const marshalCreateExternalLocationRequestSchema: z.ZodType = z
|
|
491
|
+
.object({
|
|
492
|
+
skipValidation: z.boolean().optional(),
|
|
493
|
+
name: z.string().optional(),
|
|
494
|
+
url: z.string().optional(),
|
|
495
|
+
credentialName: z.string().optional(),
|
|
496
|
+
readOnly: z.boolean().optional(),
|
|
497
|
+
comment: z.string().optional(),
|
|
498
|
+
enableFileEvents: z.boolean().optional(),
|
|
499
|
+
fileEventQueue: z.lazy(() => marshalFileEventQueueSchema).optional(),
|
|
500
|
+
owner: z.string().optional(),
|
|
501
|
+
encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(),
|
|
502
|
+
metastoreId: z.string().optional(),
|
|
503
|
+
credentialId: z.string().optional(),
|
|
504
|
+
createdAt: z.bigint().optional(),
|
|
505
|
+
createdBy: z.string().optional(),
|
|
506
|
+
updatedAt: z.bigint().optional(),
|
|
507
|
+
updatedBy: z.string().optional(),
|
|
508
|
+
browseOnly: z.boolean().optional(),
|
|
509
|
+
isolationMode: z.enum(IsolationMode).optional(),
|
|
510
|
+
fallback: z.boolean().optional(),
|
|
511
|
+
effectiveEnableFileEvents: z.boolean().optional(),
|
|
512
|
+
effectiveFileEventQueue: z
|
|
513
|
+
.lazy(() => marshalFileEventQueueSchema)
|
|
514
|
+
.optional(),
|
|
515
|
+
})
|
|
516
|
+
.transform(d => ({
|
|
517
|
+
skip_validation: d.skipValidation,
|
|
518
|
+
name: d.name,
|
|
519
|
+
url: d.url,
|
|
520
|
+
credential_name: d.credentialName,
|
|
521
|
+
read_only: d.readOnly,
|
|
522
|
+
comment: d.comment,
|
|
523
|
+
enable_file_events: d.enableFileEvents,
|
|
524
|
+
file_event_queue: d.fileEventQueue,
|
|
525
|
+
owner: d.owner,
|
|
526
|
+
encryption_details: d.encryptionDetails,
|
|
527
|
+
metastore_id: d.metastoreId,
|
|
528
|
+
credential_id: d.credentialId,
|
|
529
|
+
created_at: d.createdAt,
|
|
530
|
+
created_by: d.createdBy,
|
|
531
|
+
updated_at: d.updatedAt,
|
|
532
|
+
updated_by: d.updatedBy,
|
|
533
|
+
browse_only: d.browseOnly,
|
|
534
|
+
isolation_mode: d.isolationMode,
|
|
535
|
+
fallback: d.fallback,
|
|
536
|
+
effective_enable_file_events: d.effectiveEnableFileEvents,
|
|
537
|
+
effective_file_event_queue: d.effectiveFileEventQueue,
|
|
538
|
+
}));
|
|
539
|
+
|
|
540
|
+
export const marshalEncryptionDetailsSchema: z.ZodType = z
|
|
541
|
+
.object({
|
|
542
|
+
encryptionDetailsType: z
|
|
543
|
+
.discriminatedUnion('$case', [
|
|
544
|
+
z.object({
|
|
545
|
+
$case: z.literal('sseEncryptionDetails'),
|
|
546
|
+
sseEncryptionDetails: z.lazy(() => marshalSseEncryptionDetailsSchema),
|
|
547
|
+
}),
|
|
548
|
+
])
|
|
549
|
+
.optional(),
|
|
550
|
+
})
|
|
551
|
+
.transform(d => ({
|
|
552
|
+
...(d.encryptionDetailsType?.$case === 'sseEncryptionDetails' && {
|
|
553
|
+
sse_encryption_details: d.encryptionDetailsType.sseEncryptionDetails,
|
|
554
|
+
}),
|
|
555
|
+
}));
|
|
556
|
+
|
|
557
|
+
export const marshalFileEventQueueSchema: z.ZodType = z
|
|
558
|
+
.object({
|
|
559
|
+
provided: z
|
|
560
|
+
.discriminatedUnion('$case', [
|
|
561
|
+
z.object({
|
|
562
|
+
$case: z.literal('providedAqs'),
|
|
563
|
+
providedAqs: z.lazy(() => marshalAzureQueueStorageSchema),
|
|
564
|
+
}),
|
|
565
|
+
z.object({
|
|
566
|
+
$case: z.literal('providedSqs'),
|
|
567
|
+
providedSqs: z.lazy(() => marshalAwsSqsQueueSchema),
|
|
568
|
+
}),
|
|
569
|
+
z.object({
|
|
570
|
+
$case: z.literal('providedPubsub'),
|
|
571
|
+
providedPubsub: z.lazy(() => marshalGcpPubsubSchema),
|
|
572
|
+
}),
|
|
573
|
+
])
|
|
574
|
+
.optional(),
|
|
575
|
+
managed: z
|
|
576
|
+
.discriminatedUnion('$case', [
|
|
577
|
+
z.object({
|
|
578
|
+
$case: z.literal('managedAqs'),
|
|
579
|
+
managedAqs: z.lazy(() => marshalAzureQueueStorageSchema),
|
|
580
|
+
}),
|
|
581
|
+
z.object({
|
|
582
|
+
$case: z.literal('managedSqs'),
|
|
583
|
+
managedSqs: z.lazy(() => marshalAwsSqsQueueSchema),
|
|
584
|
+
}),
|
|
585
|
+
z.object({
|
|
586
|
+
$case: z.literal('managedPubsub'),
|
|
587
|
+
managedPubsub: z.lazy(() => marshalGcpPubsubSchema),
|
|
588
|
+
}),
|
|
589
|
+
])
|
|
590
|
+
.optional(),
|
|
591
|
+
})
|
|
592
|
+
.transform(d => ({
|
|
593
|
+
...(d.provided?.$case === 'providedAqs' && {
|
|
594
|
+
provided_aqs: d.provided.providedAqs,
|
|
595
|
+
}),
|
|
596
|
+
...(d.provided?.$case === 'providedSqs' && {
|
|
597
|
+
provided_sqs: d.provided.providedSqs,
|
|
598
|
+
}),
|
|
599
|
+
...(d.provided?.$case === 'providedPubsub' && {
|
|
600
|
+
provided_pubsub: d.provided.providedPubsub,
|
|
601
|
+
}),
|
|
602
|
+
...(d.managed?.$case === 'managedAqs' && {
|
|
603
|
+
managed_aqs: d.managed.managedAqs,
|
|
604
|
+
}),
|
|
605
|
+
...(d.managed?.$case === 'managedSqs' && {
|
|
606
|
+
managed_sqs: d.managed.managedSqs,
|
|
607
|
+
}),
|
|
608
|
+
...(d.managed?.$case === 'managedPubsub' && {
|
|
609
|
+
managed_pubsub: d.managed.managedPubsub,
|
|
610
|
+
}),
|
|
611
|
+
}));
|
|
612
|
+
|
|
613
|
+
export const marshalGcpPubsubSchema: z.ZodType = z
|
|
614
|
+
.object({
|
|
615
|
+
subscriptionName: z.string().optional(),
|
|
616
|
+
managedResourceId: z.string().optional(),
|
|
617
|
+
})
|
|
618
|
+
.transform(d => ({
|
|
619
|
+
subscription_name: d.subscriptionName,
|
|
620
|
+
managed_resource_id: d.managedResourceId,
|
|
621
|
+
}));
|
|
622
|
+
|
|
623
|
+
export const marshalSseEncryptionDetailsSchema: z.ZodType = z
|
|
624
|
+
.object({
|
|
625
|
+
algorithm: z.enum(SseEncryptionAlgorithm).optional(),
|
|
626
|
+
awsKmsKeyArn: z.string().optional(),
|
|
627
|
+
})
|
|
628
|
+
.transform(d => ({
|
|
629
|
+
algorithm: d.algorithm,
|
|
630
|
+
aws_kms_key_arn: d.awsKmsKeyArn,
|
|
631
|
+
}));
|
|
632
|
+
|
|
633
|
+
export const marshalUpdateExternalLocationRequestSchema: z.ZodType = z
|
|
634
|
+
.object({
|
|
635
|
+
nameArg: z.string().optional(),
|
|
636
|
+
newName: z.string().optional(),
|
|
637
|
+
force: z.boolean().optional(),
|
|
638
|
+
skipValidation: z.boolean().optional(),
|
|
639
|
+
name: z.string().optional(),
|
|
640
|
+
url: z.string().optional(),
|
|
641
|
+
credentialName: z.string().optional(),
|
|
642
|
+
readOnly: z.boolean().optional(),
|
|
643
|
+
comment: z.string().optional(),
|
|
644
|
+
enableFileEvents: z.boolean().optional(),
|
|
645
|
+
fileEventQueue: z.lazy(() => marshalFileEventQueueSchema).optional(),
|
|
646
|
+
owner: z.string().optional(),
|
|
647
|
+
encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(),
|
|
648
|
+
metastoreId: z.string().optional(),
|
|
649
|
+
credentialId: z.string().optional(),
|
|
650
|
+
createdAt: z.bigint().optional(),
|
|
651
|
+
createdBy: z.string().optional(),
|
|
652
|
+
updatedAt: z.bigint().optional(),
|
|
653
|
+
updatedBy: z.string().optional(),
|
|
654
|
+
browseOnly: z.boolean().optional(),
|
|
655
|
+
isolationMode: z.enum(IsolationMode).optional(),
|
|
656
|
+
fallback: z.boolean().optional(),
|
|
657
|
+
effectiveEnableFileEvents: z.boolean().optional(),
|
|
658
|
+
effectiveFileEventQueue: z
|
|
659
|
+
.lazy(() => marshalFileEventQueueSchema)
|
|
660
|
+
.optional(),
|
|
661
|
+
})
|
|
662
|
+
.transform(d => ({
|
|
663
|
+
name_arg: d.nameArg,
|
|
664
|
+
new_name: d.newName,
|
|
665
|
+
force: d.force,
|
|
666
|
+
skip_validation: d.skipValidation,
|
|
667
|
+
name: d.name,
|
|
668
|
+
url: d.url,
|
|
669
|
+
credential_name: d.credentialName,
|
|
670
|
+
read_only: d.readOnly,
|
|
671
|
+
comment: d.comment,
|
|
672
|
+
enable_file_events: d.enableFileEvents,
|
|
673
|
+
file_event_queue: d.fileEventQueue,
|
|
674
|
+
owner: d.owner,
|
|
675
|
+
encryption_details: d.encryptionDetails,
|
|
676
|
+
metastore_id: d.metastoreId,
|
|
677
|
+
credential_id: d.credentialId,
|
|
678
|
+
created_at: d.createdAt,
|
|
679
|
+
created_by: d.createdBy,
|
|
680
|
+
updated_at: d.updatedAt,
|
|
681
|
+
updated_by: d.updatedBy,
|
|
682
|
+
browse_only: d.browseOnly,
|
|
683
|
+
isolation_mode: d.isolationMode,
|
|
684
|
+
fallback: d.fallback,
|
|
685
|
+
effective_enable_file_events: d.effectiveEnableFileEvents,
|
|
686
|
+
effective_file_event_queue: d.effectiveFileEventQueue,
|
|
687
|
+
}));
|