@databricks/sdk-pipelines 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,2955 @@
1
+ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
+ import { z } from 'zod';
3
+ /** Enum to specify which mode of clone to execute */
4
+ export var CloneMode;
5
+ (function (CloneMode) {
6
+ /** Data and metadata are copied */
7
+ CloneMode["MIGRATE_TO_UC"] = "MIGRATE_TO_UC";
8
+ })(CloneMode || (CloneMode = {}));
9
+ /**
10
+ * For certain database sources LakeFlow Connect offers both query based and cdc
11
+ * ingestion, ConnectorType can bse used to convey the type of ingestion.
12
+ * If connection_name is provided for database sources, we default to Query Based ingestion
13
+ */
14
+ export var ConnectorType;
15
+ (function (ConnectorType) {
16
+ ConnectorType["CONNECTOR_TYPE_UNSPECIFIED"] = "CONNECTOR_TYPE_UNSPECIFIED";
17
+ /**
18
+ * If connector_type = CDC and ingestion_gateway_id is provided then we use Ingestion Gateway pipeline with
19
+ * Cdc Managed Ingestion Pipeline for ingestion, if connector_type = CDC and connection_name is provided
20
+ * then we use Combined Cdc Managed Ingestion Pipeline.
21
+ */
22
+ ConnectorType["CDC"] = "CDC";
23
+ ConnectorType["QUERY_BASED"] = "QUERY_BASED";
24
+ })(ConnectorType || (ConnectorType = {}));
25
+ /**
26
+ * Days of week in which the window is allowed to happen.
27
+ * If not specified all days of the week will be used.
28
+ */
29
+ export var DayOfWeek;
30
+ (function (DayOfWeek) {
31
+ DayOfWeek["DAY_OF_WEEK_UNSPECIFIED"] = "DAY_OF_WEEK_UNSPECIFIED";
32
+ DayOfWeek["MONDAY"] = "MONDAY";
33
+ DayOfWeek["TUESDAY"] = "TUESDAY";
34
+ DayOfWeek["WEDNESDAY"] = "WEDNESDAY";
35
+ DayOfWeek["THURSDAY"] = "THURSDAY";
36
+ DayOfWeek["FRIDAY"] = "FRIDAY";
37
+ DayOfWeek["SATURDAY"] = "SATURDAY";
38
+ DayOfWeek["SUNDAY"] = "SUNDAY";
39
+ })(DayOfWeek || (DayOfWeek = {}));
40
+ /**
41
+ * The deployment method that manages the pipeline:
42
+ * - BUNDLE: The pipeline is managed by a Databricks Asset Bundle.
43
+ */
44
+ export var DeploymentKind;
45
+ (function (DeploymentKind) {
46
+ /** Databricks Asset Bundle (DAB) */
47
+ DeploymentKind["BUNDLE"] = "BUNDLE";
48
+ })(DeploymentKind || (DeploymentKind = {}));
49
+ /** The severity level of the event. */
50
+ export var EventLevel;
51
+ (function (EventLevel) {
52
+ EventLevel["INFO"] = "INFO";
53
+ EventLevel["WARN"] = "WARN";
54
+ EventLevel["ERROR"] = "ERROR";
55
+ EventLevel["METRICS"] = "METRICS";
56
+ })(EventLevel || (EventLevel = {}));
57
+ export var IngestionSourceType;
58
+ (function (IngestionSourceType) {
59
+ IngestionSourceType["INGESTION_SOURCE_TYPE_UNSPECIFIED"] = "INGESTION_SOURCE_TYPE_UNSPECIFIED";
60
+ IngestionSourceType["MYSQL"] = "MYSQL";
61
+ IngestionSourceType["POSTGRESQL"] = "POSTGRESQL";
62
+ IngestionSourceType["SQLSERVER"] = "SQLSERVER";
63
+ IngestionSourceType["SALESFORCE"] = "SALESFORCE";
64
+ IngestionSourceType["BIGQUERY"] = "BIGQUERY";
65
+ IngestionSourceType["NETSUITE"] = "NETSUITE";
66
+ IngestionSourceType["WORKDAY_RAAS"] = "WORKDAY_RAAS";
67
+ IngestionSourceType["GA4_RAW_DATA"] = "GA4_RAW_DATA";
68
+ IngestionSourceType["SERVICENOW"] = "SERVICENOW";
69
+ IngestionSourceType["MANAGED_POSTGRESQL"] = "MANAGED_POSTGRESQL";
70
+ IngestionSourceType["ORACLE"] = "ORACLE";
71
+ IngestionSourceType["TERADATA"] = "TERADATA";
72
+ IngestionSourceType["SHAREPOINT"] = "SHAREPOINT";
73
+ IngestionSourceType["DYNAMICS365"] = "DYNAMICS365";
74
+ IngestionSourceType["GOOGLE_DRIVE"] = "GOOGLE_DRIVE";
75
+ IngestionSourceType["JIRA"] = "JIRA";
76
+ IngestionSourceType["CONFLUENCE"] = "CONFLUENCE";
77
+ IngestionSourceType["META_MARKETING"] = "META_MARKETING";
78
+ IngestionSourceType["ZENDESK"] = "ZENDESK";
79
+ IngestionSourceType["FOREIGN_CATALOG"] = "FOREIGN_CATALOG";
80
+ })(IngestionSourceType || (IngestionSourceType = {}));
81
+ /** Maturity level for EventDetails. */
82
+ export var MaturityLevel;
83
+ (function (MaturityLevel) {
84
+ MaturityLevel["STABLE"] = "STABLE";
85
+ MaturityLevel["EVOLVING"] = "EVOLVING";
86
+ MaturityLevel["DEPRECATED"] = "DEPRECATED";
87
+ })(MaturityLevel || (MaturityLevel = {}));
88
+ /** Attachment behavior mode for Outlook ingestion */
89
+ export var OutlookAttachmentMode;
90
+ (function (OutlookAttachmentMode) {
91
+ OutlookAttachmentMode["OUTLOOK_ATTACHMENT_MODE_UNSPECIFIED"] = "OUTLOOK_ATTACHMENT_MODE_UNSPECIFIED";
92
+ /** Ingest all attachments (both inline and non-inline) */
93
+ OutlookAttachmentMode["ALL"] = "ALL";
94
+ /** Ingest only non-inline attachments (recommended to avoid corporate signature images) */
95
+ OutlookAttachmentMode["NON_INLINE_ONLY"] = "NON_INLINE_ONLY";
96
+ /** Ingest only inline attachments */
97
+ OutlookAttachmentMode["INLINE_ONLY"] = "INLINE_ONLY";
98
+ /** Do not ingest any attachments */
99
+ OutlookAttachmentMode["NONE"] = "NONE";
100
+ })(OutlookAttachmentMode || (OutlookAttachmentMode = {}));
101
+ /** Body format for Outlook email content */
102
+ export var OutlookBodyFormat;
103
+ (function (OutlookBodyFormat) {
104
+ OutlookBodyFormat["OUTLOOK_BODY_FORMAT_UNSPECIFIED"] = "OUTLOOK_BODY_FORMAT_UNSPECIFIED";
105
+ OutlookBodyFormat["TEXT_HTML"] = "TEXT_HTML";
106
+ OutlookBodyFormat["TEXT_PLAIN"] = "TEXT_PLAIN";
107
+ })(OutlookBodyFormat || (OutlookBodyFormat = {}));
108
+ /** The health of a pipeline. */
109
+ export var PipelineHealthStatus;
110
+ (function (PipelineHealthStatus) {
111
+ PipelineHealthStatus["HEALTHY"] = "HEALTHY";
112
+ PipelineHealthStatus["UNHEALTHY"] = "UNHEALTHY";
113
+ })(PipelineHealthStatus || (PipelineHealthStatus = {}));
114
+ /** The set of AWS availability types supported when setting up nodes for a cluster. */
115
+ export var PipelinesAwsAvailability;
116
+ (function (PipelinesAwsAvailability) {
117
+ /** Use spot instances. */
118
+ PipelinesAwsAvailability["SPOT"] = "SPOT";
119
+ /** Use on-demand instances. */
120
+ PipelinesAwsAvailability["ON_DEMAND"] = "ON_DEMAND";
121
+ /**
122
+ * Preferably use spot instances, but fall back to on-demand instances if spot instances cannot
123
+ * be acquired (e.g., if AWS spot prices are too high).
124
+ */
125
+ PipelinesAwsAvailability["SPOT_WITH_FALLBACK"] = "SPOT_WITH_FALLBACK";
126
+ })(PipelinesAwsAvailability || (PipelinesAwsAvailability = {}));
127
+ /** The set of Azure availability types supported when setting up nodes for a cluster. */
128
+ export var PipelinesAzureAvailability;
129
+ (function (PipelinesAzureAvailability) {
130
+ /** Use spot instances. */
131
+ PipelinesAzureAvailability["SPOT_AZURE"] = "SPOT_AZURE";
132
+ /** Use on-demand instances. */
133
+ PipelinesAzureAvailability["ON_DEMAND_AZURE"] = "ON_DEMAND_AZURE";
134
+ /**
135
+ * Preferably use spot instances, but fall back to on-demand instances if spot instances cannot
136
+ * be acquired (e.g., if Azure is out of Quota).
137
+ */
138
+ PipelinesAzureAvailability["SPOT_WITH_FALLBACK_AZURE"] = "SPOT_WITH_FALLBACK_AZURE";
139
+ })(PipelinesAzureAvailability || (PipelinesAzureAvailability = {}));
140
+ /**
141
+ * All EBS volume types that <Databricks> supports.
142
+ * See https://aws.amazon.com/ebs/details/ for details.
143
+ */
144
+ export var PipelinesEbsVolumeType;
145
+ (function (PipelinesEbsVolumeType) {
146
+ /** Provision extra storage using AWS gp2 EBS volumes. */
147
+ PipelinesEbsVolumeType["GENERAL_PURPOSE_SSD"] = "GENERAL_PURPOSE_SSD";
148
+ /** Provision extra storage using AWS st1 volumes. */
149
+ PipelinesEbsVolumeType["THROUGHPUT_OPTIMIZED_HDD"] = "THROUGHPUT_OPTIMIZED_HDD";
150
+ })(PipelinesEbsVolumeType || (PipelinesEbsVolumeType = {}));
151
+ /** The set of GCP availability types supported when setting up nodes for a cluster (configurable only for executors). */
152
+ export var PipelinesGcpAvailability;
153
+ (function (PipelinesGcpAvailability) {
154
+ PipelinesGcpAvailability["PREEMPTIBLE_GCP"] = "PREEMPTIBLE_GCP";
155
+ PipelinesGcpAvailability["ON_DEMAND_GCP"] = "ON_DEMAND_GCP";
156
+ PipelinesGcpAvailability["PREEMPTIBLE_WITH_FALLBACK_GCP"] = "PREEMPTIBLE_WITH_FALLBACK_GCP";
157
+ })(PipelinesGcpAvailability || (PipelinesGcpAvailability = {}));
158
+ /** Enum representing the publishing mode of a pipeline. */
159
+ export var PublishingMode;
160
+ (function (PublishingMode) {
161
+ PublishingMode["PUBLISHING_MODE_UNSPECIFIED"] = "PUBLISHING_MODE_UNSPECIFIED";
162
+ PublishingMode["LEGACY_PUBLISHING_MODE"] = "LEGACY_PUBLISHING_MODE";
163
+ PublishingMode["DEFAULT_PUBLISHING_MODE"] = "DEFAULT_PUBLISHING_MODE";
164
+ })(PublishingMode || (PublishingMode = {}));
165
+ /** What triggered this update. */
166
+ export var UpdateCause;
167
+ (function (UpdateCause) {
168
+ /** Started through an API call. */
169
+ UpdateCause["API_CALL"] = "API_CALL";
170
+ /** Started as a retry for a failed update. */
171
+ UpdateCause["RETRY_ON_FAILURE"] = "RETRY_ON_FAILURE";
172
+ /** Started as a result of a service upgrade. */
173
+ UpdateCause["SERVICE_UPGRADE"] = "SERVICE_UPGRADE";
174
+ /** Started as a result of a schema change. */
175
+ UpdateCause["SCHEMA_CHANGE"] = "SCHEMA_CHANGE";
176
+ /** Started by the Jobs service. */
177
+ UpdateCause["JOB_TASK"] = "JOB_TASK";
178
+ /** Started by an action a user performed. */
179
+ UpdateCause["USER_ACTION"] = "USER_ACTION";
180
+ /** Started for infrastructure maintenance reason. */
181
+ UpdateCause["INFRASTRUCTURE_MAINTENANCE"] = "INFRASTRUCTURE_MAINTENANCE";
182
+ })(UpdateCause || (UpdateCause = {}));
183
+ /** The update state. */
184
+ export var UpdateState;
185
+ (function (UpdateState) {
186
+ /** Update is waiting for previous update to finish. */
187
+ UpdateState["QUEUED"] = "QUEUED";
188
+ /** Initial state of an update. */
189
+ UpdateState["CREATED"] = "CREATED";
190
+ /** Update is waiting for clusters, jobs, or other resources. */
191
+ UpdateState["WAITING_FOR_RESOURCES"] = "WAITING_FOR_RESOURCES";
192
+ /** Update is creating the dataflow graph. */
193
+ UpdateState["INITIALIZING"] = "INITIALIZING";
194
+ /** Update is resetting datasets and checkpoints to the beginning. */
195
+ UpdateState["RESETTING"] = "RESETTING";
196
+ /** If necessary, Update is creating tables or updating their schemas. */
197
+ UpdateState["SETTING_UP_TABLES"] = "SETTING_UP_TABLES";
198
+ /** Update is currently executing queries. */
199
+ UpdateState["RUNNING"] = "RUNNING";
200
+ /** Update is waiting for queries to shut down. */
201
+ UpdateState["STOPPING"] = "STOPPING";
202
+ /** Update is complete and all necessary resources are cleaned up. */
203
+ UpdateState["COMPLETED"] = "COMPLETED";
204
+ /** Update has run into an error that could not be recovered from. */
205
+ UpdateState["FAILED"] = "FAILED";
206
+ /** Update was canceled while it was running or queued. */
207
+ UpdateState["CANCELED"] = "CANCELED";
208
+ })(UpdateState || (UpdateState = {}));
209
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
210
+ export var FileIngestionOptions_FileFormat;
211
+ (function (FileIngestionOptions_FileFormat) {
212
+ FileIngestionOptions_FileFormat["FILE_FORMAT_UNSPECIFIED"] = "FILE_FORMAT_UNSPECIFIED";
213
+ FileIngestionOptions_FileFormat["BINARYFILE"] = "BINARYFILE";
214
+ FileIngestionOptions_FileFormat["JSON"] = "JSON";
215
+ FileIngestionOptions_FileFormat["CSV"] = "CSV";
216
+ FileIngestionOptions_FileFormat["XML"] = "XML";
217
+ FileIngestionOptions_FileFormat["EXCEL"] = "EXCEL";
218
+ FileIngestionOptions_FileFormat["PARQUET"] = "PARQUET";
219
+ FileIngestionOptions_FileFormat["AVRO"] = "AVRO";
220
+ FileIngestionOptions_FileFormat["ORC"] = "ORC";
221
+ })(FileIngestionOptions_FileFormat || (FileIngestionOptions_FileFormat = {}));
222
+ /** Based on https://docs.databricks.com/aws/en/ingestion/cloud-object-storage/auto-loader/schema#how-does-auto-loader-schema-evolution-work */
223
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
224
+ export var FileIngestionOptions_SchemaEvolutionMode;
225
+ (function (FileIngestionOptions_SchemaEvolutionMode) {
226
+ FileIngestionOptions_SchemaEvolutionMode["SCHEMA_EVOLUTION_MODE_UNSPECIFIED"] = "SCHEMA_EVOLUTION_MODE_UNSPECIFIED";
227
+ FileIngestionOptions_SchemaEvolutionMode["ADD_NEW_COLUMNS_WITH_TYPE_WIDENING"] = "ADD_NEW_COLUMNS_WITH_TYPE_WIDENING";
228
+ FileIngestionOptions_SchemaEvolutionMode["ADD_NEW_COLUMNS"] = "ADD_NEW_COLUMNS";
229
+ FileIngestionOptions_SchemaEvolutionMode["RESCUE"] = "RESCUE";
230
+ FileIngestionOptions_SchemaEvolutionMode["FAIL_ON_NEW_COLUMNS"] = "FAIL_ON_NEW_COLUMNS";
231
+ FileIngestionOptions_SchemaEvolutionMode["NONE"] = "NONE";
232
+ })(FileIngestionOptions_SchemaEvolutionMode || (FileIngestionOptions_SchemaEvolutionMode = {}));
233
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
234
+ export var GoogleDriveOptions_GoogleDriveEntityType;
235
+ (function (GoogleDriveOptions_GoogleDriveEntityType) {
236
+ GoogleDriveOptions_GoogleDriveEntityType["GOOGLE_DRIVE_ENTITY_TYPE_UNSPECIFIED"] = "GOOGLE_DRIVE_ENTITY_TYPE_UNSPECIFIED";
237
+ GoogleDriveOptions_GoogleDriveEntityType["FILE"] = "FILE";
238
+ GoogleDriveOptions_GoogleDriveEntityType["FILE_METADATA"] = "FILE_METADATA";
239
+ GoogleDriveOptions_GoogleDriveEntityType["PERMISSION"] = "PERMISSION";
240
+ })(GoogleDriveOptions_GoogleDriveEntityType || (GoogleDriveOptions_GoogleDriveEntityType = {}));
241
+ /** The pipeline state. */
242
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
243
+ export var PipelineState_PipelineState;
244
+ (function (PipelineState_PipelineState) {
245
+ /** Pipeline is being deployed and waiting for clusters, jobs, or other resources */
246
+ PipelineState_PipelineState["DEPLOYING"] = "DEPLOYING";
247
+ /** Pipeline is deployed but waiting for streams to start and make progress */
248
+ PipelineState_PipelineState["STARTING"] = "STARTING";
249
+ /** Pipeline is currently executing */
250
+ PipelineState_PipelineState["RUNNING"] = "RUNNING";
251
+ /** Pipeline is waiting for streams to shut down */
252
+ PipelineState_PipelineState["STOPPING"] = "STOPPING";
253
+ /** All clusters, jobs, and other resources associated with the pipeline have been cleaned up */
254
+ PipelineState_PipelineState["DELETED"] = "DELETED";
255
+ /** Pipeline has run into an error, but the daemon is attempting to fix it */
256
+ PipelineState_PipelineState["RECOVERING"] = "RECOVERING";
257
+ /** Pipeline has run into an error that could not be recovered from */
258
+ PipelineState_PipelineState["FAILED"] = "FAILED";
259
+ /** Pipeline is currently being reset */
260
+ PipelineState_PipelineState["RESETTING"] = "RESETTING";
261
+ /** Pipeline is stopped and is not processing data. Can be resumed by calling `run` */
262
+ PipelineState_PipelineState["IDLE"] = "IDLE";
263
+ })(PipelineState_PipelineState || (PipelineState_PipelineState = {}));
264
+ /** The SCD type to use to ingest the table. */
265
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
266
+ export var ScdType_ScdType;
267
+ (function (ScdType_ScdType) {
268
+ ScdType_ScdType["SCD_TYPE_UNSPECIFIED"] = "SCD_TYPE_UNSPECIFIED";
269
+ ScdType_ScdType["SCD_TYPE_1"] = "SCD_TYPE_1";
270
+ ScdType_ScdType["SCD_TYPE_2"] = "SCD_TYPE_2";
271
+ /**
272
+ * Source data will be appended to destination table rather than merged in
273
+ * the absence of row key.
274
+ */
275
+ ScdType_ScdType["APPEND_ONLY"] = "APPEND_ONLY";
276
+ })(ScdType_ScdType || (ScdType_ScdType = {}));
277
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
278
+ export var SharepointOptions_SharepointEntityType;
279
+ (function (SharepointOptions_SharepointEntityType) {
280
+ SharepointOptions_SharepointEntityType["SHAREPOINT_ENTITY_TYPE_UNSPECIFIED"] = "SHAREPOINT_ENTITY_TYPE_UNSPECIFIED";
281
+ SharepointOptions_SharepointEntityType["FILE"] = "FILE";
282
+ SharepointOptions_SharepointEntityType["FILE_METADATA"] = "FILE_METADATA";
283
+ SharepointOptions_SharepointEntityType["PERMISSION"] = "PERMISSION";
284
+ SharepointOptions_SharepointEntityType["LIST"] = "LIST";
285
+ })(SharepointOptions_SharepointEntityType || (SharepointOptions_SharepointEntityType = {}));
286
+ /** Data level for TikTok Ads report aggregation. */
287
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
288
+ export var TikTokAdsOptions_TikTokDataLevel;
289
+ (function (TikTokAdsOptions_TikTokDataLevel) {
290
+ TikTokAdsOptions_TikTokDataLevel["TIK_TOK_DATA_LEVEL_UNSPECIFIED"] = "TIK_TOK_DATA_LEVEL_UNSPECIFIED";
291
+ TikTokAdsOptions_TikTokDataLevel["AUCTION_ADVERTISER"] = "AUCTION_ADVERTISER";
292
+ TikTokAdsOptions_TikTokDataLevel["AUCTION_CAMPAIGN"] = "AUCTION_CAMPAIGN";
293
+ TikTokAdsOptions_TikTokDataLevel["AUCTION_ADGROUP"] = "AUCTION_ADGROUP";
294
+ TikTokAdsOptions_TikTokDataLevel["AUCTION_AD"] = "AUCTION_AD";
295
+ })(TikTokAdsOptions_TikTokDataLevel || (TikTokAdsOptions_TikTokDataLevel = {}));
296
+ /** Report type for TikTok Ads API. */
297
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
298
+ export var TikTokAdsOptions_TikTokReportType;
299
+ (function (TikTokAdsOptions_TikTokReportType) {
300
+ TikTokAdsOptions_TikTokReportType["TIK_TOK_REPORT_TYPE_UNSPECIFIED"] = "TIK_TOK_REPORT_TYPE_UNSPECIFIED";
301
+ TikTokAdsOptions_TikTokReportType["BASIC"] = "BASIC";
302
+ TikTokAdsOptions_TikTokReportType["AUDIENCE"] = "AUDIENCE";
303
+ TikTokAdsOptions_TikTokReportType["PLAYABLE_AD"] = "PLAYABLE_AD";
304
+ TikTokAdsOptions_TikTokReportType["DSA"] = "DSA";
305
+ TikTokAdsOptions_TikTokReportType["BUSINESS_CENTER"] = "BUSINESS_CENTER";
306
+ TikTokAdsOptions_TikTokReportType["GMV_MAX"] = "GMV_MAX";
307
+ })(TikTokAdsOptions_TikTokReportType || (TikTokAdsOptions_TikTokReportType = {}));
308
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
309
+ export var Transformer_Format;
310
+ (function (Transformer_Format) {
311
+ Transformer_Format["FORMAT_UNSPECIFIED"] = "FORMAT_UNSPECIFIED";
312
+ Transformer_Format["STRING"] = "STRING";
313
+ Transformer_Format["JSON"] = "JSON";
314
+ })(Transformer_Format || (Transformer_Format = {}));
315
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
316
+ export const unmarshalApplyEnvironmentRequest_ResponseSchema = z.object({});
317
+ export const unmarshalAutoFullRefreshPolicySchema = z
318
+ .object({
319
+ enabled: z.boolean().optional(),
320
+ min_interval_hours: z.number().optional(),
321
+ })
322
+ .transform(d => ({
323
+ enabled: d.enabled,
324
+ minIntervalHours: d.min_interval_hours,
325
+ }));
326
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
327
+ export const unmarshalClonePipelineRequest_ResponseSchema = z
328
+ .object({
329
+ pipeline_id: z.string().optional(),
330
+ })
331
+ .transform(d => ({
332
+ pipelineId: d.pipeline_id,
333
+ }));
334
+ export const unmarshalConfluenceConnectorOptionsSchema = z
335
+ .object({
336
+ include_confluence_spaces: z.array(z.string()).optional(),
337
+ })
338
+ .transform(d => ({
339
+ includeConfluenceSpaces: d.include_confluence_spaces,
340
+ }));
341
+ export const unmarshalConnectionParametersSchema = z
342
+ .object({
343
+ source_catalog: z.string().optional(),
344
+ })
345
+ .transform(d => ({
346
+ sourceCatalog: d.source_catalog,
347
+ }));
348
+ export const unmarshalConnectorOptionsSchema = z
349
+ .object({
350
+ google_ads_options: z
351
+ .lazy(() => unmarshalGoogleAdsOptionsSchema)
352
+ .optional(),
353
+ tiktok_ads_options: z
354
+ .lazy(() => unmarshalTikTokAdsOptionsSchema)
355
+ .optional(),
356
+ sharepoint_options: z
357
+ .lazy(() => unmarshalSharepointOptionsSchema)
358
+ .optional(),
359
+ gdrive_options: z.lazy(() => unmarshalGoogleDriveOptionsSchema).optional(),
360
+ outlook_options: z.lazy(() => unmarshalOutlookOptionsSchema).optional(),
361
+ smartsheet_options: z
362
+ .lazy(() => unmarshalSmartsheetOptionsSchema)
363
+ .optional(),
364
+ jira_options: z.lazy(() => unmarshalJiraConnectorOptionsSchema).optional(),
365
+ confluence_options: z
366
+ .lazy(() => unmarshalConfluenceConnectorOptionsSchema)
367
+ .optional(),
368
+ meta_ads_options: z
369
+ .lazy(() => unmarshalMetaMarketingOptionsSchema)
370
+ .optional(),
371
+ zendesk_support_options: z
372
+ .lazy(() => unmarshalZendeskSupportOptionsSchema)
373
+ .optional(),
374
+ kafka_options: z.lazy(() => unmarshalKafkaOptionsSchema).optional(),
375
+ })
376
+ .transform(d => ({
377
+ connectorOptions: d.google_ads_options !== undefined
378
+ ? {
379
+ $case: 'googleAdsOptions',
380
+ googleAdsOptions: d.google_ads_options,
381
+ }
382
+ : d.tiktok_ads_options !== undefined
383
+ ? {
384
+ $case: 'tiktokAdsOptions',
385
+ tiktokAdsOptions: d.tiktok_ads_options,
386
+ }
387
+ : d.sharepoint_options !== undefined
388
+ ? {
389
+ $case: 'sharepointOptions',
390
+ sharepointOptions: d.sharepoint_options,
391
+ }
392
+ : d.gdrive_options !== undefined
393
+ ? {
394
+ $case: 'gdriveOptions',
395
+ gdriveOptions: d.gdrive_options,
396
+ }
397
+ : d.outlook_options !== undefined
398
+ ? {
399
+ $case: 'outlookOptions',
400
+ outlookOptions: d.outlook_options,
401
+ }
402
+ : d.smartsheet_options !== undefined
403
+ ? {
404
+ $case: 'smartsheetOptions',
405
+ smartsheetOptions: d.smartsheet_options,
406
+ }
407
+ : d.jira_options !== undefined
408
+ ? {
409
+ $case: 'jiraOptions',
410
+ jiraOptions: d.jira_options,
411
+ }
412
+ : d.confluence_options !== undefined
413
+ ? {
414
+ $case: 'confluenceOptions',
415
+ confluenceOptions: d.confluence_options,
416
+ }
417
+ : d.meta_ads_options !== undefined
418
+ ? {
419
+ $case: 'metaAdsOptions',
420
+ metaAdsOptions: d.meta_ads_options,
421
+ }
422
+ : d.zendesk_support_options !== undefined
423
+ ? {
424
+ $case: 'zendeskSupportOptions',
425
+ zendeskSupportOptions: d.zendesk_support_options,
426
+ }
427
+ : d.kafka_options !== undefined
428
+ ? {
429
+ $case: 'kafkaOptions',
430
+ kafkaOptions: d.kafka_options,
431
+ }
432
+ : undefined,
433
+ }));
434
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
435
+ export const unmarshalCreatePipelineRequest_ResponseSchema = z
436
+ .object({
437
+ pipeline_id: z.string().optional(),
438
+ effective_settings: z.lazy(() => unmarshalPipelineSpecSchema).optional(),
439
+ })
440
+ .transform(d => ({
441
+ pipelineId: d.pipeline_id,
442
+ effectiveSettings: d.effective_settings,
443
+ }));
444
+ export const unmarshalCronTriggerSchema = z
445
+ .object({
446
+ quartz_cron_schedule: z.string().optional(),
447
+ timezone_id: z.string().optional(),
448
+ })
449
+ .transform(d => ({
450
+ quartzCronSchedule: d.quartz_cron_schedule,
451
+ timezoneId: d.timezone_id,
452
+ }));
453
+ export const unmarshalDataPlaneIdSchema = z
454
+ .object({
455
+ instance: z.string().optional(),
456
+ seq_no: z
457
+ .union([z.number(), z.bigint()])
458
+ .transform(v => BigInt(v))
459
+ .optional(),
460
+ })
461
+ .transform(d => ({
462
+ instance: d.instance,
463
+ seqNo: d.seq_no,
464
+ }));
465
+ export const unmarshalDataStagingOptionsSchema = z
466
+ .object({
467
+ catalog_name: z.string().optional(),
468
+ schema_name: z.string().optional(),
469
+ volume_name: z.string().optional(),
470
+ })
471
+ .transform(d => ({
472
+ catalogName: d.catalog_name,
473
+ schemaName: d.schema_name,
474
+ volumeName: d.volume_name,
475
+ }));
476
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
477
+ export const unmarshalDeletePipelineRequest_ResponseSchema = z.object({});
478
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
479
+ export const unmarshalEditPipelineRequest_ResponseSchema = z.object({});
480
+ export const unmarshalErrorDetailSchema = z
481
+ .object({
482
+ exceptions: z
483
+ .array(z.lazy(() => unmarshalSerializedExceptionSchema))
484
+ .optional(),
485
+ fatal: z.boolean().optional(),
486
+ })
487
+ .transform(d => ({
488
+ exceptions: d.exceptions,
489
+ fatal: d.fatal,
490
+ }));
491
+ export const unmarshalEventLogSpecSchema = z
492
+ .object({
493
+ name: z.string().optional(),
494
+ schema: z.string().optional(),
495
+ catalog: z.string().optional(),
496
+ })
497
+ .transform(d => ({
498
+ name: d.name,
499
+ schema: d.schema,
500
+ catalog: d.catalog,
501
+ }));
502
+ export const unmarshalFileFilterSchema = z
503
+ .object({
504
+ path_filter: z.string().optional(),
505
+ modified_before: z.string().optional(),
506
+ modified_after: z.string().optional(),
507
+ })
508
+ .transform(d => ({
509
+ filter: d.path_filter !== undefined
510
+ ? { $case: 'pathFilter', pathFilter: d.path_filter }
511
+ : d.modified_before !== undefined
512
+ ? {
513
+ $case: 'modifiedBefore',
514
+ modifiedBefore: d.modified_before,
515
+ }
516
+ : d.modified_after !== undefined
517
+ ? { $case: 'modifiedAfter', modifiedAfter: d.modified_after }
518
+ : undefined,
519
+ }));
520
+ export const unmarshalFileIngestionOptionsSchema = z
521
+ .object({
522
+ format: z.enum(FileIngestionOptions_FileFormat).optional(),
523
+ file_filters: z.array(z.lazy(() => unmarshalFileFilterSchema)).optional(),
524
+ infer_column_types: z.boolean().optional(),
525
+ schema_evolution_mode: z
526
+ .enum(FileIngestionOptions_SchemaEvolutionMode)
527
+ .optional(),
528
+ schema_hints: z.string().optional(),
529
+ ignore_corrupt_files: z.boolean().optional(),
530
+ corrupt_record_column: z.string().optional(),
531
+ rescued_data_column: z.string().optional(),
532
+ single_variant_column: z.string().optional(),
533
+ reader_case_sensitive: z.boolean().optional(),
534
+ format_options: z.record(z.string(), z.string()).optional(),
535
+ })
536
+ .transform(d => ({
537
+ format: d.format,
538
+ fileFilters: d.file_filters,
539
+ inferColumnTypes: d.infer_column_types,
540
+ schemaEvolutionMode: d.schema_evolution_mode,
541
+ schemaHints: d.schema_hints,
542
+ ignoreCorruptFiles: d.ignore_corrupt_files,
543
+ corruptRecordColumn: d.corrupt_record_column,
544
+ rescuedDataColumn: d.rescued_data_column,
545
+ singleVariantColumn: d.single_variant_column,
546
+ readerCaseSensitive: d.reader_case_sensitive,
547
+ formatOptions: d.format_options,
548
+ }));
549
+ export const unmarshalFiltersSchema = z
550
+ .object({
551
+ include: z.array(z.string()).optional(),
552
+ exclude: z.array(z.string()).optional(),
553
+ })
554
+ .transform(d => ({
555
+ include: d.include,
556
+ exclude: d.exclude,
557
+ }));
558
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
559
+ export const unmarshalGetPipelineRequest_ResponseSchema = z
560
+ .object({
561
+ pipeline_id: z.string().optional(),
562
+ spec: z.lazy(() => unmarshalPipelineSpecSchema).optional(),
563
+ state: z.enum(PipelineState_PipelineState).optional(),
564
+ cause: z.string().optional(),
565
+ cluster_id: z.string().optional(),
566
+ name: z.string().optional(),
567
+ health: z.enum(PipelineHealthStatus).optional(),
568
+ creator_user_name: z.string().optional(),
569
+ latest_updates: z
570
+ .array(z.lazy(() => unmarshalUpdateStateInfoSchema))
571
+ .optional(),
572
+ last_modified: z
573
+ .union([z.number(), z.bigint()])
574
+ .transform(v => BigInt(v))
575
+ .optional(),
576
+ run_as_user_name: z.string().optional(),
577
+ effective_budget_policy_id: z.string().optional(),
578
+ effective_publishing_mode: z.enum(PublishingMode).optional(),
579
+ run_as: z.lazy(() => unmarshalPipelinesJobRunAsSchema).optional(),
580
+ parameters: z.record(z.string(), z.string()).optional(),
581
+ })
582
+ .transform(d => ({
583
+ pipelineId: d.pipeline_id,
584
+ spec: d.spec,
585
+ state: d.state,
586
+ cause: d.cause,
587
+ clusterId: d.cluster_id,
588
+ name: d.name,
589
+ health: d.health,
590
+ creatorUserName: d.creator_user_name,
591
+ latestUpdates: d.latest_updates,
592
+ lastModified: d.last_modified,
593
+ runAsUserName: d.run_as_user_name,
594
+ effectiveBudgetPolicyId: d.effective_budget_policy_id,
595
+ effectivePublishingMode: d.effective_publishing_mode,
596
+ runAs: d.run_as,
597
+ parameters: d.parameters,
598
+ }));
599
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
600
+ export const unmarshalGetUpdateRequest_ResponseSchema = z
601
+ .object({
602
+ update: z.lazy(() => unmarshalUpdateInfoSchema).optional(),
603
+ })
604
+ .transform(d => ({
605
+ update: d.update,
606
+ }));
607
+ export const unmarshalGoogleAdsConfigSchema = z
608
+ .object({
609
+ manager_account_id: z.string().optional(),
610
+ })
611
+ .transform(d => ({
612
+ managerAccountId: d.manager_account_id,
613
+ }));
614
+ export const unmarshalGoogleAdsOptionsSchema = z
615
+ .object({
616
+ manager_account_id: z.string().optional(),
617
+ lookback_window_days: z.number().optional(),
618
+ sync_start_date: z.string().optional(),
619
+ })
620
+ .transform(d => ({
621
+ managerAccountId: d.manager_account_id,
622
+ lookbackWindowDays: d.lookback_window_days,
623
+ syncStartDate: d.sync_start_date,
624
+ }));
625
+ export const unmarshalGoogleDriveOptionsSchema = z
626
+ .object({
627
+ url: z.string().optional(),
628
+ entity_type: z.enum(GoogleDriveOptions_GoogleDriveEntityType).optional(),
629
+ file_ingestion_options: z
630
+ .lazy(() => unmarshalFileIngestionOptionsSchema)
631
+ .optional(),
632
+ })
633
+ .transform(d => ({
634
+ url: d.url,
635
+ entityType: d.entity_type,
636
+ fileIngestionOptions: d.file_ingestion_options,
637
+ }));
638
+ export const unmarshalIngestionGatewayPipelineDefinitionSchema = z
639
+ .object({
640
+ connection_name: z.string().optional(),
641
+ connection_id: z.string().optional(),
642
+ gateway_storage_catalog: z.string().optional(),
643
+ gateway_storage_schema: z.string().optional(),
644
+ gateway_storage_name: z.string().optional(),
645
+ connection_parameters: z
646
+ .lazy(() => unmarshalConnectionParametersSchema)
647
+ .optional(),
648
+ })
649
+ .transform(d => ({
650
+ connectionName: d.connection_name,
651
+ connectionId: d.connection_id,
652
+ gatewayStorageCatalog: d.gateway_storage_catalog,
653
+ gatewayStorageSchema: d.gateway_storage_schema,
654
+ gatewayStorageName: d.gateway_storage_name,
655
+ connectionParameters: d.connection_parameters,
656
+ }));
657
+ export const unmarshalIngestionPipelineDefinitionSchema = z
658
+ .object({
659
+ connection_name: z.string().optional(),
660
+ ingestion_gateway_id: z.string().optional(),
661
+ ingest_from_uc_foreign_catalog: z.boolean().optional(),
662
+ objects: z
663
+ .array(z.lazy(() => unmarshalIngestionPipelineDefinition_IngestionConfigSchema))
664
+ .optional(),
665
+ source_type: z.enum(IngestionSourceType).optional(),
666
+ table_configuration: z
667
+ .lazy(() => unmarshalIngestionPipelineDefinition_TableSpecificConfigSchema)
668
+ .optional(),
669
+ netsuite_jar_path: z.string().optional(),
670
+ source_configurations: z
671
+ .array(z.lazy(() => unmarshalSourceConfigSchema))
672
+ .optional(),
673
+ full_refresh_window: z
674
+ .lazy(() => unmarshalOperationTimeWindowSchema)
675
+ .optional(),
676
+ connector_type: z.enum(ConnectorType).optional(),
677
+ data_staging_options: z
678
+ .lazy(() => unmarshalDataStagingOptionsSchema)
679
+ .optional(),
680
+ })
681
+ .transform(d => ({
682
+ source: d.connection_name !== undefined
683
+ ? {
684
+ $case: 'connectionName',
685
+ connectionName: d.connection_name,
686
+ }
687
+ : d.ingestion_gateway_id !== undefined
688
+ ? {
689
+ $case: 'ingestionGatewayId',
690
+ ingestionGatewayId: d.ingestion_gateway_id,
691
+ }
692
+ : d.ingest_from_uc_foreign_catalog !== undefined
693
+ ? {
694
+ $case: 'ingestFromUcForeignCatalog',
695
+ ingestFromUcForeignCatalog: d.ingest_from_uc_foreign_catalog,
696
+ }
697
+ : undefined,
698
+ objects: d.objects,
699
+ sourceType: d.source_type,
700
+ tableConfiguration: d.table_configuration,
701
+ netsuiteJarPath: d.netsuite_jar_path,
702
+ sourceConfigurations: d.source_configurations,
703
+ fullRefreshWindow: d.full_refresh_window,
704
+ connectorType: d.connector_type,
705
+ dataStagingOptions: d.data_staging_options,
706
+ }));
707
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
708
+ export const unmarshalIngestionPipelineDefinition_IngestionConfigSchema = z
709
+ .object({
710
+ schema: z
711
+ .lazy(() => unmarshalIngestionPipelineDefinition_SchemaSpecSchema)
712
+ .optional(),
713
+ table: z
714
+ .lazy(() => unmarshalIngestionPipelineDefinition_TableSpecSchema)
715
+ .optional(),
716
+ report: z
717
+ .lazy(() => unmarshalIngestionPipelineDefinition_ReportSpecSchema)
718
+ .optional(),
719
+ })
720
+ .transform(d => ({
721
+ sourceTables: d.schema !== undefined
722
+ ? { $case: 'schema', schema: d.schema }
723
+ : d.table !== undefined
724
+ ? { $case: 'table', table: d.table }
725
+ : d.report !== undefined
726
+ ? { $case: 'report', report: d.report }
727
+ : undefined,
728
+ }));
729
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
730
+ export const unmarshalIngestionPipelineDefinition_ReportSpecSchema = z
731
+ .object({
732
+ source_url: z.string().optional(),
733
+ destination_catalog: z.string().optional(),
734
+ destination_schema: z.string().optional(),
735
+ destination_table: z.string().optional(),
736
+ table_configuration: z
737
+ .lazy(() => unmarshalIngestionPipelineDefinition_TableSpecificConfigSchema)
738
+ .optional(),
739
+ })
740
+ .transform(d => ({
741
+ sourceUrl: d.source_url,
742
+ destinationCatalog: d.destination_catalog,
743
+ destinationSchema: d.destination_schema,
744
+ destinationTable: d.destination_table,
745
+ tableConfiguration: d.table_configuration,
746
+ }));
747
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
748
+ export const unmarshalIngestionPipelineDefinition_SchemaSpecSchema = z
749
+ .object({
750
+ source_catalog: z.string().optional(),
751
+ source_schema: z.string().optional(),
752
+ destination_catalog: z.string().optional(),
753
+ destination_schema: z.string().optional(),
754
+ table_configuration: z
755
+ .lazy(() => unmarshalIngestionPipelineDefinition_TableSpecificConfigSchema)
756
+ .optional(),
757
+ connector_options: z
758
+ .lazy(() => unmarshalConnectorOptionsSchema)
759
+ .optional(),
760
+ })
761
+ .transform(d => ({
762
+ sourceCatalog: d.source_catalog,
763
+ sourceSchema: d.source_schema,
764
+ destinationCatalog: d.destination_catalog,
765
+ destinationSchema: d.destination_schema,
766
+ tableConfiguration: d.table_configuration,
767
+ connectorOptions: d.connector_options,
768
+ }));
769
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
770
+ export const unmarshalIngestionPipelineDefinition_TableSpecSchema = z
771
+ .object({
772
+ source_catalog: z.string().optional(),
773
+ source_schema: z.string().optional(),
774
+ source_table: z.string().optional(),
775
+ destination_catalog: z.string().optional(),
776
+ destination_schema: z.string().optional(),
777
+ destination_table: z.string().optional(),
778
+ table_configuration: z
779
+ .lazy(() => unmarshalIngestionPipelineDefinition_TableSpecificConfigSchema)
780
+ .optional(),
781
+ connector_options: z
782
+ .lazy(() => unmarshalConnectorOptionsSchema)
783
+ .optional(),
784
+ })
785
+ .transform(d => ({
786
+ sourceCatalog: d.source_catalog,
787
+ sourceSchema: d.source_schema,
788
+ sourceTable: d.source_table,
789
+ destinationCatalog: d.destination_catalog,
790
+ destinationSchema: d.destination_schema,
791
+ destinationTable: d.destination_table,
792
+ tableConfiguration: d.table_configuration,
793
+ connectorOptions: d.connector_options,
794
+ }));
795
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
796
+ export const unmarshalIngestionPipelineDefinition_TableSpecificConfigSchema = z
797
+ .object({
798
+ scd_type: z.enum(ScdType_ScdType).optional(),
799
+ primary_keys: z.array(z.string()).optional(),
800
+ sequence_by: z.array(z.string()).optional(),
801
+ include_columns: z.array(z.string()).optional(),
802
+ exclude_columns: z.array(z.string()).optional(),
803
+ salesforce_include_formula_fields: z.boolean().optional(),
804
+ workday_report_parameters: z
805
+ .lazy(() => unmarshalIngestionPipelineDefinition_WorkdayReportParametersSchema)
806
+ .optional(),
807
+ row_filter: z.string().optional(),
808
+ query_based_connector_config: z
809
+ .lazy(() => unmarshalIngestionPipelineDefinition_TableSpecificConfig_QueryBasedConnectorConfigSchema)
810
+ .optional(),
811
+ auto_full_refresh_policy: z
812
+ .lazy(() => unmarshalAutoFullRefreshPolicySchema)
813
+ .optional(),
814
+ })
815
+ .transform(d => ({
816
+ scdType: d.scd_type,
817
+ primaryKeys: d.primary_keys,
818
+ sequenceBy: d.sequence_by,
819
+ includeColumns: d.include_columns,
820
+ excludeColumns: d.exclude_columns,
821
+ salesforceIncludeFormulaFields: d.salesforce_include_formula_fields,
822
+ workdayReportParameters: d.workday_report_parameters,
823
+ rowFilter: d.row_filter,
824
+ queryBasedConnectorConfig: d.query_based_connector_config,
825
+ autoFullRefreshPolicy: d.auto_full_refresh_policy,
826
+ }));
827
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
828
+ export const unmarshalIngestionPipelineDefinition_TableSpecificConfig_QueryBasedConnectorConfigSchema = z
829
+ .object({
830
+ cursor_columns: z.array(z.string()).optional(),
831
+ deletion_condition: z.string().optional(),
832
+ hard_deletion_sync_min_interval_in_seconds: z
833
+ .union([z.number(), z.bigint()])
834
+ .transform(v => BigInt(v))
835
+ .optional(),
836
+ })
837
+ .transform(d => ({
838
+ cursorColumns: d.cursor_columns,
839
+ deletionCondition: d.deletion_condition,
840
+ hardDeletionSyncMinIntervalInSeconds: d.hard_deletion_sync_min_interval_in_seconds,
841
+ }));
842
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
843
+ export const unmarshalIngestionPipelineDefinition_WorkdayReportParametersSchema = z
844
+ .object({
845
+ incremental: z.boolean().optional(),
846
+ report_parameters: z
847
+ .array(z.lazy(() => unmarshalIngestionPipelineDefinition_WorkdayReportParameters_QueryKeyValueSchema))
848
+ .optional(),
849
+ parameters: z.record(z.string(), z.string()).optional(),
850
+ })
851
+ .transform(d => ({
852
+ incremental: d.incremental,
853
+ reportParameters: d.report_parameters,
854
+ parameters: d.parameters,
855
+ }));
856
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
857
+ export const unmarshalIngestionPipelineDefinition_WorkdayReportParameters_QueryKeyValueSchema = z
858
+ .object({
859
+ key: z.string().optional(),
860
+ value: z.string().optional(),
861
+ })
862
+ .transform(d => ({
863
+ key: d.key,
864
+ value: d.value,
865
+ }));
866
+ export const unmarshalJiraConnectorOptionsSchema = z
867
+ .object({
868
+ include_jira_spaces: z.array(z.string()).optional(),
869
+ })
870
+ .transform(d => ({
871
+ includeJiraSpaces: d.include_jira_spaces,
872
+ }));
873
+ export const unmarshalJsonTransformerOptionsSchema = z
874
+ .object({
875
+ as_variant: z.boolean().optional(),
876
+ schema: z.string().optional(),
877
+ schema_file_path: z.string().optional(),
878
+ schema_evolution_mode: z
879
+ .enum(FileIngestionOptions_SchemaEvolutionMode)
880
+ .optional(),
881
+ schema_hints: z.string().optional(),
882
+ })
883
+ .transform(d => ({
884
+ asVariant: d.as_variant,
885
+ schema: d.schema,
886
+ schemaFilePath: d.schema_file_path,
887
+ schemaEvolutionMode: d.schema_evolution_mode,
888
+ schemaHints: d.schema_hints,
889
+ }));
890
+ export const unmarshalKafkaOptionsSchema = z
891
+ .object({
892
+ topics: z.array(z.string()).optional(),
893
+ topic_pattern: z.string().optional(),
894
+ key_transformer: z.lazy(() => unmarshalTransformerSchema).optional(),
895
+ value_transformer: z.lazy(() => unmarshalTransformerSchema).optional(),
896
+ starting_offset: z.string().optional(),
897
+ max_offsets_per_trigger: z
898
+ .union([z.number(), z.bigint()])
899
+ .transform(v => BigInt(v))
900
+ .optional(),
901
+ client_config: z.record(z.string(), z.string()).optional(),
902
+ })
903
+ .transform(d => ({
904
+ topics: d.topics,
905
+ topicPattern: d.topic_pattern,
906
+ keyTransformer: d.key_transformer,
907
+ valueTransformer: d.value_transformer,
908
+ startingOffset: d.starting_offset,
909
+ maxOffsetsPerTrigger: d.max_offsets_per_trigger,
910
+ clientConfig: d.client_config,
911
+ }));
912
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
913
+ export const unmarshalListPipelineEventsRequest_ResponseSchema = z
914
+ .object({
915
+ events: z.array(z.lazy(() => unmarshalPipelineEventSchema)).optional(),
916
+ next_page_token: z.string().optional(),
917
+ prev_page_token: z.string().optional(),
918
+ })
919
+ .transform(d => ({
920
+ events: d.events,
921
+ nextPageToken: d.next_page_token,
922
+ prevPageToken: d.prev_page_token,
923
+ }));
924
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
925
+ export const unmarshalListPipelinesRequest_ResponseSchema = z
926
+ .object({
927
+ statuses: z
928
+ .array(z.lazy(() => unmarshalPipelineStateInfoSchema))
929
+ .optional(),
930
+ next_page_token: z.string().optional(),
931
+ })
932
+ .transform(d => ({
933
+ statuses: d.statuses,
934
+ nextPageToken: d.next_page_token,
935
+ }));
936
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
937
+ export const unmarshalListUpdatesRequest_ResponseSchema = z
938
+ .object({
939
+ updates: z.array(z.lazy(() => unmarshalUpdateInfoSchema)).optional(),
940
+ next_page_token: z.string().optional(),
941
+ prev_page_token: z.string().optional(),
942
+ })
943
+ .transform(d => ({
944
+ updates: d.updates,
945
+ nextPageToken: d.next_page_token,
946
+ prevPageToken: d.prev_page_token,
947
+ }));
948
+ export const unmarshalManualTriggerSchema = z.object({});
949
+ export const unmarshalMetaMarketingOptionsSchema = z
950
+ .object({
951
+ level: z.string().optional(),
952
+ breakdowns: z.array(z.string()).optional(),
953
+ action_breakdowns: z.array(z.string()).optional(),
954
+ action_report_time: z.string().optional(),
955
+ start_date: z.string().optional(),
956
+ custom_insights_lookback_window: z.number().optional(),
957
+ time_increment: z.string().optional(),
958
+ action_attribution_windows: z.array(z.string()).optional(),
959
+ })
960
+ .transform(d => ({
961
+ level: d.level,
962
+ breakdowns: d.breakdowns,
963
+ actionBreakdowns: d.action_breakdowns,
964
+ actionReportTime: d.action_report_time,
965
+ startDate: d.start_date,
966
+ customInsightsLookbackWindow: d.custom_insights_lookback_window,
967
+ timeIncrement: d.time_increment,
968
+ actionAttributionWindows: d.action_attribution_windows,
969
+ }));
970
+ export const unmarshalNotebookLibrarySchema = z
971
+ .object({
972
+ path: z.string().optional(),
973
+ })
974
+ .transform(d => ({
975
+ path: d.path,
976
+ }));
977
+ export const unmarshalNotificationsSchema = z
978
+ .object({
979
+ email_recipients: z.array(z.string()).optional(),
980
+ alerts: z.array(z.string()).optional(),
981
+ })
982
+ .transform(d => ({
983
+ emailRecipients: d.email_recipients,
984
+ alerts: d.alerts,
985
+ }));
986
+ export const unmarshalOperationTimeWindowSchema = z
987
+ .object({
988
+ start_hour: z.number().optional(),
989
+ days_of_week: z.array(z.enum(DayOfWeek)).optional(),
990
+ time_zone_id: z.string().optional(),
991
+ })
992
+ .transform(d => ({
993
+ startHour: d.start_hour,
994
+ daysOfWeek: d.days_of_week,
995
+ timeZoneId: d.time_zone_id,
996
+ }));
997
+ export const unmarshalOriginSchema = z
998
+ .object({
999
+ cloud: z.string().optional(),
1000
+ region: z.string().optional(),
1001
+ org_id: z
1002
+ .union([z.number(), z.bigint()])
1003
+ .transform(v => BigInt(v))
1004
+ .optional(),
1005
+ pipeline_id: z.string().optional(),
1006
+ pipeline_name: z.string().optional(),
1007
+ cluster_id: z.string().optional(),
1008
+ update_id: z.string().optional(),
1009
+ maintenance_id: z.string().optional(),
1010
+ table_id: z.string().optional(),
1011
+ dataset_name: z.string().optional(),
1012
+ flow_id: z.string().optional(),
1013
+ flow_name: z.string().optional(),
1014
+ batch_id: z
1015
+ .union([z.number(), z.bigint()])
1016
+ .transform(v => BigInt(v))
1017
+ .optional(),
1018
+ request_id: z.string().optional(),
1019
+ uc_resource_id: z.string().optional(),
1020
+ host: z.string().optional(),
1021
+ materialization_name: z.string().optional(),
1022
+ ingestion_source_connection_name: z.string().optional(),
1023
+ ingestion_source_catalog_name: z.string().optional(),
1024
+ ingestion_source_schema_name: z.string().optional(),
1025
+ ingestion_source_table_name: z.string().optional(),
1026
+ ingestion_source_table_version: z.string().optional(),
1027
+ })
1028
+ .transform(d => ({
1029
+ cloud: d.cloud,
1030
+ region: d.region,
1031
+ orgId: d.org_id,
1032
+ pipelineId: d.pipeline_id,
1033
+ pipelineName: d.pipeline_name,
1034
+ clusterId: d.cluster_id,
1035
+ updateId: d.update_id,
1036
+ maintenanceId: d.maintenance_id,
1037
+ tableId: d.table_id,
1038
+ datasetName: d.dataset_name,
1039
+ flowId: d.flow_id,
1040
+ flowName: d.flow_name,
1041
+ batchId: d.batch_id,
1042
+ requestId: d.request_id,
1043
+ ucResourceId: d.uc_resource_id,
1044
+ host: d.host,
1045
+ materializationName: d.materialization_name,
1046
+ ingestionSourceConnectionName: d.ingestion_source_connection_name,
1047
+ ingestionSourceCatalogName: d.ingestion_source_catalog_name,
1048
+ ingestionSourceSchemaName: d.ingestion_source_schema_name,
1049
+ ingestionSourceTableName: d.ingestion_source_table_name,
1050
+ ingestionSourceTableVersion: d.ingestion_source_table_version,
1051
+ }));
1052
+ export const unmarshalOutlookOptionsSchema = z
1053
+ .object({
1054
+ folder_filter: z.array(z.string()).optional(),
1055
+ sender_filter: z.array(z.string()).optional(),
1056
+ subject_filter: z.array(z.string()).optional(),
1057
+ start_date: z.string().optional(),
1058
+ body_format: z.enum(OutlookBodyFormat).optional(),
1059
+ attachment_mode: z.enum(OutlookAttachmentMode).optional(),
1060
+ include_mailboxes: z.array(z.string()).optional(),
1061
+ include_folders: z.array(z.string()).optional(),
1062
+ include_senders: z.array(z.string()).optional(),
1063
+ include_subjects: z.array(z.string()).optional(),
1064
+ })
1065
+ .transform(d => ({
1066
+ folderFilter: d.folder_filter,
1067
+ senderFilter: d.sender_filter,
1068
+ subjectFilter: d.subject_filter,
1069
+ startDate: d.start_date,
1070
+ bodyFormat: d.body_format,
1071
+ attachmentMode: d.attachment_mode,
1072
+ includeMailboxes: d.include_mailboxes,
1073
+ includeFolders: d.include_folders,
1074
+ includeSenders: d.include_senders,
1075
+ includeSubjects: d.include_subjects,
1076
+ }));
1077
+ export const unmarshalPathPatternSchema = z
1078
+ .object({
1079
+ include: z.string().optional(),
1080
+ })
1081
+ .transform(d => ({
1082
+ include: d.include,
1083
+ }));
1084
+ export const unmarshalPipelineClusterSchema = z
1085
+ .object({
1086
+ label: z.string().optional(),
1087
+ apply_policy_default_values: z.boolean().optional(),
1088
+ spark_conf: z.record(z.string(), z.string()).optional(),
1089
+ aws_attributes: z
1090
+ .lazy(() => unmarshalPipelinesAwsAttributesSchema)
1091
+ .optional(),
1092
+ azure_attributes: z
1093
+ .lazy(() => unmarshalPipelinesAzureAttributesSchema)
1094
+ .optional(),
1095
+ gcp_attributes: z
1096
+ .lazy(() => unmarshalPipelinesGcpAttributesSchema)
1097
+ .optional(),
1098
+ node_type_id: z.string().optional(),
1099
+ driver_node_type_id: z.string().optional(),
1100
+ ssh_public_keys: z.array(z.string()).optional(),
1101
+ custom_tags: z.record(z.string(), z.string()).optional(),
1102
+ cluster_log_conf: z
1103
+ .lazy(() => unmarshalPipelinesClusterLogConfSchema)
1104
+ .optional(),
1105
+ spark_env_vars: z.record(z.string(), z.string()).optional(),
1106
+ init_scripts: z
1107
+ .array(z.lazy(() => unmarshalPipelinesInitScriptInfoSchema))
1108
+ .optional(),
1109
+ instance_pool_id: z.string().optional(),
1110
+ policy_id: z.string().optional(),
1111
+ enable_local_disk_encryption: z.boolean().optional(),
1112
+ driver_instance_pool_id: z.string().optional(),
1113
+ num_workers: z.number().optional(),
1114
+ autoscale: z.lazy(() => unmarshalPipelinesAutoScaleSchema).optional(),
1115
+ })
1116
+ .transform(d => ({
1117
+ label: d.label,
1118
+ applyPolicyDefaultValues: d.apply_policy_default_values,
1119
+ sparkConf: d.spark_conf,
1120
+ awsAttributes: d.aws_attributes,
1121
+ azureAttributes: d.azure_attributes,
1122
+ gcpAttributes: d.gcp_attributes,
1123
+ nodeTypeId: d.node_type_id,
1124
+ driverNodeTypeId: d.driver_node_type_id,
1125
+ sshPublicKeys: d.ssh_public_keys,
1126
+ customTags: d.custom_tags,
1127
+ clusterLogConf: d.cluster_log_conf,
1128
+ sparkEnvVars: d.spark_env_vars,
1129
+ initScripts: d.init_scripts,
1130
+ instancePoolId: d.instance_pool_id,
1131
+ policyId: d.policy_id,
1132
+ enableLocalDiskEncryption: d.enable_local_disk_encryption,
1133
+ driverInstancePoolId: d.driver_instance_pool_id,
1134
+ size: d.num_workers !== undefined
1135
+ ? { $case: 'numWorkers', numWorkers: d.num_workers }
1136
+ : d.autoscale !== undefined
1137
+ ? { $case: 'autoscale', autoscale: d.autoscale }
1138
+ : undefined,
1139
+ }));
1140
+ export const unmarshalPipelineDeploymentSchema = z
1141
+ .object({
1142
+ kind: z.enum(DeploymentKind).optional(),
1143
+ metadata_file_path: z.string().optional(),
1144
+ deployment_id: z.string().optional(),
1145
+ version_id: z.string().optional(),
1146
+ })
1147
+ .transform(d => ({
1148
+ kind: d.kind,
1149
+ metadataFilePath: d.metadata_file_path,
1150
+ deploymentId: d.deployment_id,
1151
+ versionId: d.version_id,
1152
+ }));
1153
+ export const unmarshalPipelineEventSchema = z
1154
+ .object({
1155
+ id: z.string().optional(),
1156
+ sequence: z.lazy(() => unmarshalSequencingSchema).optional(),
1157
+ origin: z.lazy(() => unmarshalOriginSchema).optional(),
1158
+ timestamp: z.string().optional(),
1159
+ message: z.string().optional(),
1160
+ level: z.enum(EventLevel).optional(),
1161
+ error: z.lazy(() => unmarshalErrorDetailSchema).optional(),
1162
+ event_type: z.string().optional(),
1163
+ maturity_level: z.enum(MaturityLevel).optional(),
1164
+ truncation: z.lazy(() => unmarshalTruncationSchema).optional(),
1165
+ })
1166
+ .transform(d => ({
1167
+ id: d.id,
1168
+ sequence: d.sequence,
1169
+ origin: d.origin,
1170
+ timestamp: d.timestamp,
1171
+ message: d.message,
1172
+ level: d.level,
1173
+ error: d.error,
1174
+ eventType: d.event_type,
1175
+ maturityLevel: d.maturity_level,
1176
+ truncation: d.truncation,
1177
+ }));
1178
+ export const unmarshalPipelineLibrarySchema = z
1179
+ .object({
1180
+ jar: z.string().optional(),
1181
+ maven: z.lazy(() => unmarshalPipelinesMavenLibrarySchema).optional(),
1182
+ whl: z.string().optional(),
1183
+ notebook: z.lazy(() => unmarshalNotebookLibrarySchema).optional(),
1184
+ file: z.lazy(() => unmarshalNotebookLibrarySchema).optional(),
1185
+ glob: z.lazy(() => unmarshalPathPatternSchema).optional(),
1186
+ })
1187
+ .transform(d => ({
1188
+ lib: d.jar !== undefined
1189
+ ? { $case: 'jar', jar: d.jar }
1190
+ : d.maven !== undefined
1191
+ ? { $case: 'maven', maven: d.maven }
1192
+ : d.whl !== undefined
1193
+ ? { $case: 'whl', whl: d.whl }
1194
+ : d.notebook !== undefined
1195
+ ? { $case: 'notebook', notebook: d.notebook }
1196
+ : d.file !== undefined
1197
+ ? { $case: 'file', file: d.file }
1198
+ : d.glob !== undefined
1199
+ ? { $case: 'glob', glob: d.glob }
1200
+ : undefined,
1201
+ }));
1202
+ export const unmarshalPipelineSpecSchema = z
1203
+ .object({
1204
+ id: z.string().optional(),
1205
+ name: z.string().optional(),
1206
+ storage: z.string().optional(),
1207
+ configuration: z.record(z.string(), z.string()).optional(),
1208
+ clusters: z.array(z.lazy(() => unmarshalPipelineClusterSchema)).optional(),
1209
+ libraries: z.array(z.lazy(() => unmarshalPipelineLibrarySchema)).optional(),
1210
+ ingestion_definition: z
1211
+ .lazy(() => unmarshalIngestionPipelineDefinitionSchema)
1212
+ .optional(),
1213
+ gateway_definition: z
1214
+ .lazy(() => unmarshalIngestionGatewayPipelineDefinitionSchema)
1215
+ .optional(),
1216
+ trigger: z.lazy(() => unmarshalPipelineTriggerSchema).optional(),
1217
+ target: z.string().optional(),
1218
+ schema: z.string().optional(),
1219
+ filters: z.lazy(() => unmarshalFiltersSchema).optional(),
1220
+ continuous: z.boolean().optional(),
1221
+ development: z.boolean().optional(),
1222
+ photon: z.boolean().optional(),
1223
+ edition: z.string().optional(),
1224
+ channel: z.string().optional(),
1225
+ catalog: z.string().optional(),
1226
+ notifications: z
1227
+ .array(z.lazy(() => unmarshalNotificationsSchema))
1228
+ .optional(),
1229
+ serverless: z.boolean().optional(),
1230
+ deployment: z.lazy(() => unmarshalPipelineDeploymentSchema).optional(),
1231
+ restart_window: z.lazy(() => unmarshalRestartWindowSchema).optional(),
1232
+ budget_policy_id: z.string().optional(),
1233
+ tags: z.record(z.string(), z.string()).optional(),
1234
+ event_log: z.lazy(() => unmarshalEventLogSpecSchema).optional(),
1235
+ root_path: z.string().optional(),
1236
+ environment: z.lazy(() => unmarshalPipelinesEnvironmentSchema).optional(),
1237
+ usage_policy_id: z.string().optional(),
1238
+ })
1239
+ .transform(d => ({
1240
+ id: d.id,
1241
+ name: d.name,
1242
+ storage: d.storage,
1243
+ configuration: d.configuration,
1244
+ clusters: d.clusters,
1245
+ libraries: d.libraries,
1246
+ ingestionDefinition: d.ingestion_definition,
1247
+ gatewayDefinition: d.gateway_definition,
1248
+ trigger: d.trigger,
1249
+ target: d.target,
1250
+ schema: d.schema,
1251
+ filters: d.filters,
1252
+ continuous: d.continuous,
1253
+ development: d.development,
1254
+ photon: d.photon,
1255
+ edition: d.edition,
1256
+ channel: d.channel,
1257
+ catalog: d.catalog,
1258
+ notifications: d.notifications,
1259
+ serverless: d.serverless,
1260
+ deployment: d.deployment,
1261
+ restartWindow: d.restart_window,
1262
+ budgetPolicyId: d.budget_policy_id,
1263
+ tags: d.tags,
1264
+ eventLog: d.event_log,
1265
+ rootPath: d.root_path,
1266
+ environment: d.environment,
1267
+ usagePolicyId: d.usage_policy_id,
1268
+ }));
1269
+ export const unmarshalPipelineStateInfoSchema = z
1270
+ .object({
1271
+ pipeline_id: z.string().optional(),
1272
+ state: z.enum(PipelineState_PipelineState).optional(),
1273
+ cluster_id: z.string().optional(),
1274
+ name: z.string().optional(),
1275
+ latest_updates: z
1276
+ .array(z.lazy(() => unmarshalUpdateStateInfoSchema))
1277
+ .optional(),
1278
+ creator_user_name: z.string().optional(),
1279
+ run_as_user_name: z.string().optional(),
1280
+ health: z.enum(PipelineHealthStatus).optional(),
1281
+ })
1282
+ .transform(d => ({
1283
+ pipelineId: d.pipeline_id,
1284
+ state: d.state,
1285
+ clusterId: d.cluster_id,
1286
+ name: d.name,
1287
+ latestUpdates: d.latest_updates,
1288
+ creatorUserName: d.creator_user_name,
1289
+ runAsUserName: d.run_as_user_name,
1290
+ health: d.health,
1291
+ }));
1292
+ export const unmarshalPipelineTriggerSchema = z
1293
+ .object({
1294
+ manual: z.lazy(() => unmarshalManualTriggerSchema).optional(),
1295
+ cron: z.lazy(() => unmarshalCronTriggerSchema).optional(),
1296
+ })
1297
+ .transform(d => ({
1298
+ trigger: d.manual !== undefined
1299
+ ? { $case: 'manual', manual: d.manual }
1300
+ : d.cron !== undefined
1301
+ ? { $case: 'cron', cron: d.cron }
1302
+ : undefined,
1303
+ }));
1304
+ export const unmarshalPipelinesAutoScaleSchema = z
1305
+ .object({
1306
+ min_workers: z.number().optional(),
1307
+ max_workers: z.number().optional(),
1308
+ mode: z.string().optional(),
1309
+ })
1310
+ .transform(d => ({
1311
+ minWorkers: d.min_workers,
1312
+ maxWorkers: d.max_workers,
1313
+ mode: d.mode,
1314
+ }));
1315
+ export const unmarshalPipelinesAwsAttributesSchema = z
1316
+ .object({
1317
+ first_on_demand: z.number().optional(),
1318
+ availability: z.enum(PipelinesAwsAvailability).optional(),
1319
+ zone_id: z.string().optional(),
1320
+ instance_profile_arn: z.string().optional(),
1321
+ spot_bid_price_percent: z.number().optional(),
1322
+ ebs_volume_type: z.enum(PipelinesEbsVolumeType).optional(),
1323
+ ebs_volume_count: z.number().optional(),
1324
+ ebs_volume_size: z.number().optional(),
1325
+ ebs_volume_iops: z.number().optional(),
1326
+ ebs_volume_throughput: z.number().optional(),
1327
+ })
1328
+ .transform(d => ({
1329
+ firstOnDemand: d.first_on_demand,
1330
+ availability: d.availability,
1331
+ zoneId: d.zone_id,
1332
+ instanceProfileArn: d.instance_profile_arn,
1333
+ spotBidPricePercent: d.spot_bid_price_percent,
1334
+ ebsVolumeType: d.ebs_volume_type,
1335
+ ebsVolumeCount: d.ebs_volume_count,
1336
+ ebsVolumeSize: d.ebs_volume_size,
1337
+ ebsVolumeIops: d.ebs_volume_iops,
1338
+ ebsVolumeThroughput: d.ebs_volume_throughput,
1339
+ }));
1340
+ export const unmarshalPipelinesAzureAttributesSchema = z
1341
+ .object({
1342
+ first_on_demand: z.number().optional(),
1343
+ availability: z.enum(PipelinesAzureAvailability).optional(),
1344
+ spot_bid_max_price: z.number().optional(),
1345
+ })
1346
+ .transform(d => ({
1347
+ firstOnDemand: d.first_on_demand,
1348
+ availability: d.availability,
1349
+ spotBidMaxPrice: d.spot_bid_max_price,
1350
+ }));
1351
+ export const unmarshalPipelinesClusterLogConfSchema = z
1352
+ .object({
1353
+ dbfs: z.lazy(() => unmarshalPipelinesDbfsStorageInfoSchema).optional(),
1354
+ })
1355
+ .transform(d => ({
1356
+ storageInfo: d.dbfs !== undefined
1357
+ ? { $case: 'dbfs', dbfs: d.dbfs }
1358
+ : undefined,
1359
+ }));
1360
+ export const unmarshalPipelinesDbfsStorageInfoSchema = z
1361
+ .object({
1362
+ destination: z.string().optional(),
1363
+ })
1364
+ .transform(d => ({
1365
+ destination: d.destination,
1366
+ }));
1367
+ export const unmarshalPipelinesEnvironmentSchema = z
1368
+ .object({
1369
+ dependencies: z.array(z.string()).optional(),
1370
+ environment_version: z.string().optional(),
1371
+ })
1372
+ .transform(d => ({
1373
+ dependencies: d.dependencies,
1374
+ environmentVersion: d.environment_version,
1375
+ }));
1376
+ export const unmarshalPipelinesGcpAttributesSchema = z
1377
+ .object({
1378
+ google_service_account: z.string().optional(),
1379
+ boot_disk_size: z.number().optional(),
1380
+ availability: z.enum(PipelinesGcpAvailability).optional(),
1381
+ zone_id: z.string().optional(),
1382
+ local_ssd_count: z.number().optional(),
1383
+ })
1384
+ .transform(d => ({
1385
+ googleServiceAccount: d.google_service_account,
1386
+ bootDiskSize: d.boot_disk_size,
1387
+ availability: d.availability,
1388
+ zoneId: d.zone_id,
1389
+ localSsdCount: d.local_ssd_count,
1390
+ }));
1391
+ export const unmarshalPipelinesInitScriptInfoSchema = z
1392
+ .object({
1393
+ dbfs: z.lazy(() => unmarshalPipelinesDbfsStorageInfoSchema).optional(),
1394
+ s3: z.lazy(() => unmarshalPipelinesS3StorageInfoSchema).optional(),
1395
+ })
1396
+ .transform(d => ({
1397
+ storageInfo: d.dbfs !== undefined
1398
+ ? { $case: 'dbfs', dbfs: d.dbfs }
1399
+ : d.s3 !== undefined
1400
+ ? { $case: 's3', s3: d.s3 }
1401
+ : undefined,
1402
+ }));
1403
+ export const unmarshalPipelinesJobRunAsSchema = z
1404
+ .object({
1405
+ user_name: z.string().optional(),
1406
+ service_principal_name: z.string().optional(),
1407
+ })
1408
+ .transform(d => ({
1409
+ identity: d.user_name !== undefined
1410
+ ? { $case: 'userName', userName: d.user_name }
1411
+ : d.service_principal_name !== undefined
1412
+ ? {
1413
+ $case: 'servicePrincipalName',
1414
+ servicePrincipalName: d.service_principal_name,
1415
+ }
1416
+ : undefined,
1417
+ }));
1418
+ export const unmarshalPipelinesMavenLibrarySchema = z
1419
+ .object({
1420
+ coordinates: z.string().optional(),
1421
+ repo: z.string().optional(),
1422
+ exclusions: z.array(z.string()).optional(),
1423
+ })
1424
+ .transform(d => ({
1425
+ coordinates: d.coordinates,
1426
+ repo: d.repo,
1427
+ exclusions: d.exclusions,
1428
+ }));
1429
+ export const unmarshalPipelinesS3StorageInfoSchema = z
1430
+ .object({
1431
+ destination: z.string().optional(),
1432
+ region: z.string().optional(),
1433
+ endpoint: z.string().optional(),
1434
+ enable_encryption: z.boolean().optional(),
1435
+ encryption_type: z.string().optional(),
1436
+ kms_key: z.string().optional(),
1437
+ canned_acl: z.string().optional(),
1438
+ })
1439
+ .transform(d => ({
1440
+ destination: d.destination,
1441
+ region: d.region,
1442
+ endpoint: d.endpoint,
1443
+ enableEncryption: d.enable_encryption,
1444
+ encryptionType: d.encryption_type,
1445
+ kmsKey: d.kms_key,
1446
+ cannedAcl: d.canned_acl,
1447
+ }));
1448
+ export const unmarshalPostgresCatalogConfigSchema = z
1449
+ .object({
1450
+ slot_config: z.lazy(() => unmarshalPostgresSlotConfigSchema).optional(),
1451
+ })
1452
+ .transform(d => ({
1453
+ slotConfig: d.slot_config,
1454
+ }));
1455
+ export const unmarshalPostgresSlotConfigSchema = z
1456
+ .object({
1457
+ slot_name: z.string().optional(),
1458
+ publication_name: z.string().optional(),
1459
+ })
1460
+ .transform(d => ({
1461
+ slotName: d.slot_name,
1462
+ publicationName: d.publication_name,
1463
+ }));
1464
+ export const unmarshalRestartWindowSchema = z
1465
+ .object({
1466
+ start_hour: z.number().optional(),
1467
+ days_of_week: z.array(z.enum(DayOfWeek)).optional(),
1468
+ time_zone_id: z.string().optional(),
1469
+ })
1470
+ .transform(d => ({
1471
+ startHour: d.start_hour,
1472
+ daysOfWeek: d.days_of_week,
1473
+ timeZoneId: d.time_zone_id,
1474
+ }));
1475
+ export const unmarshalSequencingSchema = z
1476
+ .object({
1477
+ data_plane_id: z.lazy(() => unmarshalDataPlaneIdSchema).optional(),
1478
+ control_plane_seq_no: z
1479
+ .union([z.number(), z.bigint()])
1480
+ .transform(v => BigInt(v))
1481
+ .optional(),
1482
+ })
1483
+ .transform(d => ({
1484
+ dataPlaneId: d.data_plane_id,
1485
+ controlPlaneSeqNo: d.control_plane_seq_no,
1486
+ }));
1487
+ export const unmarshalSerializedExceptionSchema = z
1488
+ .object({
1489
+ class_name: z.string().optional(),
1490
+ message: z.string().optional(),
1491
+ stack: z.array(z.lazy(() => unmarshalStackFrameSchema)).optional(),
1492
+ })
1493
+ .transform(d => ({
1494
+ className: d.class_name,
1495
+ message: d.message,
1496
+ stack: d.stack,
1497
+ }));
1498
+ export const unmarshalSharepointOptionsSchema = z
1499
+ .object({
1500
+ url: z.string().optional(),
1501
+ entity_type: z.enum(SharepointOptions_SharepointEntityType).optional(),
1502
+ file_ingestion_options: z
1503
+ .lazy(() => unmarshalFileIngestionOptionsSchema)
1504
+ .optional(),
1505
+ })
1506
+ .transform(d => ({
1507
+ url: d.url,
1508
+ entityType: d.entity_type,
1509
+ fileIngestionOptions: d.file_ingestion_options,
1510
+ }));
1511
+ export const unmarshalSmartsheetOptionsSchema = z
1512
+ .object({
1513
+ enforce_schema: z.boolean().optional(),
1514
+ })
1515
+ .transform(d => ({
1516
+ enforceSchema: d.enforce_schema,
1517
+ }));
1518
+ export const unmarshalSourceCatalogConfigSchema = z
1519
+ .object({
1520
+ source_catalog: z.string().optional(),
1521
+ postgres: z.lazy(() => unmarshalPostgresCatalogConfigSchema).optional(),
1522
+ })
1523
+ .transform(d => ({
1524
+ sourceCatalog: d.source_catalog,
1525
+ options: d.postgres !== undefined
1526
+ ? { $case: 'postgres', postgres: d.postgres }
1527
+ : undefined,
1528
+ }));
1529
+ export const unmarshalSourceConfigSchema = z
1530
+ .object({
1531
+ catalog: z.lazy(() => unmarshalSourceCatalogConfigSchema).optional(),
1532
+ google_ads_config: z.lazy(() => unmarshalGoogleAdsConfigSchema).optional(),
1533
+ })
1534
+ .transform(d => ({
1535
+ catalog: d.catalog,
1536
+ connectorConfig: d.google_ads_config !== undefined
1537
+ ? {
1538
+ $case: 'googleAdsConfig',
1539
+ googleAdsConfig: d.google_ads_config,
1540
+ }
1541
+ : undefined,
1542
+ }));
1543
+ export const unmarshalStackFrameSchema = z
1544
+ .object({
1545
+ declaring_class: z.string().optional(),
1546
+ method_name: z.string().optional(),
1547
+ file_name: z.string().optional(),
1548
+ line_number: z.number().optional(),
1549
+ })
1550
+ .transform(d => ({
1551
+ declaringClass: d.declaring_class,
1552
+ methodName: d.method_name,
1553
+ fileName: d.file_name,
1554
+ lineNumber: d.line_number,
1555
+ }));
1556
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1557
+ export const unmarshalStartUpdateRequest_ResponseSchema = z
1558
+ .object({
1559
+ update_id: z.string().optional(),
1560
+ })
1561
+ .transform(d => ({
1562
+ updateId: d.update_id,
1563
+ }));
1564
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1565
+ export const unmarshalStopPipelineRequest_ResponseSchema = z.object({});
1566
+ export const unmarshalTikTokAdsOptionsSchema = z
1567
+ .object({
1568
+ lookback_window_days: z.number().optional(),
1569
+ sync_start_date: z.string().optional(),
1570
+ dimensions: z.array(z.string()).optional(),
1571
+ metrics: z.array(z.string()).optional(),
1572
+ report_type: z.enum(TikTokAdsOptions_TikTokReportType).optional(),
1573
+ data_level: z.enum(TikTokAdsOptions_TikTokDataLevel).optional(),
1574
+ query_lifetime: z.boolean().optional(),
1575
+ })
1576
+ .transform(d => ({
1577
+ lookbackWindowDays: d.lookback_window_days,
1578
+ syncStartDate: d.sync_start_date,
1579
+ dimensions: d.dimensions,
1580
+ metrics: d.metrics,
1581
+ reportType: d.report_type,
1582
+ dataLevel: d.data_level,
1583
+ queryLifetime: d.query_lifetime,
1584
+ }));
1585
+ export const unmarshalTransformerSchema = z
1586
+ .object({
1587
+ format: z.enum(Transformer_Format).optional(),
1588
+ json_options: z
1589
+ .lazy(() => unmarshalJsonTransformerOptionsSchema)
1590
+ .optional(),
1591
+ })
1592
+ .transform(d => ({
1593
+ format: d.format,
1594
+ config: d.json_options !== undefined
1595
+ ? { $case: 'jsonOptions', jsonOptions: d.json_options }
1596
+ : undefined,
1597
+ }));
1598
+ export const unmarshalTruncationSchema = z
1599
+ .object({
1600
+ truncated_fields: z
1601
+ .array(z.lazy(() => unmarshalTruncation_TruncationDetailSchema))
1602
+ .optional(),
1603
+ })
1604
+ .transform(d => ({
1605
+ truncatedFields: d.truncated_fields,
1606
+ }));
1607
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1608
+ export const unmarshalTruncation_TruncationDetailSchema = z
1609
+ .object({
1610
+ field_name: z.string().optional(),
1611
+ })
1612
+ .transform(d => ({
1613
+ fieldName: d.field_name,
1614
+ }));
1615
+ export const unmarshalUpdateInfoSchema = z
1616
+ .object({
1617
+ pipeline_id: z.string().optional(),
1618
+ update_id: z.string().optional(),
1619
+ config: z.lazy(() => unmarshalPipelineSpecSchema).optional(),
1620
+ cause: z.enum(UpdateCause).optional(),
1621
+ state: z.enum(UpdateState).optional(),
1622
+ cluster_id: z.string().optional(),
1623
+ creation_time: z
1624
+ .union([z.number(), z.bigint()])
1625
+ .transform(v => BigInt(v))
1626
+ .optional(),
1627
+ full_refresh: z.boolean().optional(),
1628
+ refresh_selection: z.array(z.string()).optional(),
1629
+ full_refresh_selection: z.array(z.string()).optional(),
1630
+ validate_only: z.boolean().optional(),
1631
+ parameters: z.record(z.string(), z.string()).optional(),
1632
+ })
1633
+ .transform(d => ({
1634
+ pipelineId: d.pipeline_id,
1635
+ updateId: d.update_id,
1636
+ config: d.config,
1637
+ cause: d.cause,
1638
+ state: d.state,
1639
+ clusterId: d.cluster_id,
1640
+ creationTime: d.creation_time,
1641
+ fullRefresh: d.full_refresh,
1642
+ refreshSelection: d.refresh_selection,
1643
+ fullRefreshSelection: d.full_refresh_selection,
1644
+ validateOnly: d.validate_only,
1645
+ parameters: d.parameters,
1646
+ }));
1647
+ export const unmarshalUpdateStateInfoSchema = z
1648
+ .object({
1649
+ update_id: z.string().optional(),
1650
+ state: z.enum(UpdateState).optional(),
1651
+ creation_time: z.string().optional(),
1652
+ })
1653
+ .transform(d => ({
1654
+ updateId: d.update_id,
1655
+ state: d.state,
1656
+ creationTime: d.creation_time,
1657
+ }));
1658
+ export const unmarshalZendeskSupportOptionsSchema = z
1659
+ .object({
1660
+ start_date: z.string().optional(),
1661
+ })
1662
+ .transform(d => ({
1663
+ startDate: d.start_date,
1664
+ }));
1665
+ export const marshalApplyEnvironmentRequestSchema = z
1666
+ .object({
1667
+ pipelineId: z.string().optional(),
1668
+ })
1669
+ .transform(d => ({
1670
+ pipeline_id: d.pipelineId,
1671
+ }));
1672
+ export const marshalAutoFullRefreshPolicySchema = z
1673
+ .object({
1674
+ enabled: z.boolean().optional(),
1675
+ minIntervalHours: z.number().optional(),
1676
+ })
1677
+ .transform(d => ({
1678
+ enabled: d.enabled,
1679
+ min_interval_hours: d.minIntervalHours,
1680
+ }));
1681
+ export const marshalClonePipelineRequestSchema = z
1682
+ .object({
1683
+ pipelineId: z.string().optional(),
1684
+ expectedLastModified: z.bigint().optional(),
1685
+ allowDuplicateNames: z.boolean().optional(),
1686
+ id: z.string().optional(),
1687
+ name: z.string().optional(),
1688
+ storage: z.string().optional(),
1689
+ configuration: z.record(z.string(), z.string()).optional(),
1690
+ clusters: z.array(z.lazy(() => marshalPipelineClusterSchema)).optional(),
1691
+ libraries: z.array(z.lazy(() => marshalPipelineLibrarySchema)).optional(),
1692
+ ingestionDefinition: z
1693
+ .lazy(() => marshalIngestionPipelineDefinitionSchema)
1694
+ .optional(),
1695
+ gatewayDefinition: z
1696
+ .lazy(() => marshalIngestionGatewayPipelineDefinitionSchema)
1697
+ .optional(),
1698
+ trigger: z.lazy(() => marshalPipelineTriggerSchema).optional(),
1699
+ target: z.string().optional(),
1700
+ schema: z.string().optional(),
1701
+ filters: z.lazy(() => marshalFiltersSchema).optional(),
1702
+ continuous: z.boolean().optional(),
1703
+ development: z.boolean().optional(),
1704
+ photon: z.boolean().optional(),
1705
+ edition: z.string().optional(),
1706
+ channel: z.string().optional(),
1707
+ catalog: z.string().optional(),
1708
+ notifications: z.array(z.lazy(() => marshalNotificationsSchema)).optional(),
1709
+ serverless: z.boolean().optional(),
1710
+ deployment: z.lazy(() => marshalPipelineDeploymentSchema).optional(),
1711
+ restartWindow: z.lazy(() => marshalRestartWindowSchema).optional(),
1712
+ budgetPolicyId: z.string().optional(),
1713
+ tags: z.record(z.string(), z.string()).optional(),
1714
+ eventLog: z.lazy(() => marshalEventLogSpecSchema).optional(),
1715
+ rootPath: z.string().optional(),
1716
+ environment: z.lazy(() => marshalPipelinesEnvironmentSchema).optional(),
1717
+ usagePolicyId: z.string().optional(),
1718
+ cloneMode: z.enum(CloneMode).optional(),
1719
+ })
1720
+ .transform(d => ({
1721
+ pipeline_id: d.pipelineId,
1722
+ expected_last_modified: d.expectedLastModified,
1723
+ allow_duplicate_names: d.allowDuplicateNames,
1724
+ id: d.id,
1725
+ name: d.name,
1726
+ storage: d.storage,
1727
+ configuration: d.configuration,
1728
+ clusters: d.clusters,
1729
+ libraries: d.libraries,
1730
+ ingestion_definition: d.ingestionDefinition,
1731
+ gateway_definition: d.gatewayDefinition,
1732
+ trigger: d.trigger,
1733
+ target: d.target,
1734
+ schema: d.schema,
1735
+ filters: d.filters,
1736
+ continuous: d.continuous,
1737
+ development: d.development,
1738
+ photon: d.photon,
1739
+ edition: d.edition,
1740
+ channel: d.channel,
1741
+ catalog: d.catalog,
1742
+ notifications: d.notifications,
1743
+ serverless: d.serverless,
1744
+ deployment: d.deployment,
1745
+ restart_window: d.restartWindow,
1746
+ budget_policy_id: d.budgetPolicyId,
1747
+ tags: d.tags,
1748
+ event_log: d.eventLog,
1749
+ root_path: d.rootPath,
1750
+ environment: d.environment,
1751
+ usage_policy_id: d.usagePolicyId,
1752
+ clone_mode: d.cloneMode,
1753
+ }));
1754
+ export const marshalConfluenceConnectorOptionsSchema = z
1755
+ .object({
1756
+ includeConfluenceSpaces: z.array(z.string()).optional(),
1757
+ })
1758
+ .transform(d => ({
1759
+ include_confluence_spaces: d.includeConfluenceSpaces,
1760
+ }));
1761
+ export const marshalConnectionParametersSchema = z
1762
+ .object({
1763
+ sourceCatalog: z.string().optional(),
1764
+ })
1765
+ .transform(d => ({
1766
+ source_catalog: d.sourceCatalog,
1767
+ }));
1768
+ export const marshalConnectorOptionsSchema = z
1769
+ .object({
1770
+ connectorOptions: z
1771
+ .discriminatedUnion('$case', [
1772
+ z.object({
1773
+ $case: z.literal('googleAdsOptions'),
1774
+ googleAdsOptions: z.lazy(() => marshalGoogleAdsOptionsSchema),
1775
+ }),
1776
+ z.object({
1777
+ $case: z.literal('tiktokAdsOptions'),
1778
+ tiktokAdsOptions: z.lazy(() => marshalTikTokAdsOptionsSchema),
1779
+ }),
1780
+ z.object({
1781
+ $case: z.literal('sharepointOptions'),
1782
+ sharepointOptions: z.lazy(() => marshalSharepointOptionsSchema),
1783
+ }),
1784
+ z.object({
1785
+ $case: z.literal('gdriveOptions'),
1786
+ gdriveOptions: z.lazy(() => marshalGoogleDriveOptionsSchema),
1787
+ }),
1788
+ z.object({
1789
+ $case: z.literal('outlookOptions'),
1790
+ outlookOptions: z.lazy(() => marshalOutlookOptionsSchema),
1791
+ }),
1792
+ z.object({
1793
+ $case: z.literal('smartsheetOptions'),
1794
+ smartsheetOptions: z.lazy(() => marshalSmartsheetOptionsSchema),
1795
+ }),
1796
+ z.object({
1797
+ $case: z.literal('jiraOptions'),
1798
+ jiraOptions: z.lazy(() => marshalJiraConnectorOptionsSchema),
1799
+ }),
1800
+ z.object({
1801
+ $case: z.literal('confluenceOptions'),
1802
+ confluenceOptions: z.lazy(() => marshalConfluenceConnectorOptionsSchema),
1803
+ }),
1804
+ z.object({
1805
+ $case: z.literal('metaAdsOptions'),
1806
+ metaAdsOptions: z.lazy(() => marshalMetaMarketingOptionsSchema),
1807
+ }),
1808
+ z.object({
1809
+ $case: z.literal('zendeskSupportOptions'),
1810
+ zendeskSupportOptions: z.lazy(() => marshalZendeskSupportOptionsSchema),
1811
+ }),
1812
+ z.object({
1813
+ $case: z.literal('kafkaOptions'),
1814
+ kafkaOptions: z.lazy(() => marshalKafkaOptionsSchema),
1815
+ }),
1816
+ ])
1817
+ .optional(),
1818
+ })
1819
+ .transform(d => ({
1820
+ ...(d.connectorOptions?.$case === 'googleAdsOptions' && {
1821
+ google_ads_options: d.connectorOptions.googleAdsOptions,
1822
+ }),
1823
+ ...(d.connectorOptions?.$case === 'tiktokAdsOptions' && {
1824
+ tiktok_ads_options: d.connectorOptions.tiktokAdsOptions,
1825
+ }),
1826
+ ...(d.connectorOptions?.$case === 'sharepointOptions' && {
1827
+ sharepoint_options: d.connectorOptions.sharepointOptions,
1828
+ }),
1829
+ ...(d.connectorOptions?.$case === 'gdriveOptions' && {
1830
+ gdrive_options: d.connectorOptions.gdriveOptions,
1831
+ }),
1832
+ ...(d.connectorOptions?.$case === 'outlookOptions' && {
1833
+ outlook_options: d.connectorOptions.outlookOptions,
1834
+ }),
1835
+ ...(d.connectorOptions?.$case === 'smartsheetOptions' && {
1836
+ smartsheet_options: d.connectorOptions.smartsheetOptions,
1837
+ }),
1838
+ ...(d.connectorOptions?.$case === 'jiraOptions' && {
1839
+ jira_options: d.connectorOptions.jiraOptions,
1840
+ }),
1841
+ ...(d.connectorOptions?.$case === 'confluenceOptions' && {
1842
+ confluence_options: d.connectorOptions.confluenceOptions,
1843
+ }),
1844
+ ...(d.connectorOptions?.$case === 'metaAdsOptions' && {
1845
+ meta_ads_options: d.connectorOptions.metaAdsOptions,
1846
+ }),
1847
+ ...(d.connectorOptions?.$case === 'zendeskSupportOptions' && {
1848
+ zendesk_support_options: d.connectorOptions.zendeskSupportOptions,
1849
+ }),
1850
+ ...(d.connectorOptions?.$case === 'kafkaOptions' && {
1851
+ kafka_options: d.connectorOptions.kafkaOptions,
1852
+ }),
1853
+ }));
1854
+ export const marshalCreatePipelineRequestSchema = z
1855
+ .object({
1856
+ allowDuplicateNames: z.boolean().optional(),
1857
+ dryRun: z.boolean().optional(),
1858
+ runAs: z.lazy(() => marshalPipelinesJobRunAsSchema).optional(),
1859
+ parameters: z.record(z.string(), z.string()).optional(),
1860
+ id: z.string().optional(),
1861
+ name: z.string().optional(),
1862
+ storage: z.string().optional(),
1863
+ configuration: z.record(z.string(), z.string()).optional(),
1864
+ clusters: z.array(z.lazy(() => marshalPipelineClusterSchema)).optional(),
1865
+ libraries: z.array(z.lazy(() => marshalPipelineLibrarySchema)).optional(),
1866
+ ingestionDefinition: z
1867
+ .lazy(() => marshalIngestionPipelineDefinitionSchema)
1868
+ .optional(),
1869
+ gatewayDefinition: z
1870
+ .lazy(() => marshalIngestionGatewayPipelineDefinitionSchema)
1871
+ .optional(),
1872
+ trigger: z.lazy(() => marshalPipelineTriggerSchema).optional(),
1873
+ target: z.string().optional(),
1874
+ schema: z.string().optional(),
1875
+ filters: z.lazy(() => marshalFiltersSchema).optional(),
1876
+ continuous: z.boolean().optional(),
1877
+ development: z.boolean().optional(),
1878
+ photon: z.boolean().optional(),
1879
+ edition: z.string().optional(),
1880
+ channel: z.string().optional(),
1881
+ catalog: z.string().optional(),
1882
+ notifications: z.array(z.lazy(() => marshalNotificationsSchema)).optional(),
1883
+ serverless: z.boolean().optional(),
1884
+ deployment: z.lazy(() => marshalPipelineDeploymentSchema).optional(),
1885
+ restartWindow: z.lazy(() => marshalRestartWindowSchema).optional(),
1886
+ budgetPolicyId: z.string().optional(),
1887
+ tags: z.record(z.string(), z.string()).optional(),
1888
+ eventLog: z.lazy(() => marshalEventLogSpecSchema).optional(),
1889
+ rootPath: z.string().optional(),
1890
+ environment: z.lazy(() => marshalPipelinesEnvironmentSchema).optional(),
1891
+ usagePolicyId: z.string().optional(),
1892
+ })
1893
+ .transform(d => ({
1894
+ allow_duplicate_names: d.allowDuplicateNames,
1895
+ dry_run: d.dryRun,
1896
+ run_as: d.runAs,
1897
+ parameters: d.parameters,
1898
+ id: d.id,
1899
+ name: d.name,
1900
+ storage: d.storage,
1901
+ configuration: d.configuration,
1902
+ clusters: d.clusters,
1903
+ libraries: d.libraries,
1904
+ ingestion_definition: d.ingestionDefinition,
1905
+ gateway_definition: d.gatewayDefinition,
1906
+ trigger: d.trigger,
1907
+ target: d.target,
1908
+ schema: d.schema,
1909
+ filters: d.filters,
1910
+ continuous: d.continuous,
1911
+ development: d.development,
1912
+ photon: d.photon,
1913
+ edition: d.edition,
1914
+ channel: d.channel,
1915
+ catalog: d.catalog,
1916
+ notifications: d.notifications,
1917
+ serverless: d.serverless,
1918
+ deployment: d.deployment,
1919
+ restart_window: d.restartWindow,
1920
+ budget_policy_id: d.budgetPolicyId,
1921
+ tags: d.tags,
1922
+ event_log: d.eventLog,
1923
+ root_path: d.rootPath,
1924
+ environment: d.environment,
1925
+ usage_policy_id: d.usagePolicyId,
1926
+ }));
1927
+ export const marshalCronTriggerSchema = z
1928
+ .object({
1929
+ quartzCronSchedule: z.string().optional(),
1930
+ timezoneId: z.string().optional(),
1931
+ })
1932
+ .transform(d => ({
1933
+ quartz_cron_schedule: d.quartzCronSchedule,
1934
+ timezone_id: d.timezoneId,
1935
+ }));
1936
+ export const marshalDataStagingOptionsSchema = z
1937
+ .object({
1938
+ catalogName: z.string().optional(),
1939
+ schemaName: z.string().optional(),
1940
+ volumeName: z.string().optional(),
1941
+ })
1942
+ .transform(d => ({
1943
+ catalog_name: d.catalogName,
1944
+ schema_name: d.schemaName,
1945
+ volume_name: d.volumeName,
1946
+ }));
1947
+ export const marshalEditPipelineRequestSchema = z
1948
+ .object({
1949
+ pipelineId: z.string().optional(),
1950
+ allowDuplicateNames: z.boolean().optional(),
1951
+ expectedLastModified: z.bigint().optional(),
1952
+ runAs: z.lazy(() => marshalPipelinesJobRunAsSchema).optional(),
1953
+ parameters: z.record(z.string(), z.string()).optional(),
1954
+ id: z.string().optional(),
1955
+ name: z.string().optional(),
1956
+ storage: z.string().optional(),
1957
+ configuration: z.record(z.string(), z.string()).optional(),
1958
+ clusters: z.array(z.lazy(() => marshalPipelineClusterSchema)).optional(),
1959
+ libraries: z.array(z.lazy(() => marshalPipelineLibrarySchema)).optional(),
1960
+ ingestionDefinition: z
1961
+ .lazy(() => marshalIngestionPipelineDefinitionSchema)
1962
+ .optional(),
1963
+ gatewayDefinition: z
1964
+ .lazy(() => marshalIngestionGatewayPipelineDefinitionSchema)
1965
+ .optional(),
1966
+ trigger: z.lazy(() => marshalPipelineTriggerSchema).optional(),
1967
+ target: z.string().optional(),
1968
+ schema: z.string().optional(),
1969
+ filters: z.lazy(() => marshalFiltersSchema).optional(),
1970
+ continuous: z.boolean().optional(),
1971
+ development: z.boolean().optional(),
1972
+ photon: z.boolean().optional(),
1973
+ edition: z.string().optional(),
1974
+ channel: z.string().optional(),
1975
+ catalog: z.string().optional(),
1976
+ notifications: z.array(z.lazy(() => marshalNotificationsSchema)).optional(),
1977
+ serverless: z.boolean().optional(),
1978
+ deployment: z.lazy(() => marshalPipelineDeploymentSchema).optional(),
1979
+ restartWindow: z.lazy(() => marshalRestartWindowSchema).optional(),
1980
+ budgetPolicyId: z.string().optional(),
1981
+ tags: z.record(z.string(), z.string()).optional(),
1982
+ eventLog: z.lazy(() => marshalEventLogSpecSchema).optional(),
1983
+ rootPath: z.string().optional(),
1984
+ environment: z.lazy(() => marshalPipelinesEnvironmentSchema).optional(),
1985
+ usagePolicyId: z.string().optional(),
1986
+ })
1987
+ .transform(d => ({
1988
+ pipeline_id: d.pipelineId,
1989
+ allow_duplicate_names: d.allowDuplicateNames,
1990
+ expected_last_modified: d.expectedLastModified,
1991
+ run_as: d.runAs,
1992
+ parameters: d.parameters,
1993
+ id: d.id,
1994
+ name: d.name,
1995
+ storage: d.storage,
1996
+ configuration: d.configuration,
1997
+ clusters: d.clusters,
1998
+ libraries: d.libraries,
1999
+ ingestion_definition: d.ingestionDefinition,
2000
+ gateway_definition: d.gatewayDefinition,
2001
+ trigger: d.trigger,
2002
+ target: d.target,
2003
+ schema: d.schema,
2004
+ filters: d.filters,
2005
+ continuous: d.continuous,
2006
+ development: d.development,
2007
+ photon: d.photon,
2008
+ edition: d.edition,
2009
+ channel: d.channel,
2010
+ catalog: d.catalog,
2011
+ notifications: d.notifications,
2012
+ serverless: d.serverless,
2013
+ deployment: d.deployment,
2014
+ restart_window: d.restartWindow,
2015
+ budget_policy_id: d.budgetPolicyId,
2016
+ tags: d.tags,
2017
+ event_log: d.eventLog,
2018
+ root_path: d.rootPath,
2019
+ environment: d.environment,
2020
+ usage_policy_id: d.usagePolicyId,
2021
+ }));
2022
+ export const marshalEventLogSpecSchema = z
2023
+ .object({
2024
+ name: z.string().optional(),
2025
+ schema: z.string().optional(),
2026
+ catalog: z.string().optional(),
2027
+ })
2028
+ .transform(d => ({
2029
+ name: d.name,
2030
+ schema: d.schema,
2031
+ catalog: d.catalog,
2032
+ }));
2033
+ export const marshalFileFilterSchema = z
2034
+ .object({
2035
+ filter: z
2036
+ .discriminatedUnion('$case', [
2037
+ z.object({ $case: z.literal('pathFilter'), pathFilter: z.string() }),
2038
+ z.object({
2039
+ $case: z.literal('modifiedBefore'),
2040
+ modifiedBefore: z.string(),
2041
+ }),
2042
+ z.object({
2043
+ $case: z.literal('modifiedAfter'),
2044
+ modifiedAfter: z.string(),
2045
+ }),
2046
+ ])
2047
+ .optional(),
2048
+ })
2049
+ .transform(d => ({
2050
+ ...(d.filter?.$case === 'pathFilter' && { path_filter: d.filter.pathFilter }),
2051
+ ...(d.filter?.$case === 'modifiedBefore' && {
2052
+ modified_before: d.filter.modifiedBefore,
2053
+ }),
2054
+ ...(d.filter?.$case === 'modifiedAfter' && {
2055
+ modified_after: d.filter.modifiedAfter,
2056
+ }),
2057
+ }));
2058
+ export const marshalFileIngestionOptionsSchema = z
2059
+ .object({
2060
+ format: z.enum(FileIngestionOptions_FileFormat).optional(),
2061
+ fileFilters: z.array(z.lazy(() => marshalFileFilterSchema)).optional(),
2062
+ inferColumnTypes: z.boolean().optional(),
2063
+ schemaEvolutionMode: z
2064
+ .enum(FileIngestionOptions_SchemaEvolutionMode)
2065
+ .optional(),
2066
+ schemaHints: z.string().optional(),
2067
+ ignoreCorruptFiles: z.boolean().optional(),
2068
+ corruptRecordColumn: z.string().optional(),
2069
+ rescuedDataColumn: z.string().optional(),
2070
+ singleVariantColumn: z.string().optional(),
2071
+ readerCaseSensitive: z.boolean().optional(),
2072
+ formatOptions: z.record(z.string(), z.string()).optional(),
2073
+ })
2074
+ .transform(d => ({
2075
+ format: d.format,
2076
+ file_filters: d.fileFilters,
2077
+ infer_column_types: d.inferColumnTypes,
2078
+ schema_evolution_mode: d.schemaEvolutionMode,
2079
+ schema_hints: d.schemaHints,
2080
+ ignore_corrupt_files: d.ignoreCorruptFiles,
2081
+ corrupt_record_column: d.corruptRecordColumn,
2082
+ rescued_data_column: d.rescuedDataColumn,
2083
+ single_variant_column: d.singleVariantColumn,
2084
+ reader_case_sensitive: d.readerCaseSensitive,
2085
+ format_options: d.formatOptions,
2086
+ }));
2087
+ export const marshalFiltersSchema = z
2088
+ .object({
2089
+ include: z.array(z.string()).optional(),
2090
+ exclude: z.array(z.string()).optional(),
2091
+ })
2092
+ .transform(d => ({
2093
+ include: d.include,
2094
+ exclude: d.exclude,
2095
+ }));
2096
+ export const marshalGoogleAdsConfigSchema = z
2097
+ .object({
2098
+ managerAccountId: z.string().optional(),
2099
+ })
2100
+ .transform(d => ({
2101
+ manager_account_id: d.managerAccountId,
2102
+ }));
2103
+ export const marshalGoogleAdsOptionsSchema = z
2104
+ .object({
2105
+ managerAccountId: z.string().optional(),
2106
+ lookbackWindowDays: z.number().optional(),
2107
+ syncStartDate: z.string().optional(),
2108
+ })
2109
+ .transform(d => ({
2110
+ manager_account_id: d.managerAccountId,
2111
+ lookback_window_days: d.lookbackWindowDays,
2112
+ sync_start_date: d.syncStartDate,
2113
+ }));
2114
+ export const marshalGoogleDriveOptionsSchema = z
2115
+ .object({
2116
+ url: z.string().optional(),
2117
+ entityType: z.enum(GoogleDriveOptions_GoogleDriveEntityType).optional(),
2118
+ fileIngestionOptions: z
2119
+ .lazy(() => marshalFileIngestionOptionsSchema)
2120
+ .optional(),
2121
+ })
2122
+ .transform(d => ({
2123
+ url: d.url,
2124
+ entity_type: d.entityType,
2125
+ file_ingestion_options: d.fileIngestionOptions,
2126
+ }));
2127
+ export const marshalIngestionGatewayPipelineDefinitionSchema = z
2128
+ .object({
2129
+ connectionName: z.string().optional(),
2130
+ connectionId: z.string().optional(),
2131
+ gatewayStorageCatalog: z.string().optional(),
2132
+ gatewayStorageSchema: z.string().optional(),
2133
+ gatewayStorageName: z.string().optional(),
2134
+ connectionParameters: z
2135
+ .lazy(() => marshalConnectionParametersSchema)
2136
+ .optional(),
2137
+ })
2138
+ .transform(d => ({
2139
+ connection_name: d.connectionName,
2140
+ connection_id: d.connectionId,
2141
+ gateway_storage_catalog: d.gatewayStorageCatalog,
2142
+ gateway_storage_schema: d.gatewayStorageSchema,
2143
+ gateway_storage_name: d.gatewayStorageName,
2144
+ connection_parameters: d.connectionParameters,
2145
+ }));
2146
+ export const marshalIngestionPipelineDefinitionSchema = z
2147
+ .object({
2148
+ source: z
2149
+ .discriminatedUnion('$case', [
2150
+ z.object({
2151
+ $case: z.literal('connectionName'),
2152
+ connectionName: z.string(),
2153
+ }),
2154
+ z.object({
2155
+ $case: z.literal('ingestionGatewayId'),
2156
+ ingestionGatewayId: z.string(),
2157
+ }),
2158
+ z.object({
2159
+ $case: z.literal('ingestFromUcForeignCatalog'),
2160
+ ingestFromUcForeignCatalog: z.boolean(),
2161
+ }),
2162
+ ])
2163
+ .optional(),
2164
+ objects: z
2165
+ .array(z.lazy(() => marshalIngestionPipelineDefinition_IngestionConfigSchema))
2166
+ .optional(),
2167
+ sourceType: z.enum(IngestionSourceType).optional(),
2168
+ tableConfiguration: z
2169
+ .lazy(() => marshalIngestionPipelineDefinition_TableSpecificConfigSchema)
2170
+ .optional(),
2171
+ netsuiteJarPath: z.string().optional(),
2172
+ sourceConfigurations: z
2173
+ .array(z.lazy(() => marshalSourceConfigSchema))
2174
+ .optional(),
2175
+ fullRefreshWindow: z
2176
+ .lazy(() => marshalOperationTimeWindowSchema)
2177
+ .optional(),
2178
+ connectorType: z.enum(ConnectorType).optional(),
2179
+ dataStagingOptions: z
2180
+ .lazy(() => marshalDataStagingOptionsSchema)
2181
+ .optional(),
2182
+ })
2183
+ .transform(d => ({
2184
+ ...(d.source?.$case === 'connectionName' && {
2185
+ connection_name: d.source.connectionName,
2186
+ }),
2187
+ ...(d.source?.$case === 'ingestionGatewayId' && {
2188
+ ingestion_gateway_id: d.source.ingestionGatewayId,
2189
+ }),
2190
+ ...(d.source?.$case === 'ingestFromUcForeignCatalog' && {
2191
+ ingest_from_uc_foreign_catalog: d.source.ingestFromUcForeignCatalog,
2192
+ }),
2193
+ objects: d.objects,
2194
+ source_type: d.sourceType,
2195
+ table_configuration: d.tableConfiguration,
2196
+ netsuite_jar_path: d.netsuiteJarPath,
2197
+ source_configurations: d.sourceConfigurations,
2198
+ full_refresh_window: d.fullRefreshWindow,
2199
+ connector_type: d.connectorType,
2200
+ data_staging_options: d.dataStagingOptions,
2201
+ }));
2202
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2203
+ export const marshalIngestionPipelineDefinition_IngestionConfigSchema = z
2204
+ .object({
2205
+ sourceTables: z
2206
+ .discriminatedUnion('$case', [
2207
+ z.object({
2208
+ $case: z.literal('schema'),
2209
+ schema: z.lazy(() => marshalIngestionPipelineDefinition_SchemaSpecSchema),
2210
+ }),
2211
+ z.object({
2212
+ $case: z.literal('table'),
2213
+ table: z.lazy(() => marshalIngestionPipelineDefinition_TableSpecSchema),
2214
+ }),
2215
+ z.object({
2216
+ $case: z.literal('report'),
2217
+ report: z.lazy(() => marshalIngestionPipelineDefinition_ReportSpecSchema),
2218
+ }),
2219
+ ])
2220
+ .optional(),
2221
+ })
2222
+ .transform(d => ({
2223
+ ...(d.sourceTables?.$case === 'schema' && {
2224
+ schema: d.sourceTables.schema,
2225
+ }),
2226
+ ...(d.sourceTables?.$case === 'table' && { table: d.sourceTables.table }),
2227
+ ...(d.sourceTables?.$case === 'report' && {
2228
+ report: d.sourceTables.report,
2229
+ }),
2230
+ }));
2231
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2232
+ export const marshalIngestionPipelineDefinition_ReportSpecSchema = z
2233
+ .object({
2234
+ sourceUrl: z.string().optional(),
2235
+ destinationCatalog: z.string().optional(),
2236
+ destinationSchema: z.string().optional(),
2237
+ destinationTable: z.string().optional(),
2238
+ tableConfiguration: z
2239
+ .lazy(() => marshalIngestionPipelineDefinition_TableSpecificConfigSchema)
2240
+ .optional(),
2241
+ })
2242
+ .transform(d => ({
2243
+ source_url: d.sourceUrl,
2244
+ destination_catalog: d.destinationCatalog,
2245
+ destination_schema: d.destinationSchema,
2246
+ destination_table: d.destinationTable,
2247
+ table_configuration: d.tableConfiguration,
2248
+ }));
2249
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2250
+ export const marshalIngestionPipelineDefinition_SchemaSpecSchema = z
2251
+ .object({
2252
+ sourceCatalog: z.string().optional(),
2253
+ sourceSchema: z.string().optional(),
2254
+ destinationCatalog: z.string().optional(),
2255
+ destinationSchema: z.string().optional(),
2256
+ tableConfiguration: z
2257
+ .lazy(() => marshalIngestionPipelineDefinition_TableSpecificConfigSchema)
2258
+ .optional(),
2259
+ connectorOptions: z.lazy(() => marshalConnectorOptionsSchema).optional(),
2260
+ })
2261
+ .transform(d => ({
2262
+ source_catalog: d.sourceCatalog,
2263
+ source_schema: d.sourceSchema,
2264
+ destination_catalog: d.destinationCatalog,
2265
+ destination_schema: d.destinationSchema,
2266
+ table_configuration: d.tableConfiguration,
2267
+ connector_options: d.connectorOptions,
2268
+ }));
2269
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2270
+ export const marshalIngestionPipelineDefinition_TableSpecSchema = z
2271
+ .object({
2272
+ sourceCatalog: z.string().optional(),
2273
+ sourceSchema: z.string().optional(),
2274
+ sourceTable: z.string().optional(),
2275
+ destinationCatalog: z.string().optional(),
2276
+ destinationSchema: z.string().optional(),
2277
+ destinationTable: z.string().optional(),
2278
+ tableConfiguration: z
2279
+ .lazy(() => marshalIngestionPipelineDefinition_TableSpecificConfigSchema)
2280
+ .optional(),
2281
+ connectorOptions: z.lazy(() => marshalConnectorOptionsSchema).optional(),
2282
+ })
2283
+ .transform(d => ({
2284
+ source_catalog: d.sourceCatalog,
2285
+ source_schema: d.sourceSchema,
2286
+ source_table: d.sourceTable,
2287
+ destination_catalog: d.destinationCatalog,
2288
+ destination_schema: d.destinationSchema,
2289
+ destination_table: d.destinationTable,
2290
+ table_configuration: d.tableConfiguration,
2291
+ connector_options: d.connectorOptions,
2292
+ }));
2293
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2294
+ export const marshalIngestionPipelineDefinition_TableSpecificConfigSchema = z
2295
+ .object({
2296
+ scdType: z.enum(ScdType_ScdType).optional(),
2297
+ primaryKeys: z.array(z.string()).optional(),
2298
+ sequenceBy: z.array(z.string()).optional(),
2299
+ includeColumns: z.array(z.string()).optional(),
2300
+ excludeColumns: z.array(z.string()).optional(),
2301
+ salesforceIncludeFormulaFields: z.boolean().optional(),
2302
+ workdayReportParameters: z
2303
+ .lazy(() => marshalIngestionPipelineDefinition_WorkdayReportParametersSchema)
2304
+ .optional(),
2305
+ rowFilter: z.string().optional(),
2306
+ queryBasedConnectorConfig: z
2307
+ .lazy(() => marshalIngestionPipelineDefinition_TableSpecificConfig_QueryBasedConnectorConfigSchema)
2308
+ .optional(),
2309
+ autoFullRefreshPolicy: z
2310
+ .lazy(() => marshalAutoFullRefreshPolicySchema)
2311
+ .optional(),
2312
+ })
2313
+ .transform(d => ({
2314
+ scd_type: d.scdType,
2315
+ primary_keys: d.primaryKeys,
2316
+ sequence_by: d.sequenceBy,
2317
+ include_columns: d.includeColumns,
2318
+ exclude_columns: d.excludeColumns,
2319
+ salesforce_include_formula_fields: d.salesforceIncludeFormulaFields,
2320
+ workday_report_parameters: d.workdayReportParameters,
2321
+ row_filter: d.rowFilter,
2322
+ query_based_connector_config: d.queryBasedConnectorConfig,
2323
+ auto_full_refresh_policy: d.autoFullRefreshPolicy,
2324
+ }));
2325
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2326
+ export const marshalIngestionPipelineDefinition_TableSpecificConfig_QueryBasedConnectorConfigSchema = z
2327
+ .object({
2328
+ cursorColumns: z.array(z.string()).optional(),
2329
+ deletionCondition: z.string().optional(),
2330
+ hardDeletionSyncMinIntervalInSeconds: z.bigint().optional(),
2331
+ })
2332
+ .transform(d => ({
2333
+ cursor_columns: d.cursorColumns,
2334
+ deletion_condition: d.deletionCondition,
2335
+ hard_deletion_sync_min_interval_in_seconds: d.hardDeletionSyncMinIntervalInSeconds,
2336
+ }));
2337
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2338
+ export const marshalIngestionPipelineDefinition_WorkdayReportParametersSchema = z
2339
+ .object({
2340
+ incremental: z.boolean().optional(),
2341
+ reportParameters: z
2342
+ .array(z.lazy(() => marshalIngestionPipelineDefinition_WorkdayReportParameters_QueryKeyValueSchema))
2343
+ .optional(),
2344
+ parameters: z.record(z.string(), z.string()).optional(),
2345
+ })
2346
+ .transform(d => ({
2347
+ incremental: d.incremental,
2348
+ report_parameters: d.reportParameters,
2349
+ parameters: d.parameters,
2350
+ }));
2351
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2352
+ export const marshalIngestionPipelineDefinition_WorkdayReportParameters_QueryKeyValueSchema = z
2353
+ .object({
2354
+ key: z.string().optional(),
2355
+ value: z.string().optional(),
2356
+ })
2357
+ .transform(d => ({
2358
+ key: d.key,
2359
+ value: d.value,
2360
+ }));
2361
+ export const marshalJiraConnectorOptionsSchema = z
2362
+ .object({
2363
+ includeJiraSpaces: z.array(z.string()).optional(),
2364
+ })
2365
+ .transform(d => ({
2366
+ include_jira_spaces: d.includeJiraSpaces,
2367
+ }));
2368
+ export const marshalJsonTransformerOptionsSchema = z
2369
+ .object({
2370
+ asVariant: z.boolean().optional(),
2371
+ schema: z.string().optional(),
2372
+ schemaFilePath: z.string().optional(),
2373
+ schemaEvolutionMode: z
2374
+ .enum(FileIngestionOptions_SchemaEvolutionMode)
2375
+ .optional(),
2376
+ schemaHints: z.string().optional(),
2377
+ })
2378
+ .transform(d => ({
2379
+ as_variant: d.asVariant,
2380
+ schema: d.schema,
2381
+ schema_file_path: d.schemaFilePath,
2382
+ schema_evolution_mode: d.schemaEvolutionMode,
2383
+ schema_hints: d.schemaHints,
2384
+ }));
2385
+ export const marshalKafkaOptionsSchema = z
2386
+ .object({
2387
+ topics: z.array(z.string()).optional(),
2388
+ topicPattern: z.string().optional(),
2389
+ keyTransformer: z.lazy(() => marshalTransformerSchema).optional(),
2390
+ valueTransformer: z.lazy(() => marshalTransformerSchema).optional(),
2391
+ startingOffset: z.string().optional(),
2392
+ maxOffsetsPerTrigger: z.bigint().optional(),
2393
+ clientConfig: z.record(z.string(), z.string()).optional(),
2394
+ })
2395
+ .transform(d => ({
2396
+ topics: d.topics,
2397
+ topic_pattern: d.topicPattern,
2398
+ key_transformer: d.keyTransformer,
2399
+ value_transformer: d.valueTransformer,
2400
+ starting_offset: d.startingOffset,
2401
+ max_offsets_per_trigger: d.maxOffsetsPerTrigger,
2402
+ client_config: d.clientConfig,
2403
+ }));
2404
+ export const marshalManualTriggerSchema = z.object({});
2405
+ export const marshalMetaMarketingOptionsSchema = z
2406
+ .object({
2407
+ level: z.string().optional(),
2408
+ breakdowns: z.array(z.string()).optional(),
2409
+ actionBreakdowns: z.array(z.string()).optional(),
2410
+ actionReportTime: z.string().optional(),
2411
+ startDate: z.string().optional(),
2412
+ customInsightsLookbackWindow: z.number().optional(),
2413
+ timeIncrement: z.string().optional(),
2414
+ actionAttributionWindows: z.array(z.string()).optional(),
2415
+ })
2416
+ .transform(d => ({
2417
+ level: d.level,
2418
+ breakdowns: d.breakdowns,
2419
+ action_breakdowns: d.actionBreakdowns,
2420
+ action_report_time: d.actionReportTime,
2421
+ start_date: d.startDate,
2422
+ custom_insights_lookback_window: d.customInsightsLookbackWindow,
2423
+ time_increment: d.timeIncrement,
2424
+ action_attribution_windows: d.actionAttributionWindows,
2425
+ }));
2426
+ export const marshalNotebookLibrarySchema = z
2427
+ .object({
2428
+ path: z.string().optional(),
2429
+ })
2430
+ .transform(d => ({
2431
+ path: d.path,
2432
+ }));
2433
+ export const marshalNotificationsSchema = z
2434
+ .object({
2435
+ emailRecipients: z.array(z.string()).optional(),
2436
+ alerts: z.array(z.string()).optional(),
2437
+ })
2438
+ .transform(d => ({
2439
+ email_recipients: d.emailRecipients,
2440
+ alerts: d.alerts,
2441
+ }));
2442
+ export const marshalOperationTimeWindowSchema = z
2443
+ .object({
2444
+ startHour: z.number().optional(),
2445
+ daysOfWeek: z.array(z.enum(DayOfWeek)).optional(),
2446
+ timeZoneId: z.string().optional(),
2447
+ })
2448
+ .transform(d => ({
2449
+ start_hour: d.startHour,
2450
+ days_of_week: d.daysOfWeek,
2451
+ time_zone_id: d.timeZoneId,
2452
+ }));
2453
+ export const marshalOutlookOptionsSchema = z
2454
+ .object({
2455
+ folderFilter: z.array(z.string()).optional(),
2456
+ senderFilter: z.array(z.string()).optional(),
2457
+ subjectFilter: z.array(z.string()).optional(),
2458
+ startDate: z.string().optional(),
2459
+ bodyFormat: z.enum(OutlookBodyFormat).optional(),
2460
+ attachmentMode: z.enum(OutlookAttachmentMode).optional(),
2461
+ includeMailboxes: z.array(z.string()).optional(),
2462
+ includeFolders: z.array(z.string()).optional(),
2463
+ includeSenders: z.array(z.string()).optional(),
2464
+ includeSubjects: z.array(z.string()).optional(),
2465
+ })
2466
+ .transform(d => ({
2467
+ folder_filter: d.folderFilter,
2468
+ sender_filter: d.senderFilter,
2469
+ subject_filter: d.subjectFilter,
2470
+ start_date: d.startDate,
2471
+ body_format: d.bodyFormat,
2472
+ attachment_mode: d.attachmentMode,
2473
+ include_mailboxes: d.includeMailboxes,
2474
+ include_folders: d.includeFolders,
2475
+ include_senders: d.includeSenders,
2476
+ include_subjects: d.includeSubjects,
2477
+ }));
2478
+ export const marshalPathPatternSchema = z
2479
+ .object({
2480
+ include: z.string().optional(),
2481
+ })
2482
+ .transform(d => ({
2483
+ include: d.include,
2484
+ }));
2485
+ export const marshalPipelineClusterSchema = z
2486
+ .object({
2487
+ label: z.string().optional(),
2488
+ applyPolicyDefaultValues: z.boolean().optional(),
2489
+ sparkConf: z.record(z.string(), z.string()).optional(),
2490
+ awsAttributes: z.lazy(() => marshalPipelinesAwsAttributesSchema).optional(),
2491
+ azureAttributes: z
2492
+ .lazy(() => marshalPipelinesAzureAttributesSchema)
2493
+ .optional(),
2494
+ gcpAttributes: z.lazy(() => marshalPipelinesGcpAttributesSchema).optional(),
2495
+ nodeTypeId: z.string().optional(),
2496
+ driverNodeTypeId: z.string().optional(),
2497
+ sshPublicKeys: z.array(z.string()).optional(),
2498
+ customTags: z.record(z.string(), z.string()).optional(),
2499
+ clusterLogConf: z
2500
+ .lazy(() => marshalPipelinesClusterLogConfSchema)
2501
+ .optional(),
2502
+ sparkEnvVars: z.record(z.string(), z.string()).optional(),
2503
+ initScripts: z
2504
+ .array(z.lazy(() => marshalPipelinesInitScriptInfoSchema))
2505
+ .optional(),
2506
+ instancePoolId: z.string().optional(),
2507
+ policyId: z.string().optional(),
2508
+ enableLocalDiskEncryption: z.boolean().optional(),
2509
+ driverInstancePoolId: z.string().optional(),
2510
+ size: z
2511
+ .discriminatedUnion('$case', [
2512
+ z.object({ $case: z.literal('numWorkers'), numWorkers: z.number() }),
2513
+ z.object({
2514
+ $case: z.literal('autoscale'),
2515
+ autoscale: z.lazy(() => marshalPipelinesAutoScaleSchema),
2516
+ }),
2517
+ ])
2518
+ .optional(),
2519
+ })
2520
+ .transform(d => ({
2521
+ label: d.label,
2522
+ apply_policy_default_values: d.applyPolicyDefaultValues,
2523
+ spark_conf: d.sparkConf,
2524
+ aws_attributes: d.awsAttributes,
2525
+ azure_attributes: d.azureAttributes,
2526
+ gcp_attributes: d.gcpAttributes,
2527
+ node_type_id: d.nodeTypeId,
2528
+ driver_node_type_id: d.driverNodeTypeId,
2529
+ ssh_public_keys: d.sshPublicKeys,
2530
+ custom_tags: d.customTags,
2531
+ cluster_log_conf: d.clusterLogConf,
2532
+ spark_env_vars: d.sparkEnvVars,
2533
+ init_scripts: d.initScripts,
2534
+ instance_pool_id: d.instancePoolId,
2535
+ policy_id: d.policyId,
2536
+ enable_local_disk_encryption: d.enableLocalDiskEncryption,
2537
+ driver_instance_pool_id: d.driverInstancePoolId,
2538
+ ...(d.size?.$case === 'numWorkers' && { num_workers: d.size.numWorkers }),
2539
+ ...(d.size?.$case === 'autoscale' && { autoscale: d.size.autoscale }),
2540
+ }));
2541
+ export const marshalPipelineDeploymentSchema = z
2542
+ .object({
2543
+ kind: z.enum(DeploymentKind).optional(),
2544
+ metadataFilePath: z.string().optional(),
2545
+ deploymentId: z.string().optional(),
2546
+ versionId: z.string().optional(),
2547
+ })
2548
+ .transform(d => ({
2549
+ kind: d.kind,
2550
+ metadata_file_path: d.metadataFilePath,
2551
+ deployment_id: d.deploymentId,
2552
+ version_id: d.versionId,
2553
+ }));
2554
+ export const marshalPipelineLibrarySchema = z
2555
+ .object({
2556
+ lib: z
2557
+ .discriminatedUnion('$case', [
2558
+ z.object({ $case: z.literal('jar'), jar: z.string() }),
2559
+ z.object({
2560
+ $case: z.literal('maven'),
2561
+ maven: z.lazy(() => marshalPipelinesMavenLibrarySchema),
2562
+ }),
2563
+ z.object({ $case: z.literal('whl'), whl: z.string() }),
2564
+ z.object({
2565
+ $case: z.literal('notebook'),
2566
+ notebook: z.lazy(() => marshalNotebookLibrarySchema),
2567
+ }),
2568
+ z.object({
2569
+ $case: z.literal('file'),
2570
+ file: z.lazy(() => marshalNotebookLibrarySchema),
2571
+ }),
2572
+ z.object({
2573
+ $case: z.literal('glob'),
2574
+ glob: z.lazy(() => marshalPathPatternSchema),
2575
+ }),
2576
+ ])
2577
+ .optional(),
2578
+ })
2579
+ .transform(d => ({
2580
+ ...(d.lib?.$case === 'jar' && { jar: d.lib.jar }),
2581
+ ...(d.lib?.$case === 'maven' && { maven: d.lib.maven }),
2582
+ ...(d.lib?.$case === 'whl' && { whl: d.lib.whl }),
2583
+ ...(d.lib?.$case === 'notebook' && { notebook: d.lib.notebook }),
2584
+ ...(d.lib?.$case === 'file' && { file: d.lib.file }),
2585
+ ...(d.lib?.$case === 'glob' && { glob: d.lib.glob }),
2586
+ }));
2587
+ export const marshalPipelineTriggerSchema = z
2588
+ .object({
2589
+ trigger: z
2590
+ .discriminatedUnion('$case', [
2591
+ z.object({
2592
+ $case: z.literal('manual'),
2593
+ manual: z.lazy(() => marshalManualTriggerSchema),
2594
+ }),
2595
+ z.object({
2596
+ $case: z.literal('cron'),
2597
+ cron: z.lazy(() => marshalCronTriggerSchema),
2598
+ }),
2599
+ ])
2600
+ .optional(),
2601
+ })
2602
+ .transform(d => ({
2603
+ ...(d.trigger?.$case === 'manual' && { manual: d.trigger.manual }),
2604
+ ...(d.trigger?.$case === 'cron' && { cron: d.trigger.cron }),
2605
+ }));
2606
+ export const marshalPipelinesAutoScaleSchema = z
2607
+ .object({
2608
+ minWorkers: z.number().optional(),
2609
+ maxWorkers: z.number().optional(),
2610
+ mode: z.string().optional(),
2611
+ })
2612
+ .transform(d => ({
2613
+ min_workers: d.minWorkers,
2614
+ max_workers: d.maxWorkers,
2615
+ mode: d.mode,
2616
+ }));
2617
+ export const marshalPipelinesAwsAttributesSchema = z
2618
+ .object({
2619
+ firstOnDemand: z.number().optional(),
2620
+ availability: z.enum(PipelinesAwsAvailability).optional(),
2621
+ zoneId: z.string().optional(),
2622
+ instanceProfileArn: z.string().optional(),
2623
+ spotBidPricePercent: z.number().optional(),
2624
+ ebsVolumeType: z.enum(PipelinesEbsVolumeType).optional(),
2625
+ ebsVolumeCount: z.number().optional(),
2626
+ ebsVolumeSize: z.number().optional(),
2627
+ ebsVolumeIops: z.number().optional(),
2628
+ ebsVolumeThroughput: z.number().optional(),
2629
+ })
2630
+ .transform(d => ({
2631
+ first_on_demand: d.firstOnDemand,
2632
+ availability: d.availability,
2633
+ zone_id: d.zoneId,
2634
+ instance_profile_arn: d.instanceProfileArn,
2635
+ spot_bid_price_percent: d.spotBidPricePercent,
2636
+ ebs_volume_type: d.ebsVolumeType,
2637
+ ebs_volume_count: d.ebsVolumeCount,
2638
+ ebs_volume_size: d.ebsVolumeSize,
2639
+ ebs_volume_iops: d.ebsVolumeIops,
2640
+ ebs_volume_throughput: d.ebsVolumeThroughput,
2641
+ }));
2642
+ export const marshalPipelinesAzureAttributesSchema = z
2643
+ .object({
2644
+ firstOnDemand: z.number().optional(),
2645
+ availability: z.enum(PipelinesAzureAvailability).optional(),
2646
+ spotBidMaxPrice: z.number().optional(),
2647
+ })
2648
+ .transform(d => ({
2649
+ first_on_demand: d.firstOnDemand,
2650
+ availability: d.availability,
2651
+ spot_bid_max_price: d.spotBidMaxPrice,
2652
+ }));
2653
+ export const marshalPipelinesClusterLogConfSchema = z
2654
+ .object({
2655
+ storageInfo: z
2656
+ .discriminatedUnion('$case', [
2657
+ z.object({
2658
+ $case: z.literal('dbfs'),
2659
+ dbfs: z.lazy(() => marshalPipelinesDbfsStorageInfoSchema),
2660
+ }),
2661
+ ])
2662
+ .optional(),
2663
+ })
2664
+ .transform(d => ({
2665
+ ...(d.storageInfo?.$case === 'dbfs' && { dbfs: d.storageInfo.dbfs }),
2666
+ }));
2667
+ export const marshalPipelinesDbfsStorageInfoSchema = z
2668
+ .object({
2669
+ destination: z.string().optional(),
2670
+ })
2671
+ .transform(d => ({
2672
+ destination: d.destination,
2673
+ }));
2674
+ export const marshalPipelinesEnvironmentSchema = z
2675
+ .object({
2676
+ dependencies: z.array(z.string()).optional(),
2677
+ environmentVersion: z.string().optional(),
2678
+ })
2679
+ .transform(d => ({
2680
+ dependencies: d.dependencies,
2681
+ environment_version: d.environmentVersion,
2682
+ }));
2683
+ export const marshalPipelinesGcpAttributesSchema = z
2684
+ .object({
2685
+ googleServiceAccount: z.string().optional(),
2686
+ bootDiskSize: z.number().optional(),
2687
+ availability: z.enum(PipelinesGcpAvailability).optional(),
2688
+ zoneId: z.string().optional(),
2689
+ localSsdCount: z.number().optional(),
2690
+ })
2691
+ .transform(d => ({
2692
+ google_service_account: d.googleServiceAccount,
2693
+ boot_disk_size: d.bootDiskSize,
2694
+ availability: d.availability,
2695
+ zone_id: d.zoneId,
2696
+ local_ssd_count: d.localSsdCount,
2697
+ }));
2698
+ export const marshalPipelinesInitScriptInfoSchema = z
2699
+ .object({
2700
+ storageInfo: z
2701
+ .discriminatedUnion('$case', [
2702
+ z.object({
2703
+ $case: z.literal('dbfs'),
2704
+ dbfs: z.lazy(() => marshalPipelinesDbfsStorageInfoSchema),
2705
+ }),
2706
+ z.object({
2707
+ $case: z.literal('s3'),
2708
+ s3: z.lazy(() => marshalPipelinesS3StorageInfoSchema),
2709
+ }),
2710
+ ])
2711
+ .optional(),
2712
+ })
2713
+ .transform(d => ({
2714
+ ...(d.storageInfo?.$case === 'dbfs' && { dbfs: d.storageInfo.dbfs }),
2715
+ ...(d.storageInfo?.$case === 's3' && { s3: d.storageInfo.s3 }),
2716
+ }));
2717
+ export const marshalPipelinesJobRunAsSchema = z
2718
+ .object({
2719
+ identity: z
2720
+ .discriminatedUnion('$case', [
2721
+ z.object({ $case: z.literal('userName'), userName: z.string() }),
2722
+ z.object({
2723
+ $case: z.literal('servicePrincipalName'),
2724
+ servicePrincipalName: z.string(),
2725
+ }),
2726
+ ])
2727
+ .optional(),
2728
+ })
2729
+ .transform(d => ({
2730
+ ...(d.identity?.$case === 'userName' && { user_name: d.identity.userName }),
2731
+ ...(d.identity?.$case === 'servicePrincipalName' && {
2732
+ service_principal_name: d.identity.servicePrincipalName,
2733
+ }),
2734
+ }));
2735
+ export const marshalPipelinesMavenLibrarySchema = z
2736
+ .object({
2737
+ coordinates: z.string().optional(),
2738
+ repo: z.string().optional(),
2739
+ exclusions: z.array(z.string()).optional(),
2740
+ })
2741
+ .transform(d => ({
2742
+ coordinates: d.coordinates,
2743
+ repo: d.repo,
2744
+ exclusions: d.exclusions,
2745
+ }));
2746
+ export const marshalPipelinesS3StorageInfoSchema = z
2747
+ .object({
2748
+ destination: z.string().optional(),
2749
+ region: z.string().optional(),
2750
+ endpoint: z.string().optional(),
2751
+ enableEncryption: z.boolean().optional(),
2752
+ encryptionType: z.string().optional(),
2753
+ kmsKey: z.string().optional(),
2754
+ cannedAcl: z.string().optional(),
2755
+ })
2756
+ .transform(d => ({
2757
+ destination: d.destination,
2758
+ region: d.region,
2759
+ endpoint: d.endpoint,
2760
+ enable_encryption: d.enableEncryption,
2761
+ encryption_type: d.encryptionType,
2762
+ kms_key: d.kmsKey,
2763
+ canned_acl: d.cannedAcl,
2764
+ }));
2765
+ export const marshalPostgresCatalogConfigSchema = z
2766
+ .object({
2767
+ slotConfig: z.lazy(() => marshalPostgresSlotConfigSchema).optional(),
2768
+ })
2769
+ .transform(d => ({
2770
+ slot_config: d.slotConfig,
2771
+ }));
2772
+ export const marshalPostgresSlotConfigSchema = z
2773
+ .object({
2774
+ slotName: z.string().optional(),
2775
+ publicationName: z.string().optional(),
2776
+ })
2777
+ .transform(d => ({
2778
+ slot_name: d.slotName,
2779
+ publication_name: d.publicationName,
2780
+ }));
2781
+ export const marshalReplaceWhereOverrideSchema = z
2782
+ .object({
2783
+ flowName: z.string().optional(),
2784
+ predicateOverride: z.string().optional(),
2785
+ })
2786
+ .transform(d => ({
2787
+ flow_name: d.flowName,
2788
+ predicate_override: d.predicateOverride,
2789
+ }));
2790
+ export const marshalRestartWindowSchema = z
2791
+ .object({
2792
+ startHour: z.number().optional(),
2793
+ daysOfWeek: z.array(z.enum(DayOfWeek)).optional(),
2794
+ timeZoneId: z.string().optional(),
2795
+ })
2796
+ .transform(d => ({
2797
+ start_hour: d.startHour,
2798
+ days_of_week: d.daysOfWeek,
2799
+ time_zone_id: d.timeZoneId,
2800
+ }));
2801
+ export const marshalRewindDatasetSpecSchema = z
2802
+ .object({
2803
+ identifier: z.string().optional(),
2804
+ cascade: z.boolean().optional(),
2805
+ resetCheckpoints: z.boolean().optional(),
2806
+ })
2807
+ .transform(d => ({
2808
+ identifier: d.identifier,
2809
+ cascade: d.cascade,
2810
+ reset_checkpoints: d.resetCheckpoints,
2811
+ }));
2812
+ export const marshalRewindSpecSchema = z
2813
+ .object({
2814
+ rewindTimestamp: z.string().optional(),
2815
+ dryRun: z.boolean().optional(),
2816
+ datasets: z.array(z.lazy(() => marshalRewindDatasetSpecSchema)).optional(),
2817
+ })
2818
+ .transform(d => ({
2819
+ rewind_timestamp: d.rewindTimestamp,
2820
+ dry_run: d.dryRun,
2821
+ datasets: d.datasets,
2822
+ }));
2823
+ export const marshalSharepointOptionsSchema = z
2824
+ .object({
2825
+ url: z.string().optional(),
2826
+ entityType: z.enum(SharepointOptions_SharepointEntityType).optional(),
2827
+ fileIngestionOptions: z
2828
+ .lazy(() => marshalFileIngestionOptionsSchema)
2829
+ .optional(),
2830
+ })
2831
+ .transform(d => ({
2832
+ url: d.url,
2833
+ entity_type: d.entityType,
2834
+ file_ingestion_options: d.fileIngestionOptions,
2835
+ }));
2836
+ export const marshalSmartsheetOptionsSchema = z
2837
+ .object({
2838
+ enforceSchema: z.boolean().optional(),
2839
+ })
2840
+ .transform(d => ({
2841
+ enforce_schema: d.enforceSchema,
2842
+ }));
2843
+ export const marshalSourceCatalogConfigSchema = z
2844
+ .object({
2845
+ sourceCatalog: z.string().optional(),
2846
+ options: z
2847
+ .discriminatedUnion('$case', [
2848
+ z.object({
2849
+ $case: z.literal('postgres'),
2850
+ postgres: z.lazy(() => marshalPostgresCatalogConfigSchema),
2851
+ }),
2852
+ ])
2853
+ .optional(),
2854
+ })
2855
+ .transform(d => ({
2856
+ source_catalog: d.sourceCatalog,
2857
+ ...(d.options?.$case === 'postgres' && { postgres: d.options.postgres }),
2858
+ }));
2859
+ export const marshalSourceConfigSchema = z
2860
+ .object({
2861
+ catalog: z.lazy(() => marshalSourceCatalogConfigSchema).optional(),
2862
+ connectorConfig: z
2863
+ .discriminatedUnion('$case', [
2864
+ z.object({
2865
+ $case: z.literal('googleAdsConfig'),
2866
+ googleAdsConfig: z.lazy(() => marshalGoogleAdsConfigSchema),
2867
+ }),
2868
+ ])
2869
+ .optional(),
2870
+ })
2871
+ .transform(d => ({
2872
+ catalog: d.catalog,
2873
+ ...(d.connectorConfig?.$case === 'googleAdsConfig' && {
2874
+ google_ads_config: d.connectorConfig.googleAdsConfig,
2875
+ }),
2876
+ }));
2877
+ export const marshalStartUpdateRequestSchema = z
2878
+ .object({
2879
+ pipelineId: z.string().optional(),
2880
+ fullRefresh: z.boolean().optional(),
2881
+ cause: z.enum(UpdateCause).optional(),
2882
+ refreshSelection: z.array(z.string()).optional(),
2883
+ fullRefreshSelection: z.array(z.string()).optional(),
2884
+ resetCheckpointSelection: z.array(z.string()).optional(),
2885
+ validateOnly: z.boolean().optional(),
2886
+ rewindSpec: z.lazy(() => marshalRewindSpecSchema).optional(),
2887
+ parameters: z.record(z.string(), z.string()).optional(),
2888
+ replaceWhereOverrides: z
2889
+ .array(z.lazy(() => marshalReplaceWhereOverrideSchema))
2890
+ .optional(),
2891
+ })
2892
+ .transform(d => ({
2893
+ pipeline_id: d.pipelineId,
2894
+ full_refresh: d.fullRefresh,
2895
+ cause: d.cause,
2896
+ refresh_selection: d.refreshSelection,
2897
+ full_refresh_selection: d.fullRefreshSelection,
2898
+ reset_checkpoint_selection: d.resetCheckpointSelection,
2899
+ validate_only: d.validateOnly,
2900
+ rewind_spec: d.rewindSpec,
2901
+ parameters: d.parameters,
2902
+ replace_where_overrides: d.replaceWhereOverrides,
2903
+ }));
2904
+ export const marshalStopPipelineRequestSchema = z
2905
+ .object({
2906
+ pipelineId: z.string().optional(),
2907
+ })
2908
+ .transform(d => ({
2909
+ pipeline_id: d.pipelineId,
2910
+ }));
2911
+ export const marshalTikTokAdsOptionsSchema = z
2912
+ .object({
2913
+ lookbackWindowDays: z.number().optional(),
2914
+ syncStartDate: z.string().optional(),
2915
+ dimensions: z.array(z.string()).optional(),
2916
+ metrics: z.array(z.string()).optional(),
2917
+ reportType: z.enum(TikTokAdsOptions_TikTokReportType).optional(),
2918
+ dataLevel: z.enum(TikTokAdsOptions_TikTokDataLevel).optional(),
2919
+ queryLifetime: z.boolean().optional(),
2920
+ })
2921
+ .transform(d => ({
2922
+ lookback_window_days: d.lookbackWindowDays,
2923
+ sync_start_date: d.syncStartDate,
2924
+ dimensions: d.dimensions,
2925
+ metrics: d.metrics,
2926
+ report_type: d.reportType,
2927
+ data_level: d.dataLevel,
2928
+ query_lifetime: d.queryLifetime,
2929
+ }));
2930
+ export const marshalTransformerSchema = z
2931
+ .object({
2932
+ format: z.enum(Transformer_Format).optional(),
2933
+ config: z
2934
+ .discriminatedUnion('$case', [
2935
+ z.object({
2936
+ $case: z.literal('jsonOptions'),
2937
+ jsonOptions: z.lazy(() => marshalJsonTransformerOptionsSchema),
2938
+ }),
2939
+ ])
2940
+ .optional(),
2941
+ })
2942
+ .transform(d => ({
2943
+ format: d.format,
2944
+ ...(d.config?.$case === 'jsonOptions' && {
2945
+ json_options: d.config.jsonOptions,
2946
+ }),
2947
+ }));
2948
+ export const marshalZendeskSupportOptionsSchema = z
2949
+ .object({
2950
+ startDate: z.string().optional(),
2951
+ })
2952
+ .transform(d => ({
2953
+ start_date: d.startDate,
2954
+ }));
2955
+ //# sourceMappingURL=model.js.map