@databricks/sdk-networking 0.34.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/v1/model.js CHANGED
@@ -1,2428 +1,1568 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
- import { Temporal } from '@js-temporal/polyfill';
3
- import { FieldMask } from '@databricks/sdk-core/wkt';
4
- import { z } from 'zod';
1
+ import { z } from "zod";
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { FieldMask } from "@databricks/sdk-core/wkt";
4
+
5
+ //#region src/v1/model.ts
5
6
  /**
6
- * The target resources that are supported by Network Connectivity Config.
7
- * Note: some egress types can support general types that are not defined in EgressResourceType.
8
- * E.g.: Azure private endpoint supports private link enabled Azure services.
9
- */
10
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
11
- export const EgressResourceType = {
12
- EGRESS_RESOURCE_TYPE_UNSPECIFIED: 'EGRESS_RESOURCE_TYPE_UNSPECIFIED',
13
- AZURE_BLOB_STORAGE: 'AZURE_BLOB_STORAGE',
7
+ * The target resources that are supported by Network Connectivity Config.
8
+ * Note: some egress types can support general types that are not defined in EgressResourceType.
9
+ * E.g.: Azure private endpoint supports private link enabled Azure services.
10
+ */
11
+ const EgressResourceType = {
12
+ EGRESS_RESOURCE_TYPE_UNSPECIFIED: "EGRESS_RESOURCE_TYPE_UNSPECIFIED",
13
+ AZURE_BLOB_STORAGE: "AZURE_BLOB_STORAGE"
14
14
  };
15
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
16
- export const EndpointState = {
17
- /** The endpoint is pending approval. */
18
- PENDING: 'PENDING',
19
- /** The endpoint has been approved and is ready for use. */
20
- APPROVED: 'APPROVED',
21
- /** The endpoint encountered some issues during setup. */
22
- FAILED: 'FAILED',
23
- /** The endpoint was once established but later disconnected. This endpoint doesn't provide connectivity. */
24
- DISCONNECTED: 'DISCONNECTED',
15
+ const EndpointState = {
16
+ PENDING: "PENDING",
17
+ APPROVED: "APPROVED",
18
+ FAILED: "FAILED",
19
+ DISCONNECTED: "DISCONNECTED"
25
20
  };
26
21
  /**
27
- * Type of IP access list. Valid values are as follows and are case-sensitive:
28
- *
29
- * * `ALLOW`: An allow list. Include this IP or range.
30
- * * `BLOCK`: A block list. Exclude this IP or range. IP addresses in the block list are excluded even if they are included in an allow list.
31
- */
32
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
33
- export const IpAccessListType = {
34
- ALLOW: 'ALLOW',
35
- /** Blocks the associated CIDRs. */
36
- BLOCK: 'BLOCK',
22
+ * Type of IP access list. Valid values are as follows and are case-sensitive:
23
+ *
24
+ * * `ALLOW`: An allow list. Include this IP or range.
25
+ * * `BLOCK`: A block list. Exclude this IP or range. IP addresses in the block list are excluded even if they are included in an allow list.
26
+ */
27
+ const IpAccessListType = {
28
+ ALLOW: "ALLOW",
29
+ BLOCK: "BLOCK"
37
30
  };
38
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
39
- export const PrivateAccessLevel = {
40
- /** Only specifically listed endpoints can access my workspace */
41
- ENDPOINT: 'ENDPOINT',
42
- /** Only endpoints in the same account can access my workspace */
43
- ACCOUNT: 'ACCOUNT',
31
+ const PrivateAccessLevel = {
32
+ ENDPOINT: "ENDPOINT",
33
+ ACCOUNT: "ACCOUNT"
44
34
  };
45
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
46
- export const VpcEndpointUseCase = {
47
- WORKSPACE_ACCESS: 'WORKSPACE_ACCESS',
48
- DATAPLANE_RELAY_ACCESS: 'DATAPLANE_RELAY_ACCESS',
49
- /** General access, replaces WORKSPACE_ACCESS in customer-facing API. */
50
- GENERAL_ACCESS: 'GENERAL_ACCESS',
35
+ const VpcEndpointUseCase = {
36
+ WORKSPACE_ACCESS: "WORKSPACE_ACCESS",
37
+ DATAPLANE_RELAY_ACCESS: "DATAPLANE_RELAY_ACCESS",
38
+ GENERAL_ACCESS: "GENERAL_ACCESS"
51
39
  };
52
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
53
- export const VpcStatus = {
54
- VALID: 'VALID',
55
- BROKEN: 'BROKEN',
56
- UNATTACHED: 'UNATTACHED',
57
- /** Some optional tests are failing for this Vpc, see NetworkWarning for more information */
58
- WARNED: 'WARNED',
40
+ const VpcStatus = {
41
+ VALID: "VALID",
42
+ BROKEN: "BROKEN",
43
+ UNATTACHED: "UNATTACHED",
44
+ WARNED: "WARNED"
59
45
  };
60
46
  /**
61
- * Type of IP access list. Valid values are as follows and are case-sensitive:
62
- *
63
- * * `ALLOW`: An allow list. Include this IP or range.
64
- * * `BLOCK`: A block list. Exclude this IP or range. IP addresses in the block list are excluded even if they are included in an allow list.
65
- */
66
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
67
- export const AccountIpAccessListType_IpAccessListType = {
68
- /** Allows the associated CIDRs. */
69
- ALLOW: 'ALLOW',
70
- /** Blocks the associated CIDRs. */
71
- BLOCK: 'BLOCK',
47
+ * Type of IP access list. Valid values are as follows and are case-sensitive:
48
+ *
49
+ * * `ALLOW`: An allow list. Include this IP or range.
50
+ * * `BLOCK`: A block list. Exclude this IP or range. IP addresses in the block list are excluded even if they are included in an allow list.
51
+ */
52
+ const AccountIpAccessListType_IpAccessListType = {
53
+ ALLOW: "ALLOW",
54
+ BLOCK: "BLOCK"
72
55
  };
73
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
74
- export const EgressNetworkPolicy_NetworkAccessPolicy_InternetDestination_InternetDestinationType = {
75
- INTERNET_DESTINATION_TYPE_UNSPECIFIED: 'INTERNET_DESTINATION_TYPE_UNSPECIFIED',
76
- /** This is defined as `FQDN` in settings-policy/api/proto/messages.proto. Translation is done in accounts-lake-net-manager/src/util/NetworkPolicySettingUtil.scala. */
77
- DNS_NAME: 'DNS_NAME',
56
+ const EgressNetworkPolicy_NetworkAccessPolicy_InternetDestination_InternetDestinationType = {
57
+ INTERNET_DESTINATION_TYPE_UNSPECIFIED: "INTERNET_DESTINATION_TYPE_UNSPECIFIED",
58
+ DNS_NAME: "DNS_NAME"
78
59
  };
79
60
  /** The values should match the list of workloads used in networkconfig.proto */
80
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
81
- export const EgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcement_DryRunModeProductFilter = {
82
- DRY_RUN_MODE_PRODUCT_FILTER_UNSPECIFIED: 'DRY_RUN_MODE_PRODUCT_FILTER_UNSPECIFIED',
83
- /** SQL Warehouse product */
84
- DBSQL: 'DBSQL',
85
- /** Machine Learning serving product */
86
- ML_SERVING: 'ML_SERVING',
61
+ const EgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcement_DryRunModeProductFilter = {
62
+ DRY_RUN_MODE_PRODUCT_FILTER_UNSPECIFIED: "DRY_RUN_MODE_PRODUCT_FILTER_UNSPECIFIED",
63
+ DBSQL: "DBSQL",
64
+ ML_SERVING: "ML_SERVING"
87
65
  };
88
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
89
- export const EgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcement_EnforcementMode = {
90
- ENFORCEMENT_MODE_UNSPECIFIED: 'ENFORCEMENT_MODE_UNSPECIFIED',
91
- /** Blocks traffic that violates network policy. This is the default mode. */
92
- ENFORCED: 'ENFORCED',
93
- /** Logs violations without blocking traffic. Useful for testing policies before enforcement. */
94
- DRY_RUN: 'DRY_RUN',
66
+ const EgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcement_EnforcementMode = {
67
+ ENFORCEMENT_MODE_UNSPECIFIED: "ENFORCEMENT_MODE_UNSPECIFIED",
68
+ ENFORCED: "ENFORCED",
69
+ DRY_RUN: "DRY_RUN"
95
70
  };
96
71
  /**
97
- * At which level can <Databricks> and <Databricks> managed compute access Internet.
98
- * FULL_ACCESS: <Databricks> can access Internet. No blocking rules will apply.
99
- * RESTRICTED_ACCESS: <Databricks> can only access explicitly allowed internet and storage destinations,
100
- * as well as UC connections and external locations.
101
- */
102
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
103
- export const EgressNetworkPolicy_NetworkAccessPolicy_RestrictionMode = {
104
- RESTRICTION_MODE_UNSPECIFIED: 'RESTRICTION_MODE_UNSPECIFIED',
105
- FULL_ACCESS: 'FULL_ACCESS',
106
- RESTRICTED_ACCESS: 'RESTRICTED_ACCESS',
72
+ * At which level can <Databricks> and <Databricks> managed compute access Internet.
73
+ * FULL_ACCESS: <Databricks> can access Internet. No blocking rules will apply.
74
+ * RESTRICTED_ACCESS: <Databricks> can only access explicitly allowed internet and storage destinations,
75
+ * as well as UC connections and external locations.
76
+ */
77
+ const EgressNetworkPolicy_NetworkAccessPolicy_RestrictionMode = {
78
+ RESTRICTION_MODE_UNSPECIFIED: "RESTRICTION_MODE_UNSPECIFIED",
79
+ FULL_ACCESS: "FULL_ACCESS",
80
+ RESTRICTED_ACCESS: "RESTRICTED_ACCESS"
107
81
  };
108
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
109
- export const EgressNetworkPolicy_NetworkAccessPolicy_StorageDestination_StorageDestinationType = {
110
- STORAGE_DESTINATION_TYPE_UNSPECIFIED: 'STORAGE_DESTINATION_TYPE_UNSPECIFIED',
111
- /**
112
- * AWS_S3 can be used both for direct AWS S3 access and for cross-cloud access from Azure and GCP
113
- * When used in an Azure/GCP context, this indicates cross-cloud access from Azure/GCP to the specified S3 bucket
114
- */
115
- AWS_S3: 'AWS_S3',
116
- AZURE_STORAGE: 'AZURE_STORAGE',
117
- GOOGLE_CLOUD_STORAGE: 'GOOGLE_CLOUD_STORAGE',
118
- };
119
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
120
- export const EndpointUseCase_EndpointUseCase = {
121
- /** service-direct frontend private link connectivity. */
122
- SERVICE_DIRECT: 'SERVICE_DIRECT',
82
+ const EgressNetworkPolicy_NetworkAccessPolicy_StorageDestination_StorageDestinationType = {
83
+ STORAGE_DESTINATION_TYPE_UNSPECIFIED: "STORAGE_DESTINATION_TYPE_UNSPECIFIED",
84
+ AWS_S3: "AWS_S3",
85
+ AZURE_STORAGE: "AZURE_STORAGE",
86
+ GOOGLE_CLOUD_STORAGE: "GOOGLE_CLOUD_STORAGE"
123
87
  };
88
+ const EndpointUseCase_EndpointUseCase = { SERVICE_DIRECT: "SERVICE_DIRECT" };
124
89
  /**
125
- * Qualifies the breadth of API access permitted by an ingress network policy rule.
126
- * API_SCOPE_QUALIFIER_READ narrows matching to read-only variants of the listed scopes;
127
- * API_SCOPE_QUALIFIER_ALL matches any scope. When unset, scopes match exactly as listed.
128
- */
129
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
130
- export const IngressNetworkPolicy_ApiScopeQualifier = {
131
- /** Narrows matching to read-only variants of the listed scopes (e.g. GET/HEAD requests). */
132
- API_SCOPE_QUALIFIER_READ: 'API_SCOPE_QUALIFIER_READ',
133
- /** Matches any scope regardless of access level. */
134
- API_SCOPE_QUALIFIER_ALL: 'API_SCOPE_QUALIFIER_ALL',
90
+ * Qualifies the breadth of API access permitted by an ingress network policy rule.
91
+ * API_SCOPE_QUALIFIER_READ narrows matching to read-only variants of the listed scopes;
92
+ * API_SCOPE_QUALIFIER_ALL matches any scope. When unset, scopes match exactly as listed.
93
+ */
94
+ const IngressNetworkPolicy_ApiScopeQualifier = {
95
+ API_SCOPE_QUALIFIER_READ: "API_SCOPE_QUALIFIER_READ",
96
+ API_SCOPE_QUALIFIER_ALL: "API_SCOPE_QUALIFIER_ALL"
135
97
  };
136
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
137
- export const IngressNetworkPolicy_Authentication_IdentityType = {
138
- IDENTITY_TYPE_UNSPECIFIED: 'IDENTITY_TYPE_UNSPECIFIED',
139
- IDENTITY_TYPE_ALL_USERS: 'IDENTITY_TYPE_ALL_USERS',
140
- IDENTITY_TYPE_ALL_SERVICE_PRINCIPALS: 'IDENTITY_TYPE_ALL_SERVICE_PRINCIPALS',
141
- IDENTITY_TYPE_SELECTED_IDENTITIES: 'IDENTITY_TYPE_SELECTED_IDENTITIES',
98
+ const IngressNetworkPolicy_Authentication_IdentityType = {
99
+ IDENTITY_TYPE_UNSPECIFIED: "IDENTITY_TYPE_UNSPECIFIED",
100
+ IDENTITY_TYPE_ALL_USERS: "IDENTITY_TYPE_ALL_USERS",
101
+ IDENTITY_TYPE_ALL_SERVICE_PRINCIPALS: "IDENTITY_TYPE_ALL_SERVICE_PRINCIPALS",
102
+ IDENTITY_TYPE_SELECTED_IDENTITIES: "IDENTITY_TYPE_SELECTED_IDENTITIES"
142
103
  };
143
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
144
- export const IngressNetworkPolicy_AuthenticationIdentity_PrincipalType = {
145
- PRINCIPAL_TYPE_UNSPECIFIED: 'PRINCIPAL_TYPE_UNSPECIFIED',
146
- PRINCIPAL_TYPE_USER: 'PRINCIPAL_TYPE_USER',
147
- PRINCIPAL_TYPE_SERVICE_PRINCIPAL: 'PRINCIPAL_TYPE_SERVICE_PRINCIPAL',
104
+ const IngressNetworkPolicy_AuthenticationIdentity_PrincipalType = {
105
+ PRINCIPAL_TYPE_UNSPECIFIED: "PRINCIPAL_TYPE_UNSPECIFIED",
106
+ PRINCIPAL_TYPE_USER: "PRINCIPAL_TYPE_USER",
107
+ PRINCIPAL_TYPE_SERVICE_PRINCIPAL: "PRINCIPAL_TYPE_SERVICE_PRINCIPAL"
148
108
  };
149
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
150
- export const IngressNetworkPolicy_CrossWorkspaceAccess_RestrictionMode = {
151
- FULL_ACCESS: 'FULL_ACCESS',
152
- RESTRICTED_ACCESS: 'RESTRICTED_ACCESS',
109
+ const IngressNetworkPolicy_CrossWorkspaceAccess_RestrictionMode = {
110
+ FULL_ACCESS: "FULL_ACCESS",
111
+ RESTRICTED_ACCESS: "RESTRICTED_ACCESS",
112
+ LEGACY_MODE: "LEGACY_MODE"
153
113
  };
154
114
  /**
155
- * The restriction mode for private access. In ALLOW_ALL_REGISTERED_ENDPOINTS mode,
156
- * requests arriving through any endpoint registered to the account are allowed, and
157
- * deny rules and allow rules cannot be set. In RESTRICTED_ACCESS mode, access is
158
- * restricted based on deny rules and allow rules; requests that do not match any
159
- * allow rule are denied.
160
- */
161
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
162
- export const IngressNetworkPolicy_PrivateAccess_RestrictionMode = {
163
- /**
164
- * Allows requests arriving through any endpoint registered to the account.
165
- * Deny rules and allow rules cannot be set in this mode.
166
- */
167
- ALLOW_ALL_REGISTERED_ENDPOINTS: 'ALLOW_ALL_REGISTERED_ENDPOINTS',
168
- /**
169
- * Restricts access based on deny rules and allow rules. Requests that do not
170
- * match any allow rule are denied.
171
- */
172
- RESTRICTED_ACCESS: 'RESTRICTED_ACCESS',
115
+ * The restriction mode for private access. In ALLOW_ALL_REGISTERED_ENDPOINTS mode,
116
+ * requests arriving through any endpoint registered to the account are allowed, and
117
+ * deny rules and allow rules cannot be set. In RESTRICTED_ACCESS mode, access is
118
+ * restricted based on deny rules and allow rules; requests that do not match any
119
+ * allow rule are denied.
120
+ */
121
+ const IngressNetworkPolicy_PrivateAccess_RestrictionMode = {
122
+ ALLOW_ALL_REGISTERED_ENDPOINTS: "ALLOW_ALL_REGISTERED_ENDPOINTS",
123
+ RESTRICTED_ACCESS: "RESTRICTED_ACCESS"
173
124
  };
174
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
175
- export const IngressNetworkPolicy_PublicAccess_RestrictionMode = {
176
- FULL_ACCESS: 'FULL_ACCESS',
177
- RESTRICTED_ACCESS: 'RESTRICTED_ACCESS',
125
+ const IngressNetworkPolicy_PublicAccess_RestrictionMode = {
126
+ FULL_ACCESS: "FULL_ACCESS",
127
+ RESTRICTED_ACCESS: "RESTRICTED_ACCESS"
178
128
  };
179
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
180
- export const NccPrivateEndpointRule_PrivateLinkConnectionState = {
181
- PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED: 'PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED',
182
- /** The endpoint has been approved and is ready to use in your serverless compute resources. */
183
- ESTABLISHED: 'ESTABLISHED',
184
- /** Connection was rejected by the private link resource owner. */
185
- REJECTED: 'REJECTED',
186
- /**
187
- * Connection was removed by the private link resource owner, the private endpoint becomes informative and should
188
- * be deleted for clean-up.
189
- */
190
- DISCONNECTED: 'DISCONNECTED',
191
- /** If the endpoint was created but not approved in 14 days, it will be EXPIRED. */
192
- EXPIRED: 'EXPIRED',
193
- /** The endpoint has been created and pending approval. */
194
- PENDING: 'PENDING',
195
- /** The endpoint creation is in progress. */
196
- CREATING: 'CREATING',
197
- /** The endpoint creation failed. */
198
- CREATE_FAILED: 'CREATE_FAILED',
129
+ const NccPrivateEndpointRule_PrivateLinkConnectionState = {
130
+ PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED: "PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED",
131
+ ESTABLISHED: "ESTABLISHED",
132
+ REJECTED: "REJECTED",
133
+ DISCONNECTED: "DISCONNECTED",
134
+ EXPIRED: "EXPIRED",
135
+ PENDING: "PENDING",
136
+ CREATING: "CREATING",
137
+ CREATE_FAILED: "CREATE_FAILED"
199
138
  };
200
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
201
- export const NetworkConnectivityConfigAwsPrivateEndpointRule_PrivateLinkConnectionState = {
202
- PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED: 'PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED',
203
- /** The endpoint has been approved and is ready to use in your serverless compute resources. */
204
- ESTABLISHED: 'ESTABLISHED',
205
- /** Connection was rejected by the private link resource owner. */
206
- REJECTED: 'REJECTED',
207
- /**
208
- * Connection was removed by the private link resource owner, the private endpoint becomes informative and should
209
- * be deleted for clean-up.
210
- */
211
- DISCONNECTED: 'DISCONNECTED',
212
- /** If the endpoint is created but not approved in 14 days, it is EXPIRED. */
213
- EXPIRED: 'EXPIRED',
214
- /** The endpoint has been created and pending approval. */
215
- PENDING: 'PENDING',
216
- /** The endpoint creation is in progress. */
217
- CREATING: 'CREATING',
218
- /** The endpoint creation failed. */
219
- CREATE_FAILED: 'CREATE_FAILED',
139
+ const NetworkConnectivityConfigAwsPrivateEndpointRule_PrivateLinkConnectionState = {
140
+ PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED: "PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED",
141
+ ESTABLISHED: "ESTABLISHED",
142
+ REJECTED: "REJECTED",
143
+ DISCONNECTED: "DISCONNECTED",
144
+ EXPIRED: "EXPIRED",
145
+ PENDING: "PENDING",
146
+ CREATING: "CREATING",
147
+ CREATE_FAILED: "CREATE_FAILED"
220
148
  };
221
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
222
- export const NetworkConnectivityConfigAzurePrivateEndpointRule_PrivateLinkConnectionState = {
223
- PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED: 'PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED',
224
- /** The endpoint has been created and pending approval. */
225
- INIT: 'INIT',
226
- /** The endpoint has been approved and is ready to use in your serverless compute resources. */
227
- ESTABLISHED: 'ESTABLISHED',
228
- /** Connection was rejected by the private link resource owner. */
229
- REJECTED: 'REJECTED',
230
- /**
231
- * Connection was removed by the private link resource owner, the private endpoint becomes informative and should
232
- * be deleted for clean-up.
233
- */
234
- DISCONNECTED: 'DISCONNECTED',
235
- /** If the endpoint was created but not approved in 14 days, it will be EXPIRED. */
236
- EXPIRED: 'EXPIRED',
237
- /** The endpoint has been created and pending approval. */
238
- PENDING: 'PENDING',
239
- /** The endpoint creation is in progress. */
240
- CREATING: 'CREATING',
241
- /** The endpoint creation failed. */
242
- CREATE_FAILED: 'CREATE_FAILED',
149
+ const NetworkConnectivityConfigAzurePrivateEndpointRule_PrivateLinkConnectionState = {
150
+ PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED: "PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED",
151
+ INIT: "INIT",
152
+ ESTABLISHED: "ESTABLISHED",
153
+ REJECTED: "REJECTED",
154
+ DISCONNECTED: "DISCONNECTED",
155
+ EXPIRED: "EXPIRED",
156
+ PENDING: "PENDING",
157
+ CREATING: "CREATING",
158
+ CREATE_FAILED: "CREATE_FAILED"
243
159
  };
244
- export const unmarshalAccountIpAccessListSchema = z
245
- .object({
246
- list_id: z.string().optional(),
247
- label: z.string().optional(),
248
- ip_addresses: z.array(z.string()).optional(),
249
- address_count: z.number().optional(),
250
- list_type: z.string().optional(),
251
- created_at: z
252
- .union([z.number(), z.bigint()])
253
- .transform(v => BigInt(v))
254
- .optional(),
255
- created_by: z
256
- .union([z.number(), z.bigint()])
257
- .transform(v => BigInt(v))
258
- .optional(),
259
- updated_at: z
260
- .union([z.number(), z.bigint()])
261
- .transform(v => BigInt(v))
262
- .optional(),
263
- updated_by: z
264
- .union([z.number(), z.bigint()])
265
- .transform(v => BigInt(v))
266
- .optional(),
267
- enabled: z.boolean().optional(),
268
- })
269
- .transform(d => ({
270
- listId: d.list_id,
271
- label: d.label,
272
- ipAddresses: d.ip_addresses,
273
- addressCount: d.address_count,
274
- listType: d.list_type,
275
- createdAt: d.created_at,
276
- createdBy: d.created_by,
277
- updatedAt: d.updated_at,
278
- updatedBy: d.updated_by,
279
- enabled: d.enabled,
280
- }));
281
- export const unmarshalAccountNetworkPolicySchema = z
282
- .object({
283
- network_policy_id: z.string().optional(),
284
- account_id: z.string().optional(),
285
- egress: z.lazy(() => unmarshalEgressNetworkPolicySchema).optional(),
286
- ingress: z.lazy(() => unmarshalIngressNetworkPolicySchema).optional(),
287
- ingress_dry_run: z
288
- .lazy(() => unmarshalIngressNetworkPolicySchema)
289
- .optional(),
290
- })
291
- .transform(d => ({
292
- networkPolicyId: d.network_policy_id,
293
- accountId: d.account_id,
294
- egress: d.egress,
295
- ingress: d.ingress,
296
- ingressDryRun: d.ingress_dry_run,
297
- }));
298
- export const unmarshalAwsVpcEndpointInfoSchema = z
299
- .object({
300
- aws_vpc_endpoint_id: z.string().optional(),
301
- aws_endpoint_service_id: z.string().optional(),
302
- aws_account_id: z.string().optional(),
303
- })
304
- .transform(d => ({
305
- awsVpcEndpointId: d.aws_vpc_endpoint_id,
306
- awsEndpointServiceId: d.aws_endpoint_service_id,
307
- awsAccountId: d.aws_account_id,
308
- }));
309
- export const unmarshalAzurePrivateEndpointInfoSchema = z
310
- .object({
311
- private_endpoint_name: z.string().optional(),
312
- private_endpoint_resource_guid: z.string().optional(),
313
- private_endpoint_resource_id: z.string().optional(),
314
- private_link_service_id: z.string().optional(),
315
- })
316
- .transform(d => ({
317
- privateEndpointName: d.private_endpoint_name,
318
- privateEndpointResourceGuid: d.private_endpoint_resource_guid,
319
- privateEndpointResourceId: d.private_endpoint_resource_id,
320
- privateLinkServiceId: d.private_link_service_id,
321
- }));
322
- export const unmarshalCreateAccountIpAccessListResponseSchema = z
323
- .object({
324
- ip_access_list: z
325
- .lazy(() => unmarshalAccountIpAccessListSchema)
326
- .optional(),
327
- })
328
- .transform(d => ({
329
- ipAccessList: d.ip_access_list,
330
- }));
331
- export const unmarshalCreateIpAccessListResponseSchema = z
332
- .object({
333
- ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional(),
334
- })
335
- .transform(d => ({
336
- ipAccessList: d.ip_access_list,
337
- }));
338
- export const unmarshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema = z
339
- .object({
340
- default_rules: z
341
- .lazy(() => unmarshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema)
342
- .optional(),
343
- target_rules: z
344
- .lazy(() => unmarshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema)
345
- .optional(),
346
- })
347
- .transform(d => ({
348
- defaultRules: d.default_rules,
349
- targetRules: d.target_rules,
350
- }));
351
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
352
- export const unmarshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema = z
353
- .object({
354
- azure_private_endpoint_rules: z
355
- .array(z.lazy(() => unmarshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema))
356
- .optional(),
357
- aws_private_endpoint_rules: z
358
- .array(z.lazy(() => unmarshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema))
359
- .optional(),
360
- })
361
- .transform(d => ({
362
- azurePrivateEndpointRules: d.azure_private_endpoint_rules,
363
- awsPrivateEndpointRules: d.aws_private_endpoint_rules,
364
- }));
365
- export const unmarshalDeleteAccountIpAccessListResponseSchema = z.object({});
366
- export const unmarshalDeleteIpAccessListResponseSchema = z.object({});
367
- export const unmarshalEgressNetworkPolicySchema = z
368
- .object({
369
- network_access: z
370
- .lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicySchema)
371
- .optional(),
372
- })
373
- .transform(d => ({
374
- networkAccess: d.network_access,
375
- }));
376
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
377
- export const unmarshalEgressNetworkPolicy_NetworkAccessPolicySchema = z
378
- .object({
379
- restriction_mode: z.string().optional(),
380
- allowed_internet_destinations: z
381
- .array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema))
382
- .optional(),
383
- allowed_storage_destinations: z
384
- .array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema))
385
- .optional(),
386
- policy_enforcement: z
387
- .lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema)
388
- .optional(),
389
- blocked_internet_destinations: z
390
- .array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema))
391
- .optional(),
392
- allowed_databricks_destinations: z
393
- .array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema))
394
- .optional(),
395
- })
396
- .transform(d => ({
397
- restrictionMode: d.restriction_mode,
398
- allowedInternetDestinations: d.allowed_internet_destinations,
399
- allowedStorageDestinations: d.allowed_storage_destinations,
400
- policyEnforcement: d.policy_enforcement,
401
- blockedInternetDestinations: d.blocked_internet_destinations,
402
- allowedDatabricksDestinations: d.allowed_databricks_destinations,
403
- }));
404
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
405
- export const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema = z
406
- .object({
407
- workspace_ids: z
408
- .array(z.union([z.number(), z.bigint()]).transform(v => BigInt(v)))
409
- .optional(),
410
- })
411
- .transform(d => ({
412
- workspaceIds: d.workspace_ids,
413
- }));
414
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
415
- export const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema = z
416
- .object({
417
- destination: z.string().optional(),
418
- internet_destination_type: z.string().optional(),
419
- })
420
- .transform(d => ({
421
- destination: d.destination,
422
- internetDestinationType: d.internet_destination_type,
423
- }));
424
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
425
- export const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema = z
426
- .object({
427
- enforcement_mode: z.string().optional(),
428
- dry_run_mode_product_filter: z.array(z.string()).optional(),
429
- })
430
- .transform(d => ({
431
- enforcementMode: d.enforcement_mode,
432
- dryRunModeProductFilter: d.dry_run_mode_product_filter,
433
- }));
434
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
435
- export const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema = z
436
- .object({
437
- bucket_name: z.string().optional(),
438
- region: z.string().optional(),
439
- storage_destination_type: z.string().optional(),
440
- azure_storage_account: z.string().optional(),
441
- azure_storage_service: z.string().optional(),
442
- })
443
- .transform(d => ({
444
- bucketName: d.bucket_name,
445
- region: d.region,
446
- storageDestinationType: d.storage_destination_type,
447
- azureStorageAccount: d.azure_storage_account,
448
- azureStorageService: d.azure_storage_service,
449
- }));
450
- export const unmarshalEndpointSchema = z
451
- .object({
452
- name: z.string().optional(),
453
- endpoint_id: z.string().optional(),
454
- account_id: z.string().optional(),
455
- display_name: z.string().optional(),
456
- use_case: z.string().optional(),
457
- region: z.string().optional(),
458
- state: z.string().optional(),
459
- azure_private_endpoint_info: z
460
- .lazy(() => unmarshalAzurePrivateEndpointInfoSchema)
461
- .optional(),
462
- aws_vpc_endpoint_info: z
463
- .lazy(() => unmarshalAwsVpcEndpointInfoSchema)
464
- .optional(),
465
- gcp_psc_endpoint_info: z
466
- .lazy(() => unmarshalGcpPscEndpointInfoSchema)
467
- .optional(),
468
- create_time: z
469
- .string()
470
- .transform(s => Temporal.Instant.from(s))
471
- .optional(),
472
- })
473
- .transform(d => ({
474
- name: d.name,
475
- endpointId: d.endpoint_id,
476
- accountId: d.account_id,
477
- displayName: d.display_name,
478
- useCase: d.use_case,
479
- region: d.region,
480
- state: d.state,
481
- endpointInfo: d.azure_private_endpoint_info !== undefined
482
- ? {
483
- $case: 'azurePrivateEndpointInfo',
484
- azurePrivateEndpointInfo: d.azure_private_endpoint_info,
485
- }
486
- : d.aws_vpc_endpoint_info !== undefined
487
- ? {
488
- $case: 'awsVpcEndpointInfo',
489
- awsVpcEndpointInfo: d.aws_vpc_endpoint_info,
490
- }
491
- : d.gcp_psc_endpoint_info !== undefined
492
- ? {
493
- $case: 'gcpPscEndpointInfo',
494
- gcpPscEndpointInfo: d.gcp_psc_endpoint_info,
495
- }
496
- : undefined,
497
- createTime: d.create_time,
498
- }));
499
- export const unmarshalGcpEndpointSchema = z
500
- .object({
501
- psc_endpoint_uri: z.string().optional(),
502
- service_attachment: z.string().optional(),
503
- })
504
- .transform(d => ({
505
- pscEndpointUri: d.psc_endpoint_uri,
506
- targetServices: d.service_attachment !== undefined
507
- ? {
508
- $case: 'serviceAttachment',
509
- serviceAttachment: d.service_attachment,
510
- }
511
- : undefined,
512
- }));
513
- export const unmarshalGcpNetworkInfoSchema = z
514
- .object({
515
- network_project_id: z.string().optional(),
516
- vpc_id: z.string().optional(),
517
- subnet_id: z.string().optional(),
518
- subnet_region: z.string().optional(),
519
- pod_ip_range_name: z.string().optional(),
520
- service_ip_range_name: z.string().optional(),
521
- })
522
- .transform(d => ({
523
- networkProjectId: d.network_project_id,
524
- vpcId: d.vpc_id,
525
- subnetId: d.subnet_id,
526
- subnetRegion: d.subnet_region,
527
- podIpRangeName: d.pod_ip_range_name,
528
- serviceIpRangeName: d.service_ip_range_name,
529
- }));
530
- export const unmarshalGcpPscEndpointInfoSchema = z
531
- .object({
532
- psc_connection_id: z.string().optional(),
533
- project_id: z.string().optional(),
534
- psc_endpoint: z.string().optional(),
535
- endpoint_region: z.string().optional(),
536
- service_attachment_id: z.string().optional(),
537
- })
538
- .transform(d => ({
539
- pscConnectionId: d.psc_connection_id,
540
- projectId: d.project_id,
541
- pscEndpoint: d.psc_endpoint,
542
- endpointRegion: d.endpoint_region,
543
- serviceAttachmentId: d.service_attachment_id,
544
- }));
545
- export const unmarshalGcpVpcEndpointInfoSchema = z
546
- .object({
547
- psc_connection_id: z.string().optional(),
548
- project_id: z.string().optional(),
549
- psc_endpoint_name: z.string().optional(),
550
- endpoint_region: z.string().optional(),
551
- service_attachment_id: z.string().optional(),
552
- })
553
- .transform(d => ({
554
- pscConnectionId: d.psc_connection_id,
555
- projectId: d.project_id,
556
- pscEndpointName: d.psc_endpoint_name,
557
- endpointRegion: d.endpoint_region,
558
- serviceAttachmentId: d.service_attachment_id,
559
- }));
560
- export const unmarshalGetAccountIpAccessListResponseSchema = z
561
- .object({
562
- ip_access_list: z
563
- .lazy(() => unmarshalAccountIpAccessListSchema)
564
- .optional(),
565
- })
566
- .transform(d => ({
567
- ipAccessList: d.ip_access_list,
568
- }));
569
- export const unmarshalGetIpAccessListResponseSchema = z
570
- .object({
571
- ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional(),
572
- })
573
- .transform(d => ({
574
- ipAccessList: d.ip_access_list,
575
- }));
576
- export const unmarshalIngressNetworkPolicySchema = z
577
- .object({
578
- public_access: z
579
- .lazy(() => unmarshalIngressNetworkPolicy_PublicAccessSchema)
580
- .optional(),
581
- private_access: z
582
- .lazy(() => unmarshalIngressNetworkPolicy_PrivateAccessSchema)
583
- .optional(),
584
- cross_workspace_access: z
585
- .lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceAccessSchema)
586
- .optional(),
587
- })
588
- .transform(d => ({
589
- publicAccess: d.public_access,
590
- privateAccess: d.private_access,
591
- crossWorkspaceAccess: d.cross_workspace_access,
592
- }));
593
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
594
- export const unmarshalIngressNetworkPolicy_AccountApiDestinationSchema = z
595
- .object({
596
- scopes: z.array(z.string()).optional(),
597
- scope_qualifier: z.string().optional(),
598
- })
599
- .transform(d => ({
600
- scopes: d.scopes,
601
- scopeQualifier: d.scope_qualifier,
602
- }));
603
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
604
- export const unmarshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema = z
605
- .object({
606
- all_destinations: z.boolean().optional(),
607
- })
608
- .transform(d => ({
609
- allDestinations: d.all_destinations,
610
- }));
611
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
612
- export const unmarshalIngressNetworkPolicy_AccountUiDestinationSchema = z
613
- .object({
614
- all_destinations: z.boolean().optional(),
615
- })
616
- .transform(d => ({
617
- allDestinations: d.all_destinations,
618
- }));
619
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
620
- export const unmarshalIngressNetworkPolicy_AppsRuntimeDestinationSchema = z
621
- .object({
622
- all_destinations: z.boolean().optional(),
623
- })
624
- .transform(d => ({
625
- allDestinations: d.all_destinations,
626
- }));
627
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
628
- export const unmarshalIngressNetworkPolicy_AuthenticationSchema = z
629
- .object({
630
- identity_type: z.string().optional(),
631
- identities: z
632
- .array(z.lazy(() => unmarshalIngressNetworkPolicy_AuthenticationIdentitySchema))
633
- .optional(),
634
- })
635
- .transform(d => ({
636
- identityType: d.identity_type,
637
- identities: d.identities,
638
- }));
639
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
640
- export const unmarshalIngressNetworkPolicy_AuthenticationIdentitySchema = z
641
- .object({
642
- principal_type: z.string().optional(),
643
- principal_id: z
644
- .union([z.number(), z.bigint()])
645
- .transform(v => BigInt(v))
646
- .optional(),
647
- })
648
- .transform(d => ({
649
- principalType: d.principal_type,
650
- principalId: d.principal_id,
651
- }));
652
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
653
- export const unmarshalIngressNetworkPolicy_CrossWorkspaceAccessSchema = z
654
- .object({
655
- restriction_mode: z.string().optional(),
656
- deny_rules: z
657
- .array(z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema))
658
- .optional(),
659
- allow_rules: z
660
- .array(z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema))
661
- .optional(),
662
- })
663
- .transform(d => ({
664
- restrictionMode: d.restriction_mode,
665
- denyRules: d.deny_rules,
666
- allowRules: d.allow_rules,
667
- }));
668
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
669
- export const unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema = z
670
- .object({
671
- origin: z
672
- .lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema)
673
- .optional(),
674
- destination: z
675
- .lazy(() => unmarshalIngressNetworkPolicy_RequestDestinationSchema)
676
- .optional(),
677
- authentication: z
678
- .lazy(() => unmarshalIngressNetworkPolicy_AuthenticationSchema)
679
- .optional(),
680
- label: z.string().optional(),
681
- })
682
- .transform(d => ({
683
- origin: d.origin,
684
- destination: d.destination,
685
- authentication: d.authentication,
686
- label: d.label,
687
- }));
688
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
689
- export const unmarshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema = z
690
- .object({
691
- all_source_workspaces: z.boolean().optional(),
692
- selected_workspaces: z
693
- .lazy(() => unmarshalIngressNetworkPolicy_WorkspaceIdListSchema)
694
- .optional(),
695
- })
696
- .transform(d => ({
697
- source: d.all_source_workspaces !== undefined
698
- ? {
699
- $case: 'allSourceWorkspaces',
700
- allSourceWorkspaces: d.all_source_workspaces,
701
- }
702
- : d.selected_workspaces !== undefined
703
- ? {
704
- $case: 'selectedWorkspaces',
705
- selectedWorkspaces: d.selected_workspaces,
706
- }
707
- : undefined,
708
- }));
709
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
710
- export const unmarshalIngressNetworkPolicy_EndpointsSchema = z
711
- .object({
712
- endpoint_ids: z.array(z.string()).optional(),
713
- })
714
- .transform(d => ({
715
- endpointIds: d.endpoint_ids,
716
- }));
717
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
718
- export const unmarshalIngressNetworkPolicy_IpRangesSchema = z
719
- .object({
720
- ip_ranges: z.array(z.string()).optional(),
721
- })
722
- .transform(d => ({
723
- ipRanges: d.ip_ranges,
724
- }));
725
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
726
- export const unmarshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema = z
727
- .object({
728
- all_destinations: z.boolean().optional(),
729
- })
730
- .transform(d => ({
731
- allDestinations: d.all_destinations,
732
- }));
733
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
734
- export const unmarshalIngressNetworkPolicy_PrivateAccessSchema = z
735
- .object({
736
- restriction_mode: z.string().optional(),
737
- deny_rules: z
738
- .array(z.lazy(() => unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema))
739
- .optional(),
740
- allow_rules: z
741
- .array(z.lazy(() => unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema))
742
- .optional(),
743
- })
744
- .transform(d => ({
745
- restrictionMode: d.restriction_mode,
746
- denyRules: d.deny_rules,
747
- allowRules: d.allow_rules,
748
- }));
749
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
750
- export const unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema = z
751
- .object({
752
- origin: z
753
- .lazy(() => unmarshalIngressNetworkPolicy_PrivateRequestOriginSchema)
754
- .optional(),
755
- destination: z
756
- .lazy(() => unmarshalIngressNetworkPolicy_RequestDestinationSchema)
757
- .optional(),
758
- authentication: z
759
- .lazy(() => unmarshalIngressNetworkPolicy_AuthenticationSchema)
760
- .optional(),
761
- label: z.string().optional(),
762
- })
763
- .transform(d => ({
764
- origin: d.origin,
765
- destination: d.destination,
766
- authentication: d.authentication,
767
- label: d.label,
768
- }));
769
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
770
- export const unmarshalIngressNetworkPolicy_PrivateRequestOriginSchema = z
771
- .object({
772
- endpoints: z
773
- .lazy(() => unmarshalIngressNetworkPolicy_EndpointsSchema)
774
- .optional(),
775
- all_registered_endpoints: z.boolean().optional(),
776
- azure_workspace_private_link: z.boolean().optional(),
777
- all_private_access: z.boolean().optional(),
778
- })
779
- .transform(d => ({
780
- source: d.endpoints !== undefined
781
- ? { $case: 'endpoints', endpoints: d.endpoints }
782
- : d.all_registered_endpoints !== undefined
783
- ? {
784
- $case: 'allRegisteredEndpoints',
785
- allRegisteredEndpoints: d.all_registered_endpoints,
786
- }
787
- : d.azure_workspace_private_link !== undefined
788
- ? {
789
- $case: 'azureWorkspacePrivateLink',
790
- azureWorkspacePrivateLink: d.azure_workspace_private_link,
791
- }
792
- : d.all_private_access !== undefined
793
- ? {
794
- $case: 'allPrivateAccess',
795
- allPrivateAccess: d.all_private_access,
796
- }
797
- : undefined,
798
- }));
799
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
800
- export const unmarshalIngressNetworkPolicy_PublicAccessSchema = z
801
- .object({
802
- restriction_mode: z.string().optional(),
803
- deny_rules: z
804
- .array(z.lazy(() => unmarshalIngressNetworkPolicy_PublicIngressRuleSchema))
805
- .optional(),
806
- allow_rules: z
807
- .array(z.lazy(() => unmarshalIngressNetworkPolicy_PublicIngressRuleSchema))
808
- .optional(),
809
- })
810
- .transform(d => ({
811
- restrictionMode: d.restriction_mode,
812
- denyRules: d.deny_rules,
813
- allowRules: d.allow_rules,
814
- }));
815
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
816
- export const unmarshalIngressNetworkPolicy_PublicIngressRuleSchema = z
817
- .object({
818
- origin: z
819
- .lazy(() => unmarshalIngressNetworkPolicy_PublicRequestOriginSchema)
820
- .optional(),
821
- destination: z
822
- .lazy(() => unmarshalIngressNetworkPolicy_RequestDestinationSchema)
823
- .optional(),
824
- authentication: z
825
- .lazy(() => unmarshalIngressNetworkPolicy_AuthenticationSchema)
826
- .optional(),
827
- label: z.string().optional(),
828
- })
829
- .transform(d => ({
830
- origin: d.origin,
831
- destination: d.destination,
832
- authentication: d.authentication,
833
- label: d.label,
834
- }));
835
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
836
- export const unmarshalIngressNetworkPolicy_PublicRequestOriginSchema = z
837
- .object({
838
- all_ip_ranges: z.boolean().optional(),
839
- included_ip_ranges: z
840
- .lazy(() => unmarshalIngressNetworkPolicy_IpRangesSchema)
841
- .optional(),
842
- excluded_ip_ranges: z
843
- .lazy(() => unmarshalIngressNetworkPolicy_IpRangesSchema)
844
- .optional(),
845
- })
846
- .transform(d => ({
847
- source: d.all_ip_ranges !== undefined
848
- ? { $case: 'allIpRanges', allIpRanges: d.all_ip_ranges }
849
- : d.included_ip_ranges !== undefined
850
- ? {
851
- $case: 'includedIpRanges',
852
- includedIpRanges: d.included_ip_ranges,
853
- }
854
- : d.excluded_ip_ranges !== undefined
855
- ? {
856
- $case: 'excludedIpRanges',
857
- excludedIpRanges: d.excluded_ip_ranges,
858
- }
859
- : undefined,
860
- }));
861
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
862
- export const unmarshalIngressNetworkPolicy_RequestDestinationSchema = z
863
- .object({
864
- all_destinations: z.boolean().optional(),
865
- workspace_ui: z
866
- .lazy(() => unmarshalIngressNetworkPolicy_WorkspaceUiDestinationSchema)
867
- .optional(),
868
- workspace_api: z
869
- .lazy(() => unmarshalIngressNetworkPolicy_WorkspaceApiDestinationSchema)
870
- .optional(),
871
- apps_runtime: z
872
- .lazy(() => unmarshalIngressNetworkPolicy_AppsRuntimeDestinationSchema)
873
- .optional(),
874
- lakebase_runtime: z
875
- .lazy(() => unmarshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema)
876
- .optional(),
877
- account_ui: z
878
- .lazy(() => unmarshalIngressNetworkPolicy_AccountUiDestinationSchema)
879
- .optional(),
880
- account_api: z
881
- .lazy(() => unmarshalIngressNetworkPolicy_AccountApiDestinationSchema)
882
- .optional(),
883
- account_databricks_one: z
884
- .lazy(() => unmarshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema)
885
- .optional(),
886
- })
887
- .transform(d => ({
888
- allDestinations: d.all_destinations,
889
- workspaceUi: d.workspace_ui,
890
- workspaceApi: d.workspace_api,
891
- appsRuntime: d.apps_runtime,
892
- lakebaseRuntime: d.lakebase_runtime,
893
- accountUi: d.account_ui,
894
- accountApi: d.account_api,
895
- accountDatabricksOne: d.account_databricks_one,
896
- }));
897
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
898
- export const unmarshalIngressNetworkPolicy_WorkspaceApiDestinationSchema = z
899
- .object({
900
- scopes: z.array(z.string()).optional(),
901
- scope_qualifier: z.string().optional(),
902
- })
903
- .transform(d => ({
904
- scopes: d.scopes,
905
- scopeQualifier: d.scope_qualifier,
906
- }));
907
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
908
- export const unmarshalIngressNetworkPolicy_WorkspaceIdListSchema = z
909
- .object({
910
- workspace_ids: z
911
- .array(z.union([z.number(), z.bigint()]).transform(v => BigInt(v)))
912
- .optional(),
913
- })
914
- .transform(d => ({
915
- workspaceIds: d.workspace_ids,
916
- }));
917
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
918
- export const unmarshalIngressNetworkPolicy_WorkspaceUiDestinationSchema = z
919
- .object({
920
- all_destinations: z.boolean().optional(),
921
- })
922
- .transform(d => ({
923
- allDestinations: d.all_destinations,
924
- }));
925
- export const unmarshalIpAccessListSchema = z
926
- .object({
927
- list_id: z.string().optional(),
928
- label: z.string().optional(),
929
- ip_addresses: z.array(z.string()).optional(),
930
- address_count: z.number().optional(),
931
- list_type: z.string().optional(),
932
- created_at: z
933
- .union([z.number(), z.bigint()])
934
- .transform(v => BigInt(v))
935
- .optional(),
936
- created_by: z
937
- .union([z.number(), z.bigint()])
938
- .transform(v => BigInt(v))
939
- .optional(),
940
- updated_at: z
941
- .union([z.number(), z.bigint()])
942
- .transform(v => BigInt(v))
943
- .optional(),
944
- updated_by: z
945
- .union([z.number(), z.bigint()])
946
- .transform(v => BigInt(v))
947
- .optional(),
948
- enabled: z.boolean().optional(),
949
- })
950
- .transform(d => ({
951
- listId: d.list_id,
952
- label: d.label,
953
- ipAddresses: d.ip_addresses,
954
- addressCount: d.address_count,
955
- listType: d.list_type,
956
- createdAt: d.created_at,
957
- createdBy: d.created_by,
958
- updatedAt: d.updated_at,
959
- updatedBy: d.updated_by,
960
- enabled: d.enabled,
961
- }));
962
- export const unmarshalListAccountIpAccessListsResponseSchema = z
963
- .object({
964
- ip_access_lists: z
965
- .array(z.lazy(() => unmarshalAccountIpAccessListSchema))
966
- .optional(),
967
- })
968
- .transform(d => ({
969
- ipAccessLists: d.ip_access_lists,
970
- }));
971
- export const unmarshalListEndpointsResponseSchema = z
972
- .object({
973
- items: z.array(z.lazy(() => unmarshalEndpointSchema)).optional(),
974
- next_page_token: z.string().optional(),
975
- })
976
- .transform(d => ({
977
- items: d.items,
978
- nextPageToken: d.next_page_token,
979
- }));
980
- export const unmarshalListIpAccessListsResponseSchema = z
981
- .object({
982
- ip_access_lists: z
983
- .array(z.lazy(() => unmarshalIpAccessListSchema))
984
- .optional(),
985
- })
986
- .transform(d => ({
987
- ipAccessLists: d.ip_access_lists,
988
- }));
989
- export const unmarshalListNccPrivateEndpointRulesResponseSchema = z
990
- .object({
991
- items: z
992
- .array(z.lazy(() => unmarshalNccPrivateEndpointRuleSchema))
993
- .optional(),
994
- next_page_token: z.string().optional(),
995
- })
996
- .transform(d => ({
997
- items: d.items,
998
- nextPageToken: d.next_page_token,
999
- }));
1000
- export const unmarshalListNetworkConnectivityConfigsResponseSchema = z
1001
- .object({
1002
- items: z
1003
- .array(z.lazy(() => unmarshalNetworkConnectivityConfigSchema))
1004
- .optional(),
1005
- next_page_token: z.string().optional(),
1006
- })
1007
- .transform(d => ({
1008
- items: d.items,
1009
- nextPageToken: d.next_page_token,
1010
- }));
1011
- export const unmarshalListNetworkPoliciesResponseSchema = z
1012
- .object({
1013
- items: z
1014
- .array(z.lazy(() => unmarshalAccountNetworkPolicySchema))
1015
- .optional(),
1016
- next_page_token: z.string().optional(),
1017
- })
1018
- .transform(d => ({
1019
- items: d.items,
1020
- nextPageToken: d.next_page_token,
1021
- }));
1022
- export const unmarshalNccPrivateEndpointRuleSchema = z
1023
- .object({
1024
- rule_id: z.string().optional(),
1025
- network_connectivity_config_id: z.string().optional(),
1026
- connection_state: z.string().optional(),
1027
- domain_names: z.array(z.string()).optional(),
1028
- creation_time: z
1029
- .union([z.number(), z.bigint()])
1030
- .transform(v => BigInt(v))
1031
- .optional(),
1032
- updated_time: z
1033
- .union([z.number(), z.bigint()])
1034
- .transform(v => BigInt(v))
1035
- .optional(),
1036
- deactivated: z.boolean().optional(),
1037
- deactivated_at: z
1038
- .union([z.number(), z.bigint()])
1039
- .transform(v => BigInt(v))
1040
- .optional(),
1041
- error_message: z.string().optional(),
1042
- resource_id: z.string().optional(),
1043
- group_id: z.string().optional(),
1044
- endpoint_name: z.string().optional(),
1045
- account_id: z.string().optional(),
1046
- endpoint_service: z.string().optional(),
1047
- resource_names: z.array(z.string()).optional(),
1048
- vpc_endpoint_id: z.string().optional(),
1049
- enabled: z.boolean().optional(),
1050
- gcp_endpoint: z.lazy(() => unmarshalGcpEndpointSchema).optional(),
1051
- })
1052
- .transform(d => ({
1053
- ruleId: d.rule_id,
1054
- networkConnectivityConfigId: d.network_connectivity_config_id,
1055
- connectionState: d.connection_state,
1056
- domainNames: d.domain_names,
1057
- creationTime: d.creation_time,
1058
- updatedTime: d.updated_time,
1059
- deactivated: d.deactivated,
1060
- deactivatedAt: d.deactivated_at,
1061
- errorMessage: d.error_message,
1062
- resourceId: d.resource_id,
1063
- groupId: d.group_id,
1064
- endpointName: d.endpoint_name,
1065
- accountId: d.account_id,
1066
- endpointService: d.endpoint_service,
1067
- resourceNames: d.resource_names,
1068
- vpcEndpointId: d.vpc_endpoint_id,
1069
- enabled: d.enabled,
1070
- endpoint: d.gcp_endpoint !== undefined
1071
- ? { $case: 'gcpEndpoint', gcpEndpoint: d.gcp_endpoint }
1072
- : undefined,
1073
- }));
1074
- export const unmarshalNetworkSchema = z
1075
- .object({
1076
- network_id: z.string().optional(),
1077
- account_id: z.string().optional(),
1078
- workspace_id: z
1079
- .union([z.number(), z.bigint()])
1080
- .transform(v => BigInt(v))
1081
- .optional(),
1082
- vpc_id: z.string().optional(),
1083
- subnet_ids: z.array(z.string()).optional(),
1084
- security_group_ids: z.array(z.string()).optional(),
1085
- vpc_status: z.string().optional(),
1086
- error_messages: z
1087
- .array(z.lazy(() => unmarshalNetworkHealthSchema))
1088
- .optional(),
1089
- network_name: z.string().optional(),
1090
- creation_time: z
1091
- .union([z.number(), z.bigint()])
1092
- .transform(v => BigInt(v))
1093
- .optional(),
1094
- warning_messages: z
1095
- .array(z.lazy(() => unmarshalNetworkWarningSchema))
1096
- .optional(),
1097
- vpc_endpoints: z.lazy(() => unmarshalNetworkVpcEndpointsSchema).optional(),
1098
- gcp_network_info: z.lazy(() => unmarshalGcpNetworkInfoSchema).optional(),
1099
- })
1100
- .transform(d => ({
1101
- networkId: d.network_id,
1102
- accountId: d.account_id,
1103
- workspaceId: d.workspace_id,
1104
- vpcId: d.vpc_id,
1105
- subnetIds: d.subnet_ids,
1106
- securityGroupIds: d.security_group_ids,
1107
- vpcStatus: d.vpc_status,
1108
- errorMessages: d.error_messages,
1109
- networkName: d.network_name,
1110
- creationTime: d.creation_time,
1111
- warningMessages: d.warning_messages,
1112
- vpcEndpoints: d.vpc_endpoints,
1113
- networkInfo: d.gcp_network_info !== undefined
1114
- ? { $case: 'gcpNetworkInfo', gcpNetworkInfo: d.gcp_network_info }
1115
- : undefined,
1116
- }));
1117
- export const unmarshalNetworkConnectivityConfigSchema = z
1118
- .object({
1119
- network_connectivity_config_id: z.string().optional(),
1120
- account_id: z.string().optional(),
1121
- name: z.string().optional(),
1122
- region: z.string().optional(),
1123
- egress_config: z
1124
- .lazy(() => unmarshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema)
1125
- .optional(),
1126
- updated_time: z
1127
- .union([z.number(), z.bigint()])
1128
- .transform(v => BigInt(v))
1129
- .optional(),
1130
- creation_time: z
1131
- .union([z.number(), z.bigint()])
1132
- .transform(v => BigInt(v))
1133
- .optional(),
1134
- })
1135
- .transform(d => ({
1136
- networkConnectivityConfigId: d.network_connectivity_config_id,
1137
- accountId: d.account_id,
1138
- name: d.name,
1139
- region: d.region,
1140
- egressConfig: d.egress_config,
1141
- updatedTime: d.updated_time,
1142
- creationTime: d.creation_time,
1143
- }));
1144
- export const unmarshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema = z
1145
- .object({
1146
- rule_id: z.string().optional(),
1147
- network_connectivity_config_id: z.string().optional(),
1148
- account_id: z.string().optional(),
1149
- endpoint_service: z.string().optional(),
1150
- domain_names: z.array(z.string()).optional(),
1151
- resource_names: z.array(z.string()).optional(),
1152
- vpc_endpoint_id: z.string().optional(),
1153
- connection_state: z.string().optional(),
1154
- creation_time: z
1155
- .union([z.number(), z.bigint()])
1156
- .transform(v => BigInt(v))
1157
- .optional(),
1158
- updated_time: z
1159
- .union([z.number(), z.bigint()])
1160
- .transform(v => BigInt(v))
1161
- .optional(),
1162
- deactivated: z.boolean().optional(),
1163
- deactivated_at: z
1164
- .union([z.number(), z.bigint()])
1165
- .transform(v => BigInt(v))
1166
- .optional(),
1167
- enabled: z.boolean().optional(),
1168
- error_message: z.string().optional(),
1169
- })
1170
- .transform(d => ({
1171
- ruleId: d.rule_id,
1172
- networkConnectivityConfigId: d.network_connectivity_config_id,
1173
- accountId: d.account_id,
1174
- endpointService: d.endpoint_service,
1175
- domainNames: d.domain_names,
1176
- resourceNames: d.resource_names,
1177
- vpcEndpointId: d.vpc_endpoint_id,
1178
- connectionState: d.connection_state,
1179
- creationTime: d.creation_time,
1180
- updatedTime: d.updated_time,
1181
- deactivated: d.deactivated,
1182
- deactivatedAt: d.deactivated_at,
1183
- enabled: d.enabled,
1184
- errorMessage: d.error_message,
1185
- }));
1186
- export const unmarshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema = z
1187
- .object({
1188
- rule_id: z.string().optional(),
1189
- network_connectivity_config_id: z.string().optional(),
1190
- resource_id: z.string().optional(),
1191
- group_id: z.string().optional(),
1192
- endpoint_name: z.string().optional(),
1193
- connection_state: z.string().optional(),
1194
- creation_time: z
1195
- .union([z.number(), z.bigint()])
1196
- .transform(v => BigInt(v))
1197
- .optional(),
1198
- updated_time: z
1199
- .union([z.number(), z.bigint()])
1200
- .transform(v => BigInt(v))
1201
- .optional(),
1202
- deactivated: z.boolean().optional(),
1203
- deactivated_at: z
1204
- .union([z.number(), z.bigint()])
1205
- .transform(v => BigInt(v))
1206
- .optional(),
1207
- domain_names: z.array(z.string()).optional(),
1208
- error_message: z.string().optional(),
1209
- })
1210
- .transform(d => ({
1211
- ruleId: d.rule_id,
1212
- networkConnectivityConfigId: d.network_connectivity_config_id,
1213
- resourceId: d.resource_id,
1214
- groupId: d.group_id,
1215
- endpointName: d.endpoint_name,
1216
- connectionState: d.connection_state,
1217
- creationTime: d.creation_time,
1218
- updatedTime: d.updated_time,
1219
- deactivated: d.deactivated,
1220
- deactivatedAt: d.deactivated_at,
1221
- domainNames: d.domain_names,
1222
- errorMessage: d.error_message,
1223
- }));
1224
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1225
- export const unmarshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema = z
1226
- .object({
1227
- azure_service_endpoint_rule: z
1228
- .lazy(() => unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema)
1229
- .optional(),
1230
- aws_stable_ip_rule: z
1231
- .lazy(() => unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema)
1232
- .optional(),
1233
- })
1234
- .transform(d => ({
1235
- azureServiceEndpointRule: d.azure_service_endpoint_rule,
1236
- awsStableIpRule: d.aws_stable_ip_rule,
1237
- }));
1238
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1239
- export const unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema = z
1240
- .object({
1241
- cidr_blocks: z.array(z.string()).optional(),
1242
- })
1243
- .transform(d => ({
1244
- cidrBlocks: d.cidr_blocks,
1245
- }));
1246
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1247
- export const unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema = z
1248
- .object({
1249
- target_region: z.string().optional(),
1250
- target_services: z.array(z.string()).optional(),
1251
- subnets: z.array(z.string()).optional(),
1252
- })
1253
- .transform(d => ({
1254
- targetRegion: d.target_region,
1255
- targetServices: d.target_services,
1256
- subnets: d.subnets,
1257
- }));
1258
- export const unmarshalNetworkHealthSchema = z
1259
- .object({
1260
- error_type: z.string().optional(),
1261
- error_message: z.string().optional(),
1262
- })
1263
- .transform(d => ({
1264
- errorType: d.error_type,
1265
- errorMessage: d.error_message,
1266
- }));
1267
- export const unmarshalNetworkVpcEndpointsSchema = z
1268
- .object({
1269
- rest_api: z.array(z.string()).optional(),
1270
- dataplane_relay: z.array(z.string()).optional(),
1271
- })
1272
- .transform(d => ({
1273
- restApi: d.rest_api,
1274
- dataplaneRelay: d.dataplane_relay,
1275
- }));
1276
- export const unmarshalNetworkWarningSchema = z
1277
- .object({
1278
- warning_type: z.string().optional(),
1279
- warning_message: z.string().optional(),
1280
- })
1281
- .transform(d => ({
1282
- warningType: d.warning_type,
1283
- warningMessage: d.warning_message,
1284
- }));
1285
- export const unmarshalPrivateAccessSettingsSchema = z
1286
- .object({
1287
- private_access_settings_id: z.string().optional(),
1288
- account_id: z.string().optional(),
1289
- private_access_settings_name: z.string().optional(),
1290
- region: z.string().optional(),
1291
- public_access_enabled: z.boolean().optional(),
1292
- private_access_level: z.string().optional(),
1293
- allowed_vpc_endpoint_ids: z.array(z.string()).optional(),
1294
- })
1295
- .transform(d => ({
1296
- privateAccessSettingsId: d.private_access_settings_id,
1297
- accountId: d.account_id,
1298
- privateAccessSettingsName: d.private_access_settings_name,
1299
- region: d.region,
1300
- publicAccessEnabled: d.public_access_enabled,
1301
- privateAccessLevel: d.private_access_level,
1302
- allowedVpcEndpointIds: d.allowed_vpc_endpoint_ids,
1303
- }));
1304
- export const unmarshalReplaceAccountIpAccessListResponseSchema = z
1305
- .object({
1306
- ip_access_list: z
1307
- .lazy(() => unmarshalAccountIpAccessListSchema)
1308
- .optional(),
1309
- })
1310
- .transform(d => ({
1311
- ipAccessList: d.ip_access_list,
1312
- }));
1313
- export const unmarshalReplaceIpAccessListResponseSchema = z
1314
- .object({
1315
- ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional(),
1316
- })
1317
- .transform(d => ({
1318
- ipAccessList: d.ip_access_list,
1319
- }));
1320
- export const unmarshalUpdateAccountIpAccessListResponseSchema = z
1321
- .object({
1322
- ip_access_list: z
1323
- .lazy(() => unmarshalAccountIpAccessListSchema)
1324
- .optional(),
1325
- })
1326
- .transform(d => ({
1327
- ipAccessList: d.ip_access_list,
1328
- }));
1329
- export const unmarshalUpdateIpAccessListResponseSchema = z
1330
- .object({
1331
- ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional(),
1332
- })
1333
- .transform(d => ({
1334
- ipAccessList: d.ip_access_list,
1335
- }));
1336
- export const unmarshalVpcEndpointSchema = z
1337
- .object({
1338
- vpc_endpoint_id: z.string().optional(),
1339
- account_id: z.string().optional(),
1340
- vpc_endpoint_name: z.string().optional(),
1341
- aws_vpc_endpoint_id: z.string().optional(),
1342
- aws_endpoint_service_id: z.string().optional(),
1343
- use_case: z.string().optional(),
1344
- region: z.string().optional(),
1345
- aws_account_id: z.string().optional(),
1346
- state: z.string().optional(),
1347
- gcp_vpc_endpoint_info: z
1348
- .lazy(() => unmarshalGcpVpcEndpointInfoSchema)
1349
- .optional(),
1350
- })
1351
- .transform(d => ({
1352
- vpcEndpointId: d.vpc_endpoint_id,
1353
- accountId: d.account_id,
1354
- vpcEndpointName: d.vpc_endpoint_name,
1355
- awsVpcEndpointId: d.aws_vpc_endpoint_id,
1356
- awsEndpointServiceId: d.aws_endpoint_service_id,
1357
- useCase: d.use_case,
1358
- region: d.region,
1359
- awsAccountId: d.aws_account_id,
1360
- state: d.state,
1361
- vpcEndpointInfo: d.gcp_vpc_endpoint_info !== undefined
1362
- ? {
1363
- $case: 'gcpVpcEndpointInfo',
1364
- gcpVpcEndpointInfo: d.gcp_vpc_endpoint_info,
1365
- }
1366
- : undefined,
1367
- }));
1368
- export const unmarshalWorkspaceNetworkOptionSchema = z
1369
- .object({
1370
- network_policy_id: z.string().optional(),
1371
- workspace_id: z
1372
- .union([z.number(), z.bigint()])
1373
- .transform(v => BigInt(v))
1374
- .optional(),
1375
- })
1376
- .transform(d => ({
1377
- networkPolicyId: d.network_policy_id,
1378
- workspaceId: d.workspace_id,
1379
- }));
1380
- export const marshalAccountNetworkPolicySchema = z
1381
- .object({
1382
- networkPolicyId: z.string().optional(),
1383
- accountId: z.string().optional(),
1384
- egress: z.lazy(() => marshalEgressNetworkPolicySchema).optional(),
1385
- ingress: z.lazy(() => marshalIngressNetworkPolicySchema).optional(),
1386
- ingressDryRun: z.lazy(() => marshalIngressNetworkPolicySchema).optional(),
1387
- })
1388
- .transform(d => ({
1389
- network_policy_id: d.networkPolicyId,
1390
- account_id: d.accountId,
1391
- egress: d.egress,
1392
- ingress: d.ingress,
1393
- ingress_dry_run: d.ingressDryRun,
1394
- }));
1395
- export const marshalAwsVpcEndpointInfoSchema = z
1396
- .object({
1397
- awsVpcEndpointId: z.string().optional(),
1398
- awsEndpointServiceId: z.string().optional(),
1399
- awsAccountId: z.string().optional(),
1400
- })
1401
- .transform(d => ({
1402
- aws_vpc_endpoint_id: d.awsVpcEndpointId,
1403
- aws_endpoint_service_id: d.awsEndpointServiceId,
1404
- aws_account_id: d.awsAccountId,
1405
- }));
1406
- export const marshalAzurePrivateEndpointInfoSchema = z
1407
- .object({
1408
- privateEndpointName: z.string().optional(),
1409
- privateEndpointResourceGuid: z.string().optional(),
1410
- privateEndpointResourceId: z.string().optional(),
1411
- privateLinkServiceId: z.string().optional(),
1412
- })
1413
- .transform(d => ({
1414
- private_endpoint_name: d.privateEndpointName,
1415
- private_endpoint_resource_guid: d.privateEndpointResourceGuid,
1416
- private_endpoint_resource_id: d.privateEndpointResourceId,
1417
- private_link_service_id: d.privateLinkServiceId,
1418
- }));
1419
- export const marshalCreateAccountIpAccessListRequestSchema = z
1420
- .object({
1421
- accountId: z.string().optional(),
1422
- label: z.string().optional(),
1423
- listType: z.string().optional(),
1424
- ipAddresses: z.array(z.string()).optional(),
1425
- })
1426
- .transform(d => ({
1427
- account_id: d.accountId,
1428
- label: d.label,
1429
- list_type: d.listType,
1430
- ip_addresses: d.ipAddresses,
1431
- }));
1432
- export const marshalCreateIpAccessListRequestSchema = z
1433
- .object({
1434
- label: z.string().optional(),
1435
- listType: z.string().optional(),
1436
- ipAddresses: z.array(z.string()).optional(),
1437
- })
1438
- .transform(d => ({
1439
- label: d.label,
1440
- list_type: d.listType,
1441
- ip_addresses: d.ipAddresses,
1442
- }));
1443
- export const marshalCreateNetworkConnectivityConfigurationSchema = z
1444
- .object({
1445
- networkConnectivityConfigId: z.string().optional(),
1446
- accountId: z.string().optional(),
1447
- name: z.string().optional(),
1448
- region: z.string().optional(),
1449
- egressConfig: z
1450
- .lazy(() => marshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema)
1451
- .optional(),
1452
- updatedTime: z.bigint().optional(),
1453
- creationTime: z.bigint().optional(),
1454
- })
1455
- .transform(d => ({
1456
- network_connectivity_config_id: d.networkConnectivityConfigId,
1457
- account_id: d.accountId,
1458
- name: d.name,
1459
- region: d.region,
1460
- egress_config: d.egressConfig,
1461
- updated_time: d.updatedTime,
1462
- creation_time: d.creationTime,
1463
- }));
1464
- export const marshalCreateNetworkRequestSchema = z
1465
- .object({
1466
- accountId: z.string().optional(),
1467
- networkName: z.string().optional(),
1468
- vpcId: z.string().optional(),
1469
- subnetIds: z.array(z.string()).optional(),
1470
- securityGroupIds: z.array(z.string()).optional(),
1471
- vpcEndpoints: z.lazy(() => marshalNetworkVpcEndpointsSchema).optional(),
1472
- gcpNetworkInfo: z.lazy(() => marshalGcpNetworkInfoSchema).optional(),
1473
- })
1474
- .transform(d => ({
1475
- account_id: d.accountId,
1476
- network_name: d.networkName,
1477
- vpc_id: d.vpcId,
1478
- subnet_ids: d.subnetIds,
1479
- security_group_ids: d.securityGroupIds,
1480
- vpc_endpoints: d.vpcEndpoints,
1481
- gcp_network_info: d.gcpNetworkInfo,
1482
- }));
1483
- export const marshalCreatePrivateAccessSettingsRequestSchema = z
1484
- .object({
1485
- accountId: z.string().optional(),
1486
- privateAccessSettingsName: z.string().optional(),
1487
- region: z.string().optional(),
1488
- publicAccessEnabled: z.boolean().optional(),
1489
- privateAccessLevel: z.string().optional(),
1490
- allowedVpcEndpointIds: z.array(z.string()).optional(),
1491
- })
1492
- .transform(d => ({
1493
- account_id: d.accountId,
1494
- private_access_settings_name: d.privateAccessSettingsName,
1495
- region: d.region,
1496
- public_access_enabled: d.publicAccessEnabled,
1497
- private_access_level: d.privateAccessLevel,
1498
- allowed_vpc_endpoint_ids: d.allowedVpcEndpointIds,
1499
- }));
1500
- export const marshalCreatePrivateEndpointRuleSchema = z
1501
- .object({
1502
- ruleId: z.string().optional(),
1503
- networkConnectivityConfigId: z.string().optional(),
1504
- connectionState: z.string().optional(),
1505
- domainNames: z.array(z.string()).optional(),
1506
- creationTime: z.bigint().optional(),
1507
- updatedTime: z.bigint().optional(),
1508
- deactivated: z.boolean().optional(),
1509
- deactivatedAt: z.bigint().optional(),
1510
- errorMessage: z.string().optional(),
1511
- resourceId: z.string().optional(),
1512
- groupId: z.string().optional(),
1513
- endpointName: z.string().optional(),
1514
- accountId: z.string().optional(),
1515
- endpointService: z.string().optional(),
1516
- resourceNames: z.array(z.string()).optional(),
1517
- vpcEndpointId: z.string().optional(),
1518
- enabled: z.boolean().optional(),
1519
- endpoint: z
1520
- .discriminatedUnion('$case', [
1521
- z.object({
1522
- $case: z.literal('gcpEndpoint'),
1523
- gcpEndpoint: z.lazy(() => marshalGcpEndpointSchema),
1524
- }),
1525
- ])
1526
- .optional(),
1527
- })
1528
- .transform(d => ({
1529
- rule_id: d.ruleId,
1530
- network_connectivity_config_id: d.networkConnectivityConfigId,
1531
- connection_state: d.connectionState,
1532
- domain_names: d.domainNames,
1533
- creation_time: d.creationTime,
1534
- updated_time: d.updatedTime,
1535
- deactivated: d.deactivated,
1536
- deactivated_at: d.deactivatedAt,
1537
- error_message: d.errorMessage,
1538
- resource_id: d.resourceId,
1539
- group_id: d.groupId,
1540
- endpoint_name: d.endpointName,
1541
- account_id: d.accountId,
1542
- endpoint_service: d.endpointService,
1543
- resource_names: d.resourceNames,
1544
- vpc_endpoint_id: d.vpcEndpointId,
1545
- enabled: d.enabled,
1546
- ...(d.endpoint?.$case === 'gcpEndpoint' && {
1547
- gcp_endpoint: d.endpoint.gcpEndpoint,
1548
- }),
1549
- }));
1550
- export const marshalCreateVpcEndpointRequestSchema = z
1551
- .object({
1552
- accountId: z.string().optional(),
1553
- vpcEndpointName: z.string().optional(),
1554
- region: z.string().optional(),
1555
- awsVpcEndpointId: z.string().optional(),
1556
- vpcEndpointInfo: z
1557
- .discriminatedUnion('$case', [
1558
- z.object({
1559
- $case: z.literal('gcpVpcEndpointInfo'),
1560
- gcpVpcEndpointInfo: z.lazy(() => marshalGcpVpcEndpointInfoSchema),
1561
- }),
1562
- ])
1563
- .optional(),
1564
- })
1565
- .transform(d => ({
1566
- account_id: d.accountId,
1567
- vpc_endpoint_name: d.vpcEndpointName,
1568
- region: d.region,
1569
- aws_vpc_endpoint_id: d.awsVpcEndpointId,
1570
- ...(d.vpcEndpointInfo?.$case === 'gcpVpcEndpointInfo' && {
1571
- gcp_vpc_endpoint_info: d.vpcEndpointInfo.gcpVpcEndpointInfo,
1572
- }),
1573
- }));
1574
- export const marshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema = z
1575
- .object({
1576
- defaultRules: z
1577
- .lazy(() => marshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema)
1578
- .optional(),
1579
- targetRules: z
1580
- .lazy(() => marshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema)
1581
- .optional(),
1582
- })
1583
- .transform(d => ({
1584
- default_rules: d.defaultRules,
1585
- target_rules: d.targetRules,
1586
- }));
1587
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1588
- export const marshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema = z
1589
- .object({
1590
- azurePrivateEndpointRules: z
1591
- .array(z.lazy(() => marshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema))
1592
- .optional(),
1593
- awsPrivateEndpointRules: z
1594
- .array(z.lazy(() => marshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema))
1595
- .optional(),
1596
- })
1597
- .transform(d => ({
1598
- azure_private_endpoint_rules: d.azurePrivateEndpointRules,
1599
- aws_private_endpoint_rules: d.awsPrivateEndpointRules,
1600
- }));
1601
- export const marshalEgressNetworkPolicySchema = z
1602
- .object({
1603
- networkAccess: z
1604
- .lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicySchema)
1605
- .optional(),
1606
- })
1607
- .transform(d => ({
1608
- network_access: d.networkAccess,
1609
- }));
1610
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1611
- export const marshalEgressNetworkPolicy_NetworkAccessPolicySchema = z
1612
- .object({
1613
- restrictionMode: z.string().optional(),
1614
- allowedInternetDestinations: z
1615
- .array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema))
1616
- .optional(),
1617
- allowedStorageDestinations: z
1618
- .array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema))
1619
- .optional(),
1620
- policyEnforcement: z
1621
- .lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema)
1622
- .optional(),
1623
- blockedInternetDestinations: z
1624
- .array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema))
1625
- .optional(),
1626
- allowedDatabricksDestinations: z
1627
- .array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema))
1628
- .optional(),
1629
- })
1630
- .transform(d => ({
1631
- restriction_mode: d.restrictionMode,
1632
- allowed_internet_destinations: d.allowedInternetDestinations,
1633
- allowed_storage_destinations: d.allowedStorageDestinations,
1634
- policy_enforcement: d.policyEnforcement,
1635
- blocked_internet_destinations: d.blockedInternetDestinations,
1636
- allowed_databricks_destinations: d.allowedDatabricksDestinations,
1637
- }));
1638
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1639
- export const marshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema = z
1640
- .object({
1641
- workspaceIds: z.array(z.bigint()).optional(),
1642
- })
1643
- .transform(d => ({
1644
- workspace_ids: d.workspaceIds,
1645
- }));
1646
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1647
- export const marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema = z
1648
- .object({
1649
- destination: z.string().optional(),
1650
- internetDestinationType: z.string().optional(),
1651
- })
1652
- .transform(d => ({
1653
- destination: d.destination,
1654
- internet_destination_type: d.internetDestinationType,
1655
- }));
1656
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1657
- export const marshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema = z
1658
- .object({
1659
- enforcementMode: z.string().optional(),
1660
- dryRunModeProductFilter: z.array(z.string()).optional(),
1661
- })
1662
- .transform(d => ({
1663
- enforcement_mode: d.enforcementMode,
1664
- dry_run_mode_product_filter: d.dryRunModeProductFilter,
1665
- }));
1666
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1667
- export const marshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema = z
1668
- .object({
1669
- bucketName: z.string().optional(),
1670
- region: z.string().optional(),
1671
- storageDestinationType: z.string().optional(),
1672
- azureStorageAccount: z.string().optional(),
1673
- azureStorageService: z.string().optional(),
1674
- })
1675
- .transform(d => ({
1676
- bucket_name: d.bucketName,
1677
- region: d.region,
1678
- storage_destination_type: d.storageDestinationType,
1679
- azure_storage_account: d.azureStorageAccount,
1680
- azure_storage_service: d.azureStorageService,
1681
- }));
1682
- export const marshalEndpointSchema = z
1683
- .object({
1684
- name: z.string().optional(),
1685
- endpointId: z.string().optional(),
1686
- accountId: z.string().optional(),
1687
- displayName: z.string().optional(),
1688
- useCase: z.string().optional(),
1689
- region: z.string().optional(),
1690
- state: z.string().optional(),
1691
- endpointInfo: z
1692
- .discriminatedUnion('$case', [
1693
- z.object({
1694
- $case: z.literal('azurePrivateEndpointInfo'),
1695
- azurePrivateEndpointInfo: z.lazy(() => marshalAzurePrivateEndpointInfoSchema),
1696
- }),
1697
- z.object({
1698
- $case: z.literal('awsVpcEndpointInfo'),
1699
- awsVpcEndpointInfo: z.lazy(() => marshalAwsVpcEndpointInfoSchema),
1700
- }),
1701
- z.object({
1702
- $case: z.literal('gcpPscEndpointInfo'),
1703
- gcpPscEndpointInfo: z.lazy(() => marshalGcpPscEndpointInfoSchema),
1704
- }),
1705
- ])
1706
- .optional(),
1707
- createTime: z
1708
- .any()
1709
- .transform((d) => d.toString())
1710
- .optional(),
1711
- })
1712
- .transform(d => ({
1713
- name: d.name,
1714
- endpoint_id: d.endpointId,
1715
- account_id: d.accountId,
1716
- display_name: d.displayName,
1717
- use_case: d.useCase,
1718
- region: d.region,
1719
- state: d.state,
1720
- ...(d.endpointInfo?.$case === 'azurePrivateEndpointInfo' && {
1721
- azure_private_endpoint_info: d.endpointInfo.azurePrivateEndpointInfo,
1722
- }),
1723
- ...(d.endpointInfo?.$case === 'awsVpcEndpointInfo' && {
1724
- aws_vpc_endpoint_info: d.endpointInfo.awsVpcEndpointInfo,
1725
- }),
1726
- ...(d.endpointInfo?.$case === 'gcpPscEndpointInfo' && {
1727
- gcp_psc_endpoint_info: d.endpointInfo.gcpPscEndpointInfo,
1728
- }),
1729
- create_time: d.createTime,
1730
- }));
1731
- export const marshalGcpEndpointSchema = z
1732
- .object({
1733
- pscEndpointUri: z.string().optional(),
1734
- targetServices: z
1735
- .discriminatedUnion('$case', [
1736
- z.object({
1737
- $case: z.literal('serviceAttachment'),
1738
- serviceAttachment: z.string(),
1739
- }),
1740
- ])
1741
- .optional(),
1742
- })
1743
- .transform(d => ({
1744
- psc_endpoint_uri: d.pscEndpointUri,
1745
- ...(d.targetServices?.$case === 'serviceAttachment' && {
1746
- service_attachment: d.targetServices.serviceAttachment,
1747
- }),
1748
- }));
1749
- export const marshalGcpNetworkInfoSchema = z
1750
- .object({
1751
- networkProjectId: z.string().optional(),
1752
- vpcId: z.string().optional(),
1753
- subnetId: z.string().optional(),
1754
- subnetRegion: z.string().optional(),
1755
- podIpRangeName: z.string().optional(),
1756
- serviceIpRangeName: z.string().optional(),
1757
- })
1758
- .transform(d => ({
1759
- network_project_id: d.networkProjectId,
1760
- vpc_id: d.vpcId,
1761
- subnet_id: d.subnetId,
1762
- subnet_region: d.subnetRegion,
1763
- pod_ip_range_name: d.podIpRangeName,
1764
- service_ip_range_name: d.serviceIpRangeName,
1765
- }));
1766
- export const marshalGcpPscEndpointInfoSchema = z
1767
- .object({
1768
- pscConnectionId: z.string().optional(),
1769
- projectId: z.string().optional(),
1770
- pscEndpoint: z.string().optional(),
1771
- endpointRegion: z.string().optional(),
1772
- serviceAttachmentId: z.string().optional(),
1773
- })
1774
- .transform(d => ({
1775
- psc_connection_id: d.pscConnectionId,
1776
- project_id: d.projectId,
1777
- psc_endpoint: d.pscEndpoint,
1778
- endpoint_region: d.endpointRegion,
1779
- service_attachment_id: d.serviceAttachmentId,
1780
- }));
1781
- export const marshalGcpVpcEndpointInfoSchema = z
1782
- .object({
1783
- pscConnectionId: z.string().optional(),
1784
- projectId: z.string().optional(),
1785
- pscEndpointName: z.string().optional(),
1786
- endpointRegion: z.string().optional(),
1787
- serviceAttachmentId: z.string().optional(),
1788
- })
1789
- .transform(d => ({
1790
- psc_connection_id: d.pscConnectionId,
1791
- project_id: d.projectId,
1792
- psc_endpoint_name: d.pscEndpointName,
1793
- endpoint_region: d.endpointRegion,
1794
- service_attachment_id: d.serviceAttachmentId,
1795
- }));
1796
- export const marshalIngressNetworkPolicySchema = z
1797
- .object({
1798
- publicAccess: z
1799
- .lazy(() => marshalIngressNetworkPolicy_PublicAccessSchema)
1800
- .optional(),
1801
- privateAccess: z
1802
- .lazy(() => marshalIngressNetworkPolicy_PrivateAccessSchema)
1803
- .optional(),
1804
- crossWorkspaceAccess: z
1805
- .lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceAccessSchema)
1806
- .optional(),
1807
- })
1808
- .transform(d => ({
1809
- public_access: d.publicAccess,
1810
- private_access: d.privateAccess,
1811
- cross_workspace_access: d.crossWorkspaceAccess,
1812
- }));
1813
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1814
- export const marshalIngressNetworkPolicy_AccountApiDestinationSchema = z
1815
- .object({
1816
- scopes: z.array(z.string()).optional(),
1817
- scopeQualifier: z.string().optional(),
1818
- })
1819
- .transform(d => ({
1820
- scopes: d.scopes,
1821
- scope_qualifier: d.scopeQualifier,
1822
- }));
1823
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1824
- export const marshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema = z
1825
- .object({
1826
- allDestinations: z.boolean().optional(),
1827
- })
1828
- .transform(d => ({
1829
- all_destinations: d.allDestinations,
1830
- }));
1831
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1832
- export const marshalIngressNetworkPolicy_AccountUiDestinationSchema = z
1833
- .object({
1834
- allDestinations: z.boolean().optional(),
1835
- })
1836
- .transform(d => ({
1837
- all_destinations: d.allDestinations,
1838
- }));
1839
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1840
- export const marshalIngressNetworkPolicy_AppsRuntimeDestinationSchema = z
1841
- .object({
1842
- allDestinations: z.boolean().optional(),
1843
- })
1844
- .transform(d => ({
1845
- all_destinations: d.allDestinations,
1846
- }));
1847
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1848
- export const marshalIngressNetworkPolicy_AuthenticationSchema = z
1849
- .object({
1850
- identityType: z.string().optional(),
1851
- identities: z
1852
- .array(z.lazy(() => marshalIngressNetworkPolicy_AuthenticationIdentitySchema))
1853
- .optional(),
1854
- })
1855
- .transform(d => ({
1856
- identity_type: d.identityType,
1857
- identities: d.identities,
1858
- }));
1859
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1860
- export const marshalIngressNetworkPolicy_AuthenticationIdentitySchema = z
1861
- .object({
1862
- principalType: z.string().optional(),
1863
- principalId: z.bigint().optional(),
1864
- })
1865
- .transform(d => ({
1866
- principal_type: d.principalType,
1867
- principal_id: d.principalId,
1868
- }));
1869
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1870
- export const marshalIngressNetworkPolicy_CrossWorkspaceAccessSchema = z
1871
- .object({
1872
- restrictionMode: z.string().optional(),
1873
- denyRules: z
1874
- .array(z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema))
1875
- .optional(),
1876
- allowRules: z
1877
- .array(z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema))
1878
- .optional(),
1879
- })
1880
- .transform(d => ({
1881
- restriction_mode: d.restrictionMode,
1882
- deny_rules: d.denyRules,
1883
- allow_rules: d.allowRules,
1884
- }));
1885
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1886
- export const marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema = z
1887
- .object({
1888
- origin: z
1889
- .lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema)
1890
- .optional(),
1891
- destination: z
1892
- .lazy(() => marshalIngressNetworkPolicy_RequestDestinationSchema)
1893
- .optional(),
1894
- authentication: z
1895
- .lazy(() => marshalIngressNetworkPolicy_AuthenticationSchema)
1896
- .optional(),
1897
- label: z.string().optional(),
1898
- })
1899
- .transform(d => ({
1900
- origin: d.origin,
1901
- destination: d.destination,
1902
- authentication: d.authentication,
1903
- label: d.label,
1904
- }));
1905
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1906
- export const marshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema = z
1907
- .object({
1908
- source: z
1909
- .discriminatedUnion('$case', [
1910
- z.object({
1911
- $case: z.literal('allSourceWorkspaces'),
1912
- allSourceWorkspaces: z.boolean(),
1913
- }),
1914
- z.object({
1915
- $case: z.literal('selectedWorkspaces'),
1916
- selectedWorkspaces: z.lazy(() => marshalIngressNetworkPolicy_WorkspaceIdListSchema),
1917
- }),
1918
- ])
1919
- .optional(),
1920
- })
1921
- .transform(d => ({
1922
- ...(d.source?.$case === 'allSourceWorkspaces' && {
1923
- all_source_workspaces: d.source.allSourceWorkspaces,
1924
- }),
1925
- ...(d.source?.$case === 'selectedWorkspaces' && {
1926
- selected_workspaces: d.source.selectedWorkspaces,
1927
- }),
1928
- }));
1929
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1930
- export const marshalIngressNetworkPolicy_EndpointsSchema = z
1931
- .object({
1932
- endpointIds: z.array(z.string()).optional(),
1933
- })
1934
- .transform(d => ({
1935
- endpoint_ids: d.endpointIds,
1936
- }));
1937
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1938
- export const marshalIngressNetworkPolicy_IpRangesSchema = z
1939
- .object({
1940
- ipRanges: z.array(z.string()).optional(),
1941
- })
1942
- .transform(d => ({
1943
- ip_ranges: d.ipRanges,
1944
- }));
1945
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1946
- export const marshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema = z
1947
- .object({
1948
- allDestinations: z.boolean().optional(),
1949
- })
1950
- .transform(d => ({
1951
- all_destinations: d.allDestinations,
1952
- }));
1953
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1954
- export const marshalIngressNetworkPolicy_PrivateAccessSchema = z
1955
- .object({
1956
- restrictionMode: z.string().optional(),
1957
- denyRules: z
1958
- .array(z.lazy(() => marshalIngressNetworkPolicy_PrivateIngressRuleSchema))
1959
- .optional(),
1960
- allowRules: z
1961
- .array(z.lazy(() => marshalIngressNetworkPolicy_PrivateIngressRuleSchema))
1962
- .optional(),
1963
- })
1964
- .transform(d => ({
1965
- restriction_mode: d.restrictionMode,
1966
- deny_rules: d.denyRules,
1967
- allow_rules: d.allowRules,
1968
- }));
1969
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1970
- export const marshalIngressNetworkPolicy_PrivateIngressRuleSchema = z
1971
- .object({
1972
- origin: z
1973
- .lazy(() => marshalIngressNetworkPolicy_PrivateRequestOriginSchema)
1974
- .optional(),
1975
- destination: z
1976
- .lazy(() => marshalIngressNetworkPolicy_RequestDestinationSchema)
1977
- .optional(),
1978
- authentication: z
1979
- .lazy(() => marshalIngressNetworkPolicy_AuthenticationSchema)
1980
- .optional(),
1981
- label: z.string().optional(),
1982
- })
1983
- .transform(d => ({
1984
- origin: d.origin,
1985
- destination: d.destination,
1986
- authentication: d.authentication,
1987
- label: d.label,
1988
- }));
1989
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1990
- export const marshalIngressNetworkPolicy_PrivateRequestOriginSchema = z
1991
- .object({
1992
- source: z
1993
- .discriminatedUnion('$case', [
1994
- z.object({
1995
- $case: z.literal('endpoints'),
1996
- endpoints: z.lazy(() => marshalIngressNetworkPolicy_EndpointsSchema),
1997
- }),
1998
- z.object({
1999
- $case: z.literal('allRegisteredEndpoints'),
2000
- allRegisteredEndpoints: z.boolean(),
2001
- }),
2002
- z.object({
2003
- $case: z.literal('azureWorkspacePrivateLink'),
2004
- azureWorkspacePrivateLink: z.boolean(),
2005
- }),
2006
- z.object({
2007
- $case: z.literal('allPrivateAccess'),
2008
- allPrivateAccess: z.boolean(),
2009
- }),
2010
- ])
2011
- .optional(),
2012
- })
2013
- .transform(d => ({
2014
- ...(d.source?.$case === 'endpoints' && { endpoints: d.source.endpoints }),
2015
- ...(d.source?.$case === 'allRegisteredEndpoints' && {
2016
- all_registered_endpoints: d.source.allRegisteredEndpoints,
2017
- }),
2018
- ...(d.source?.$case === 'azureWorkspacePrivateLink' && {
2019
- azure_workspace_private_link: d.source.azureWorkspacePrivateLink,
2020
- }),
2021
- ...(d.source?.$case === 'allPrivateAccess' && {
2022
- all_private_access: d.source.allPrivateAccess,
2023
- }),
2024
- }));
2025
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2026
- export const marshalIngressNetworkPolicy_PublicAccessSchema = z
2027
- .object({
2028
- restrictionMode: z.string().optional(),
2029
- denyRules: z
2030
- .array(z.lazy(() => marshalIngressNetworkPolicy_PublicIngressRuleSchema))
2031
- .optional(),
2032
- allowRules: z
2033
- .array(z.lazy(() => marshalIngressNetworkPolicy_PublicIngressRuleSchema))
2034
- .optional(),
2035
- })
2036
- .transform(d => ({
2037
- restriction_mode: d.restrictionMode,
2038
- deny_rules: d.denyRules,
2039
- allow_rules: d.allowRules,
2040
- }));
2041
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2042
- export const marshalIngressNetworkPolicy_PublicIngressRuleSchema = z
2043
- .object({
2044
- origin: z
2045
- .lazy(() => marshalIngressNetworkPolicy_PublicRequestOriginSchema)
2046
- .optional(),
2047
- destination: z
2048
- .lazy(() => marshalIngressNetworkPolicy_RequestDestinationSchema)
2049
- .optional(),
2050
- authentication: z
2051
- .lazy(() => marshalIngressNetworkPolicy_AuthenticationSchema)
2052
- .optional(),
2053
- label: z.string().optional(),
2054
- })
2055
- .transform(d => ({
2056
- origin: d.origin,
2057
- destination: d.destination,
2058
- authentication: d.authentication,
2059
- label: d.label,
2060
- }));
2061
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2062
- export const marshalIngressNetworkPolicy_PublicRequestOriginSchema = z
2063
- .object({
2064
- source: z
2065
- .discriminatedUnion('$case', [
2066
- z.object({ $case: z.literal('allIpRanges'), allIpRanges: z.boolean() }),
2067
- z.object({
2068
- $case: z.literal('includedIpRanges'),
2069
- includedIpRanges: z.lazy(() => marshalIngressNetworkPolicy_IpRangesSchema),
2070
- }),
2071
- z.object({
2072
- $case: z.literal('excludedIpRanges'),
2073
- excludedIpRanges: z.lazy(() => marshalIngressNetworkPolicy_IpRangesSchema),
2074
- }),
2075
- ])
2076
- .optional(),
2077
- })
2078
- .transform(d => ({
2079
- ...(d.source?.$case === 'allIpRanges' && {
2080
- all_ip_ranges: d.source.allIpRanges,
2081
- }),
2082
- ...(d.source?.$case === 'includedIpRanges' && {
2083
- included_ip_ranges: d.source.includedIpRanges,
2084
- }),
2085
- ...(d.source?.$case === 'excludedIpRanges' && {
2086
- excluded_ip_ranges: d.source.excludedIpRanges,
2087
- }),
2088
- }));
2089
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2090
- export const marshalIngressNetworkPolicy_RequestDestinationSchema = z
2091
- .object({
2092
- allDestinations: z.boolean().optional(),
2093
- workspaceUi: z
2094
- .lazy(() => marshalIngressNetworkPolicy_WorkspaceUiDestinationSchema)
2095
- .optional(),
2096
- workspaceApi: z
2097
- .lazy(() => marshalIngressNetworkPolicy_WorkspaceApiDestinationSchema)
2098
- .optional(),
2099
- appsRuntime: z
2100
- .lazy(() => marshalIngressNetworkPolicy_AppsRuntimeDestinationSchema)
2101
- .optional(),
2102
- lakebaseRuntime: z
2103
- .lazy(() => marshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema)
2104
- .optional(),
2105
- accountUi: z
2106
- .lazy(() => marshalIngressNetworkPolicy_AccountUiDestinationSchema)
2107
- .optional(),
2108
- accountApi: z
2109
- .lazy(() => marshalIngressNetworkPolicy_AccountApiDestinationSchema)
2110
- .optional(),
2111
- accountDatabricksOne: z
2112
- .lazy(() => marshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema)
2113
- .optional(),
2114
- })
2115
- .transform(d => ({
2116
- all_destinations: d.allDestinations,
2117
- workspace_ui: d.workspaceUi,
2118
- workspace_api: d.workspaceApi,
2119
- apps_runtime: d.appsRuntime,
2120
- lakebase_runtime: d.lakebaseRuntime,
2121
- account_ui: d.accountUi,
2122
- account_api: d.accountApi,
2123
- account_databricks_one: d.accountDatabricksOne,
2124
- }));
2125
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2126
- export const marshalIngressNetworkPolicy_WorkspaceApiDestinationSchema = z
2127
- .object({
2128
- scopes: z.array(z.string()).optional(),
2129
- scopeQualifier: z.string().optional(),
2130
- })
2131
- .transform(d => ({
2132
- scopes: d.scopes,
2133
- scope_qualifier: d.scopeQualifier,
2134
- }));
2135
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2136
- export const marshalIngressNetworkPolicy_WorkspaceIdListSchema = z
2137
- .object({
2138
- workspaceIds: z.array(z.bigint()).optional(),
2139
- })
2140
- .transform(d => ({
2141
- workspace_ids: d.workspaceIds,
2142
- }));
2143
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2144
- export const marshalIngressNetworkPolicy_WorkspaceUiDestinationSchema = z
2145
- .object({
2146
- allDestinations: z.boolean().optional(),
2147
- })
2148
- .transform(d => ({
2149
- all_destinations: d.allDestinations,
2150
- }));
2151
- export const marshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema = z
2152
- .object({
2153
- ruleId: z.string().optional(),
2154
- networkConnectivityConfigId: z.string().optional(),
2155
- accountId: z.string().optional(),
2156
- endpointService: z.string().optional(),
2157
- domainNames: z.array(z.string()).optional(),
2158
- resourceNames: z.array(z.string()).optional(),
2159
- vpcEndpointId: z.string().optional(),
2160
- connectionState: z.string().optional(),
2161
- creationTime: z.bigint().optional(),
2162
- updatedTime: z.bigint().optional(),
2163
- deactivated: z.boolean().optional(),
2164
- deactivatedAt: z.bigint().optional(),
2165
- enabled: z.boolean().optional(),
2166
- errorMessage: z.string().optional(),
2167
- })
2168
- .transform(d => ({
2169
- rule_id: d.ruleId,
2170
- network_connectivity_config_id: d.networkConnectivityConfigId,
2171
- account_id: d.accountId,
2172
- endpoint_service: d.endpointService,
2173
- domain_names: d.domainNames,
2174
- resource_names: d.resourceNames,
2175
- vpc_endpoint_id: d.vpcEndpointId,
2176
- connection_state: d.connectionState,
2177
- creation_time: d.creationTime,
2178
- updated_time: d.updatedTime,
2179
- deactivated: d.deactivated,
2180
- deactivated_at: d.deactivatedAt,
2181
- enabled: d.enabled,
2182
- error_message: d.errorMessage,
2183
- }));
2184
- export const marshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema = z
2185
- .object({
2186
- ruleId: z.string().optional(),
2187
- networkConnectivityConfigId: z.string().optional(),
2188
- resourceId: z.string().optional(),
2189
- groupId: z.string().optional(),
2190
- endpointName: z.string().optional(),
2191
- connectionState: z.string().optional(),
2192
- creationTime: z.bigint().optional(),
2193
- updatedTime: z.bigint().optional(),
2194
- deactivated: z.boolean().optional(),
2195
- deactivatedAt: z.bigint().optional(),
2196
- domainNames: z.array(z.string()).optional(),
2197
- errorMessage: z.string().optional(),
2198
- })
2199
- .transform(d => ({
2200
- rule_id: d.ruleId,
2201
- network_connectivity_config_id: d.networkConnectivityConfigId,
2202
- resource_id: d.resourceId,
2203
- group_id: d.groupId,
2204
- endpoint_name: d.endpointName,
2205
- connection_state: d.connectionState,
2206
- creation_time: d.creationTime,
2207
- updated_time: d.updatedTime,
2208
- deactivated: d.deactivated,
2209
- deactivated_at: d.deactivatedAt,
2210
- domain_names: d.domainNames,
2211
- error_message: d.errorMessage,
2212
- }));
2213
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2214
- export const marshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema = z
2215
- .object({
2216
- azureServiceEndpointRule: z
2217
- .lazy(() => marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema)
2218
- .optional(),
2219
- awsStableIpRule: z
2220
- .lazy(() => marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema)
2221
- .optional(),
2222
- })
2223
- .transform(d => ({
2224
- azure_service_endpoint_rule: d.azureServiceEndpointRule,
2225
- aws_stable_ip_rule: d.awsStableIpRule,
2226
- }));
2227
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2228
- export const marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema = z
2229
- .object({
2230
- cidrBlocks: z.array(z.string()).optional(),
2231
- })
2232
- .transform(d => ({
2233
- cidr_blocks: d.cidrBlocks,
2234
- }));
2235
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
2236
- export const marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema = z
2237
- .object({
2238
- targetRegion: z.string().optional(),
2239
- targetServices: z.array(z.string()).optional(),
2240
- subnets: z.array(z.string()).optional(),
2241
- })
2242
- .transform(d => ({
2243
- target_region: d.targetRegion,
2244
- target_services: d.targetServices,
2245
- subnets: d.subnets,
2246
- }));
2247
- export const marshalNetworkVpcEndpointsSchema = z
2248
- .object({
2249
- restApi: z.array(z.string()).optional(),
2250
- dataplaneRelay: z.array(z.string()).optional(),
2251
- })
2252
- .transform(d => ({
2253
- rest_api: d.restApi,
2254
- dataplane_relay: d.dataplaneRelay,
2255
- }));
2256
- export const marshalPrivateAccessSettingsSchema = z
2257
- .object({
2258
- privateAccessSettingsId: z.string().optional(),
2259
- accountId: z.string().optional(),
2260
- privateAccessSettingsName: z.string().optional(),
2261
- region: z.string().optional(),
2262
- publicAccessEnabled: z.boolean().optional(),
2263
- privateAccessLevel: z.string().optional(),
2264
- allowedVpcEndpointIds: z.array(z.string()).optional(),
2265
- })
2266
- .transform(d => ({
2267
- private_access_settings_id: d.privateAccessSettingsId,
2268
- account_id: d.accountId,
2269
- private_access_settings_name: d.privateAccessSettingsName,
2270
- region: d.region,
2271
- public_access_enabled: d.publicAccessEnabled,
2272
- private_access_level: d.privateAccessLevel,
2273
- allowed_vpc_endpoint_ids: d.allowedVpcEndpointIds,
2274
- }));
2275
- export const marshalReplaceAccountIpAccessListRequestSchema = z
2276
- .object({
2277
- accountId: z.string().optional(),
2278
- listId: z.string().optional(),
2279
- label: z.string().optional(),
2280
- listType: z.string().optional(),
2281
- ipAddresses: z.array(z.string()).optional(),
2282
- enabled: z.boolean().optional(),
2283
- })
2284
- .transform(d => ({
2285
- account_id: d.accountId,
2286
- list_id: d.listId,
2287
- label: d.label,
2288
- list_type: d.listType,
2289
- ip_addresses: d.ipAddresses,
2290
- enabled: d.enabled,
2291
- }));
2292
- export const marshalReplaceIpAccessListRequestSchema = z
2293
- .object({
2294
- listId: z.string().optional(),
2295
- label: z.string().optional(),
2296
- listType: z.string().optional(),
2297
- ipAddresses: z.array(z.string()).optional(),
2298
- enabled: z.boolean().optional(),
2299
- })
2300
- .transform(d => ({
2301
- list_id: d.listId,
2302
- label: d.label,
2303
- list_type: d.listType,
2304
- ip_addresses: d.ipAddresses,
2305
- enabled: d.enabled,
2306
- }));
2307
- export const marshalUpdateAccountIpAccessListRequestSchema = z
2308
- .object({
2309
- accountId: z.string().optional(),
2310
- listId: z.string().optional(),
2311
- label: z.string().optional(),
2312
- listType: z.string().optional(),
2313
- ipAddresses: z.array(z.string()).optional(),
2314
- enabled: z.boolean().optional(),
2315
- })
2316
- .transform(d => ({
2317
- account_id: d.accountId,
2318
- list_id: d.listId,
2319
- label: d.label,
2320
- list_type: d.listType,
2321
- ip_addresses: d.ipAddresses,
2322
- enabled: d.enabled,
2323
- }));
2324
- export const marshalUpdateIpAccessListRequestSchema = z
2325
- .object({
2326
- listId: z.string().optional(),
2327
- label: z.string().optional(),
2328
- listType: z.string().optional(),
2329
- ipAddresses: z.array(z.string()).optional(),
2330
- enabled: z.boolean().optional(),
2331
- })
2332
- .transform(d => ({
2333
- list_id: d.listId,
2334
- label: d.label,
2335
- list_type: d.listType,
2336
- ip_addresses: d.ipAddresses,
2337
- enabled: d.enabled,
2338
- }));
2339
- export const marshalUpdatePrivateEndpointRuleSchema = z
2340
- .object({
2341
- ruleId: z.string().optional(),
2342
- networkConnectivityConfigId: z.string().optional(),
2343
- connectionState: z.string().optional(),
2344
- domainNames: z.array(z.string()).optional(),
2345
- creationTime: z.bigint().optional(),
2346
- updatedTime: z.bigint().optional(),
2347
- deactivated: z.boolean().optional(),
2348
- deactivatedAt: z.bigint().optional(),
2349
- errorMessage: z.string().optional(),
2350
- resourceId: z.string().optional(),
2351
- groupId: z.string().optional(),
2352
- endpointName: z.string().optional(),
2353
- accountId: z.string().optional(),
2354
- endpointService: z.string().optional(),
2355
- resourceNames: z.array(z.string()).optional(),
2356
- vpcEndpointId: z.string().optional(),
2357
- enabled: z.boolean().optional(),
2358
- endpoint: z
2359
- .discriminatedUnion('$case', [
2360
- z.object({
2361
- $case: z.literal('gcpEndpoint'),
2362
- gcpEndpoint: z.lazy(() => marshalGcpEndpointSchema),
2363
- }),
2364
- ])
2365
- .optional(),
2366
- })
2367
- .transform(d => ({
2368
- rule_id: d.ruleId,
2369
- network_connectivity_config_id: d.networkConnectivityConfigId,
2370
- connection_state: d.connectionState,
2371
- domain_names: d.domainNames,
2372
- creation_time: d.creationTime,
2373
- updated_time: d.updatedTime,
2374
- deactivated: d.deactivated,
2375
- deactivated_at: d.deactivatedAt,
2376
- error_message: d.errorMessage,
2377
- resource_id: d.resourceId,
2378
- group_id: d.groupId,
2379
- endpoint_name: d.endpointName,
2380
- account_id: d.accountId,
2381
- endpoint_service: d.endpointService,
2382
- resource_names: d.resourceNames,
2383
- vpc_endpoint_id: d.vpcEndpointId,
2384
- enabled: d.enabled,
2385
- ...(d.endpoint?.$case === 'gcpEndpoint' && {
2386
- gcp_endpoint: d.endpoint.gcpEndpoint,
2387
- }),
2388
- }));
2389
- export const marshalWorkspaceNetworkOptionSchema = z
2390
- .object({
2391
- networkPolicyId: z.string().optional(),
2392
- workspaceId: z.bigint().optional(),
2393
- })
2394
- .transform(d => ({
2395
- network_policy_id: d.networkPolicyId,
2396
- workspace_id: d.workspaceId,
160
+ const unmarshalAccountIpAccessListSchema = z.object({
161
+ list_id: z.string().optional(),
162
+ label: z.string().optional(),
163
+ ip_addresses: z.array(z.string()).optional(),
164
+ address_count: z.number().optional(),
165
+ list_type: z.string().optional(),
166
+ created_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
167
+ created_by: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
168
+ updated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
169
+ updated_by: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
170
+ enabled: z.boolean().optional()
171
+ }).transform((d) => ({
172
+ listId: d.list_id,
173
+ label: d.label,
174
+ ipAddresses: d.ip_addresses,
175
+ addressCount: d.address_count,
176
+ listType: d.list_type,
177
+ createdAt: d.created_at,
178
+ createdBy: d.created_by,
179
+ updatedAt: d.updated_at,
180
+ updatedBy: d.updated_by,
181
+ enabled: d.enabled
182
+ }));
183
+ const unmarshalAccountNetworkPolicySchema = z.object({
184
+ network_policy_id: z.string().optional(),
185
+ account_id: z.string().optional(),
186
+ egress: z.lazy(() => unmarshalEgressNetworkPolicySchema).optional(),
187
+ ingress: z.lazy(() => unmarshalIngressNetworkPolicySchema).optional(),
188
+ ingress_dry_run: z.lazy(() => unmarshalIngressNetworkPolicySchema).optional()
189
+ }).transform((d) => ({
190
+ networkPolicyId: d.network_policy_id,
191
+ accountId: d.account_id,
192
+ egress: d.egress,
193
+ ingress: d.ingress,
194
+ ingressDryRun: d.ingress_dry_run
195
+ }));
196
+ const unmarshalAwsVpcEndpointInfoSchema = z.object({
197
+ aws_vpc_endpoint_id: z.string().optional(),
198
+ aws_endpoint_service_id: z.string().optional(),
199
+ aws_account_id: z.string().optional()
200
+ }).transform((d) => ({
201
+ awsVpcEndpointId: d.aws_vpc_endpoint_id,
202
+ awsEndpointServiceId: d.aws_endpoint_service_id,
203
+ awsAccountId: d.aws_account_id
204
+ }));
205
+ const unmarshalAzurePrivateEndpointInfoSchema = z.object({
206
+ private_endpoint_name: z.string().optional(),
207
+ private_endpoint_resource_guid: z.string().optional(),
208
+ private_endpoint_resource_id: z.string().optional(),
209
+ private_link_service_id: z.string().optional()
210
+ }).transform((d) => ({
211
+ privateEndpointName: d.private_endpoint_name,
212
+ privateEndpointResourceGuid: d.private_endpoint_resource_guid,
213
+ privateEndpointResourceId: d.private_endpoint_resource_id,
214
+ privateLinkServiceId: d.private_link_service_id
215
+ }));
216
+ const unmarshalCreateAccountIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalAccountIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
217
+ const unmarshalCreateIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
218
+ const unmarshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema = z.object({
219
+ default_rules: z.lazy(() => unmarshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema).optional(),
220
+ target_rules: z.lazy(() => unmarshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema).optional()
221
+ }).transform((d) => ({
222
+ defaultRules: d.default_rules,
223
+ targetRules: d.target_rules
224
+ }));
225
+ const unmarshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema = z.object({
226
+ azure_private_endpoint_rules: z.array(z.lazy(() => unmarshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema)).optional(),
227
+ aws_private_endpoint_rules: z.array(z.lazy(() => unmarshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema)).optional()
228
+ }).transform((d) => ({
229
+ azurePrivateEndpointRules: d.azure_private_endpoint_rules,
230
+ awsPrivateEndpointRules: d.aws_private_endpoint_rules
231
+ }));
232
+ const unmarshalDeleteAccountIpAccessListResponseSchema = z.object({});
233
+ const unmarshalDeleteIpAccessListResponseSchema = z.object({});
234
+ const unmarshalEgressNetworkPolicySchema = z.object({ network_access: z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicySchema).optional() }).transform((d) => ({ networkAccess: d.network_access }));
235
+ const unmarshalEgressNetworkPolicy_NetworkAccessPolicySchema = z.object({
236
+ restriction_mode: z.string().optional(),
237
+ allowed_internet_destinations: z.array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema)).optional(),
238
+ allowed_storage_destinations: z.array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema)).optional(),
239
+ policy_enforcement: z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema).optional(),
240
+ blocked_internet_destinations: z.array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema)).optional(),
241
+ allowed_databricks_destinations: z.array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema)).optional()
242
+ }).transform((d) => ({
243
+ restrictionMode: d.restriction_mode,
244
+ allowedInternetDestinations: d.allowed_internet_destinations,
245
+ allowedStorageDestinations: d.allowed_storage_destinations,
246
+ policyEnforcement: d.policy_enforcement,
247
+ blockedInternetDestinations: d.blocked_internet_destinations,
248
+ allowedDatabricksDestinations: d.allowed_databricks_destinations
249
+ }));
250
+ const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema = z.object({ workspace_ids: z.array(z.union([z.number(), z.bigint()]).transform((v) => BigInt(v))).optional() }).transform((d) => ({ workspaceIds: d.workspace_ids }));
251
+ const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema = z.object({
252
+ destination: z.string().optional(),
253
+ internet_destination_type: z.string().optional()
254
+ }).transform((d) => ({
255
+ destination: d.destination,
256
+ internetDestinationType: d.internet_destination_type
257
+ }));
258
+ const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema = z.object({
259
+ enforcement_mode: z.string().optional(),
260
+ dry_run_mode_product_filter: z.array(z.string()).optional()
261
+ }).transform((d) => ({
262
+ enforcementMode: d.enforcement_mode,
263
+ dryRunModeProductFilter: d.dry_run_mode_product_filter
264
+ }));
265
+ const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema = z.object({
266
+ bucket_name: z.string().optional(),
267
+ region: z.string().optional(),
268
+ storage_destination_type: z.string().optional(),
269
+ azure_storage_account: z.string().optional(),
270
+ azure_storage_service: z.string().optional()
271
+ }).transform((d) => ({
272
+ bucketName: d.bucket_name,
273
+ region: d.region,
274
+ storageDestinationType: d.storage_destination_type,
275
+ azureStorageAccount: d.azure_storage_account,
276
+ azureStorageService: d.azure_storage_service
277
+ }));
278
+ const unmarshalEndpointSchema = z.object({
279
+ name: z.string().optional(),
280
+ endpoint_id: z.string().optional(),
281
+ account_id: z.string().optional(),
282
+ display_name: z.string().optional(),
283
+ use_case: z.string().optional(),
284
+ region: z.string().optional(),
285
+ state: z.string().optional(),
286
+ azure_private_endpoint_info: z.lazy(() => unmarshalAzurePrivateEndpointInfoSchema).optional(),
287
+ aws_vpc_endpoint_info: z.lazy(() => unmarshalAwsVpcEndpointInfoSchema).optional(),
288
+ gcp_psc_endpoint_info: z.lazy(() => unmarshalGcpPscEndpointInfoSchema).optional(),
289
+ create_time: z.string().transform((s) => Temporal.Instant.from(s)).optional()
290
+ }).transform((d) => ({
291
+ name: d.name,
292
+ endpointId: d.endpoint_id,
293
+ accountId: d.account_id,
294
+ displayName: d.display_name,
295
+ useCase: d.use_case,
296
+ region: d.region,
297
+ state: d.state,
298
+ endpointInfo: d.azure_private_endpoint_info !== void 0 ? {
299
+ $case: "azurePrivateEndpointInfo",
300
+ azurePrivateEndpointInfo: d.azure_private_endpoint_info
301
+ } : d.aws_vpc_endpoint_info !== void 0 ? {
302
+ $case: "awsVpcEndpointInfo",
303
+ awsVpcEndpointInfo: d.aws_vpc_endpoint_info
304
+ } : d.gcp_psc_endpoint_info !== void 0 ? {
305
+ $case: "gcpPscEndpointInfo",
306
+ gcpPscEndpointInfo: d.gcp_psc_endpoint_info
307
+ } : void 0,
308
+ createTime: d.create_time
309
+ }));
310
+ const unmarshalGcpEndpointSchema = z.object({
311
+ psc_endpoint_uri: z.string().optional(),
312
+ service_attachment: z.string().optional(),
313
+ google_api_endpoints: z.lazy(() => unmarshalGoogleApiEndpointsSchema).optional(),
314
+ all_vpc_sc_services: z.boolean().optional()
315
+ }).transform((d) => ({
316
+ pscEndpointUri: d.psc_endpoint_uri,
317
+ targetServices: d.service_attachment !== void 0 ? {
318
+ $case: "serviceAttachment",
319
+ serviceAttachment: d.service_attachment
320
+ } : d.google_api_endpoints !== void 0 ? {
321
+ $case: "googleApiEndpoints",
322
+ googleApiEndpoints: d.google_api_endpoints
323
+ } : d.all_vpc_sc_services !== void 0 ? {
324
+ $case: "allVpcScServices",
325
+ allVpcScServices: d.all_vpc_sc_services
326
+ } : void 0
327
+ }));
328
+ const unmarshalGcpNetworkInfoSchema = z.object({
329
+ network_project_id: z.string().optional(),
330
+ vpc_id: z.string().optional(),
331
+ subnet_id: z.string().optional(),
332
+ subnet_region: z.string().optional(),
333
+ pod_ip_range_name: z.string().optional(),
334
+ service_ip_range_name: z.string().optional()
335
+ }).transform((d) => ({
336
+ networkProjectId: d.network_project_id,
337
+ vpcId: d.vpc_id,
338
+ subnetId: d.subnet_id,
339
+ subnetRegion: d.subnet_region,
340
+ podIpRangeName: d.pod_ip_range_name,
341
+ serviceIpRangeName: d.service_ip_range_name
342
+ }));
343
+ const unmarshalGcpPscEndpointInfoSchema = z.object({
344
+ psc_connection_id: z.string().optional(),
345
+ project_id: z.string().optional(),
346
+ psc_endpoint: z.string().optional(),
347
+ endpoint_region: z.string().optional(),
348
+ service_attachment_id: z.string().optional()
349
+ }).transform((d) => ({
350
+ pscConnectionId: d.psc_connection_id,
351
+ projectId: d.project_id,
352
+ pscEndpoint: d.psc_endpoint,
353
+ endpointRegion: d.endpoint_region,
354
+ serviceAttachmentId: d.service_attachment_id
355
+ }));
356
+ const unmarshalGcpVpcEndpointInfoSchema = z.object({
357
+ psc_connection_id: z.string().optional(),
358
+ project_id: z.string().optional(),
359
+ psc_endpoint_name: z.string().optional(),
360
+ endpoint_region: z.string().optional(),
361
+ service_attachment_id: z.string().optional()
362
+ }).transform((d) => ({
363
+ pscConnectionId: d.psc_connection_id,
364
+ projectId: d.project_id,
365
+ pscEndpointName: d.psc_endpoint_name,
366
+ endpointRegion: d.endpoint_region,
367
+ serviceAttachmentId: d.service_attachment_id
368
+ }));
369
+ const unmarshalGetAccountIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalAccountIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
370
+ const unmarshalGetIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
371
+ const unmarshalGoogleApiEndpointsSchema = z.object({ endpoints: z.array(z.string()).optional() }).transform((d) => ({ endpoints: d.endpoints }));
372
+ const unmarshalIngressNetworkPolicySchema = z.object({
373
+ public_access: z.lazy(() => unmarshalIngressNetworkPolicy_PublicAccessSchema).optional(),
374
+ private_access: z.lazy(() => unmarshalIngressNetworkPolicy_PrivateAccessSchema).optional(),
375
+ cross_workspace_access: z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceAccessSchema).optional()
376
+ }).transform((d) => ({
377
+ publicAccess: d.public_access,
378
+ privateAccess: d.private_access,
379
+ crossWorkspaceAccess: d.cross_workspace_access
380
+ }));
381
+ const unmarshalIngressNetworkPolicy_AccountApiDestinationSchema = z.object({
382
+ scopes: z.array(z.string()).optional(),
383
+ scope_qualifier: z.string().optional()
384
+ }).transform((d) => ({
385
+ scopes: d.scopes,
386
+ scopeQualifier: d.scope_qualifier
387
+ }));
388
+ const unmarshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
389
+ const unmarshalIngressNetworkPolicy_AccountUiDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
390
+ const unmarshalIngressNetworkPolicy_AppsRuntimeDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
391
+ const unmarshalIngressNetworkPolicy_AuthenticationSchema = z.object({
392
+ identity_type: z.string().optional(),
393
+ identities: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_AuthenticationIdentitySchema)).optional()
394
+ }).transform((d) => ({
395
+ identityType: d.identity_type,
396
+ identities: d.identities
397
+ }));
398
+ const unmarshalIngressNetworkPolicy_AuthenticationIdentitySchema = z.object({
399
+ principal_type: z.string().optional(),
400
+ principal_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
401
+ }).transform((d) => ({
402
+ principalType: d.principal_type,
403
+ principalId: d.principal_id
404
+ }));
405
+ const unmarshalIngressNetworkPolicy_CrossWorkspaceAccessSchema = z.object({
406
+ restriction_mode: z.string().optional(),
407
+ deny_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema)).optional(),
408
+ allow_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema)).optional()
409
+ }).transform((d) => ({
410
+ restrictionMode: d.restriction_mode,
411
+ denyRules: d.deny_rules,
412
+ allowRules: d.allow_rules
413
+ }));
414
+ const unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema = z.object({
415
+ origin: z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema).optional(),
416
+ destination: z.lazy(() => unmarshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
417
+ authentication: z.lazy(() => unmarshalIngressNetworkPolicy_AuthenticationSchema).optional(),
418
+ label: z.string().optional()
419
+ }).transform((d) => ({
420
+ origin: d.origin,
421
+ destination: d.destination,
422
+ authentication: d.authentication,
423
+ label: d.label
424
+ }));
425
+ const unmarshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema = z.object({
426
+ all_source_workspaces: z.boolean().optional(),
427
+ selected_workspaces: z.lazy(() => unmarshalIngressNetworkPolicy_WorkspaceIdListSchema).optional()
428
+ }).transform((d) => ({ source: d.all_source_workspaces !== void 0 ? {
429
+ $case: "allSourceWorkspaces",
430
+ allSourceWorkspaces: d.all_source_workspaces
431
+ } : d.selected_workspaces !== void 0 ? {
432
+ $case: "selectedWorkspaces",
433
+ selectedWorkspaces: d.selected_workspaces
434
+ } : void 0 }));
435
+ const unmarshalIngressNetworkPolicy_EndpointsSchema = z.object({ endpoint_ids: z.array(z.string()).optional() }).transform((d) => ({ endpointIds: d.endpoint_ids }));
436
+ const unmarshalIngressNetworkPolicy_IpRangesSchema = z.object({ ip_ranges: z.array(z.string()).optional() }).transform((d) => ({ ipRanges: d.ip_ranges }));
437
+ const unmarshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
438
+ const unmarshalIngressNetworkPolicy_PrivateAccessSchema = z.object({
439
+ restriction_mode: z.string().optional(),
440
+ deny_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema)).optional(),
441
+ allow_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema)).optional()
442
+ }).transform((d) => ({
443
+ restrictionMode: d.restriction_mode,
444
+ denyRules: d.deny_rules,
445
+ allowRules: d.allow_rules
446
+ }));
447
+ const unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema = z.object({
448
+ origin: z.lazy(() => unmarshalIngressNetworkPolicy_PrivateRequestOriginSchema).optional(),
449
+ destination: z.lazy(() => unmarshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
450
+ authentication: z.lazy(() => unmarshalIngressNetworkPolicy_AuthenticationSchema).optional(),
451
+ label: z.string().optional()
452
+ }).transform((d) => ({
453
+ origin: d.origin,
454
+ destination: d.destination,
455
+ authentication: d.authentication,
456
+ label: d.label
457
+ }));
458
+ const unmarshalIngressNetworkPolicy_PrivateRequestOriginSchema = z.object({
459
+ endpoints: z.lazy(() => unmarshalIngressNetworkPolicy_EndpointsSchema).optional(),
460
+ all_registered_endpoints: z.boolean().optional(),
461
+ azure_workspace_private_link: z.boolean().optional(),
462
+ all_private_access: z.boolean().optional()
463
+ }).transform((d) => ({ source: d.endpoints !== void 0 ? {
464
+ $case: "endpoints",
465
+ endpoints: d.endpoints
466
+ } : d.all_registered_endpoints !== void 0 ? {
467
+ $case: "allRegisteredEndpoints",
468
+ allRegisteredEndpoints: d.all_registered_endpoints
469
+ } : d.azure_workspace_private_link !== void 0 ? {
470
+ $case: "azureWorkspacePrivateLink",
471
+ azureWorkspacePrivateLink: d.azure_workspace_private_link
472
+ } : d.all_private_access !== void 0 ? {
473
+ $case: "allPrivateAccess",
474
+ allPrivateAccess: d.all_private_access
475
+ } : void 0 }));
476
+ const unmarshalIngressNetworkPolicy_PublicAccessSchema = z.object({
477
+ restriction_mode: z.string().optional(),
478
+ deny_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_PublicIngressRuleSchema)).optional(),
479
+ allow_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_PublicIngressRuleSchema)).optional()
480
+ }).transform((d) => ({
481
+ restrictionMode: d.restriction_mode,
482
+ denyRules: d.deny_rules,
483
+ allowRules: d.allow_rules
484
+ }));
485
+ const unmarshalIngressNetworkPolicy_PublicIngressRuleSchema = z.object({
486
+ origin: z.lazy(() => unmarshalIngressNetworkPolicy_PublicRequestOriginSchema).optional(),
487
+ destination: z.lazy(() => unmarshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
488
+ authentication: z.lazy(() => unmarshalIngressNetworkPolicy_AuthenticationSchema).optional(),
489
+ label: z.string().optional()
490
+ }).transform((d) => ({
491
+ origin: d.origin,
492
+ destination: d.destination,
493
+ authentication: d.authentication,
494
+ label: d.label
495
+ }));
496
+ const unmarshalIngressNetworkPolicy_PublicRequestOriginSchema = z.object({
497
+ all_ip_ranges: z.boolean().optional(),
498
+ included_ip_ranges: z.lazy(() => unmarshalIngressNetworkPolicy_IpRangesSchema).optional(),
499
+ excluded_ip_ranges: z.lazy(() => unmarshalIngressNetworkPolicy_IpRangesSchema).optional()
500
+ }).transform((d) => ({ source: d.all_ip_ranges !== void 0 ? {
501
+ $case: "allIpRanges",
502
+ allIpRanges: d.all_ip_ranges
503
+ } : d.included_ip_ranges !== void 0 ? {
504
+ $case: "includedIpRanges",
505
+ includedIpRanges: d.included_ip_ranges
506
+ } : d.excluded_ip_ranges !== void 0 ? {
507
+ $case: "excludedIpRanges",
508
+ excludedIpRanges: d.excluded_ip_ranges
509
+ } : void 0 }));
510
+ const unmarshalIngressNetworkPolicy_RequestDestinationSchema = z.object({
511
+ all_destinations: z.boolean().optional(),
512
+ workspace_ui: z.lazy(() => unmarshalIngressNetworkPolicy_WorkspaceUiDestinationSchema).optional(),
513
+ workspace_api: z.lazy(() => unmarshalIngressNetworkPolicy_WorkspaceApiDestinationSchema).optional(),
514
+ apps_runtime: z.lazy(() => unmarshalIngressNetworkPolicy_AppsRuntimeDestinationSchema).optional(),
515
+ lakebase_runtime: z.lazy(() => unmarshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema).optional(),
516
+ account_ui: z.lazy(() => unmarshalIngressNetworkPolicy_AccountUiDestinationSchema).optional(),
517
+ account_api: z.lazy(() => unmarshalIngressNetworkPolicy_AccountApiDestinationSchema).optional(),
518
+ account_databricks_one: z.lazy(() => unmarshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema).optional()
519
+ }).transform((d) => ({
520
+ allDestinations: d.all_destinations,
521
+ workspaceUi: d.workspace_ui,
522
+ workspaceApi: d.workspace_api,
523
+ appsRuntime: d.apps_runtime,
524
+ lakebaseRuntime: d.lakebase_runtime,
525
+ accountUi: d.account_ui,
526
+ accountApi: d.account_api,
527
+ accountDatabricksOne: d.account_databricks_one
528
+ }));
529
+ const unmarshalIngressNetworkPolicy_WorkspaceApiDestinationSchema = z.object({
530
+ scopes: z.array(z.string()).optional(),
531
+ scope_qualifier: z.string().optional()
532
+ }).transform((d) => ({
533
+ scopes: d.scopes,
534
+ scopeQualifier: d.scope_qualifier
535
+ }));
536
+ const unmarshalIngressNetworkPolicy_WorkspaceIdListSchema = z.object({ workspace_ids: z.array(z.union([z.number(), z.bigint()]).transform((v) => BigInt(v))).optional() }).transform((d) => ({ workspaceIds: d.workspace_ids }));
537
+ const unmarshalIngressNetworkPolicy_WorkspaceUiDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
538
+ const unmarshalIpAccessListSchema = z.object({
539
+ list_id: z.string().optional(),
540
+ label: z.string().optional(),
541
+ ip_addresses: z.array(z.string()).optional(),
542
+ address_count: z.number().optional(),
543
+ list_type: z.string().optional(),
544
+ created_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
545
+ created_by: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
546
+ updated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
547
+ updated_by: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
548
+ enabled: z.boolean().optional()
549
+ }).transform((d) => ({
550
+ listId: d.list_id,
551
+ label: d.label,
552
+ ipAddresses: d.ip_addresses,
553
+ addressCount: d.address_count,
554
+ listType: d.list_type,
555
+ createdAt: d.created_at,
556
+ createdBy: d.created_by,
557
+ updatedAt: d.updated_at,
558
+ updatedBy: d.updated_by,
559
+ enabled: d.enabled
560
+ }));
561
+ const unmarshalListAccountIpAccessListsResponseSchema = z.object({ ip_access_lists: z.array(z.lazy(() => unmarshalAccountIpAccessListSchema)).optional() }).transform((d) => ({ ipAccessLists: d.ip_access_lists }));
562
+ const unmarshalListEndpointsResponseSchema = z.object({
563
+ items: z.array(z.lazy(() => unmarshalEndpointSchema)).optional(),
564
+ next_page_token: z.string().optional()
565
+ }).transform((d) => ({
566
+ items: d.items,
567
+ nextPageToken: d.next_page_token
568
+ }));
569
+ const unmarshalListIpAccessListsResponseSchema = z.object({ ip_access_lists: z.array(z.lazy(() => unmarshalIpAccessListSchema)).optional() }).transform((d) => ({ ipAccessLists: d.ip_access_lists }));
570
+ const unmarshalListNccPrivateEndpointRulesResponseSchema = z.object({
571
+ items: z.array(z.lazy(() => unmarshalNccPrivateEndpointRuleSchema)).optional(),
572
+ next_page_token: z.string().optional()
573
+ }).transform((d) => ({
574
+ items: d.items,
575
+ nextPageToken: d.next_page_token
576
+ }));
577
+ const unmarshalListNetworkConnectivityConfigsResponseSchema = z.object({
578
+ items: z.array(z.lazy(() => unmarshalNetworkConnectivityConfigSchema)).optional(),
579
+ next_page_token: z.string().optional()
580
+ }).transform((d) => ({
581
+ items: d.items,
582
+ nextPageToken: d.next_page_token
583
+ }));
584
+ const unmarshalListNetworkPoliciesResponseSchema = z.object({
585
+ items: z.array(z.lazy(() => unmarshalAccountNetworkPolicySchema)).optional(),
586
+ next_page_token: z.string().optional()
587
+ }).transform((d) => ({
588
+ items: d.items,
589
+ nextPageToken: d.next_page_token
590
+ }));
591
+ const unmarshalNccPrivateEndpointRuleSchema = z.object({
592
+ rule_id: z.string().optional(),
593
+ network_connectivity_config_id: z.string().optional(),
594
+ connection_state: z.string().optional(),
595
+ domain_names: z.array(z.string()).optional(),
596
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
597
+ updated_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
598
+ deactivated: z.boolean().optional(),
599
+ deactivated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
600
+ error_message: z.string().optional(),
601
+ resource_id: z.string().optional(),
602
+ group_id: z.string().optional(),
603
+ endpoint_name: z.string().optional(),
604
+ account_id: z.string().optional(),
605
+ endpoint_service: z.string().optional(),
606
+ resource_names: z.array(z.string()).optional(),
607
+ vpc_endpoint_id: z.string().optional(),
608
+ enabled: z.boolean().optional(),
609
+ gcp_endpoint: z.lazy(() => unmarshalGcpEndpointSchema).optional()
610
+ }).transform((d) => ({
611
+ ruleId: d.rule_id,
612
+ networkConnectivityConfigId: d.network_connectivity_config_id,
613
+ connectionState: d.connection_state,
614
+ domainNames: d.domain_names,
615
+ creationTime: d.creation_time,
616
+ updatedTime: d.updated_time,
617
+ deactivated: d.deactivated,
618
+ deactivatedAt: d.deactivated_at,
619
+ errorMessage: d.error_message,
620
+ resourceId: d.resource_id,
621
+ groupId: d.group_id,
622
+ endpointName: d.endpoint_name,
623
+ accountId: d.account_id,
624
+ endpointService: d.endpoint_service,
625
+ resourceNames: d.resource_names,
626
+ vpcEndpointId: d.vpc_endpoint_id,
627
+ enabled: d.enabled,
628
+ endpoint: d.gcp_endpoint !== void 0 ? {
629
+ $case: "gcpEndpoint",
630
+ gcpEndpoint: d.gcp_endpoint
631
+ } : void 0
632
+ }));
633
+ const unmarshalNetworkSchema = z.object({
634
+ network_id: z.string().optional(),
635
+ account_id: z.string().optional(),
636
+ workspace_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
637
+ vpc_id: z.string().optional(),
638
+ subnet_ids: z.array(z.string()).optional(),
639
+ security_group_ids: z.array(z.string()).optional(),
640
+ vpc_status: z.string().optional(),
641
+ error_messages: z.array(z.lazy(() => unmarshalNetworkHealthSchema)).optional(),
642
+ network_name: z.string().optional(),
643
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
644
+ warning_messages: z.array(z.lazy(() => unmarshalNetworkWarningSchema)).optional(),
645
+ vpc_endpoints: z.lazy(() => unmarshalNetworkVpcEndpointsSchema).optional(),
646
+ gcp_network_info: z.lazy(() => unmarshalGcpNetworkInfoSchema).optional()
647
+ }).transform((d) => ({
648
+ networkId: d.network_id,
649
+ accountId: d.account_id,
650
+ workspaceId: d.workspace_id,
651
+ vpcId: d.vpc_id,
652
+ subnetIds: d.subnet_ids,
653
+ securityGroupIds: d.security_group_ids,
654
+ vpcStatus: d.vpc_status,
655
+ errorMessages: d.error_messages,
656
+ networkName: d.network_name,
657
+ creationTime: d.creation_time,
658
+ warningMessages: d.warning_messages,
659
+ vpcEndpoints: d.vpc_endpoints,
660
+ networkInfo: d.gcp_network_info !== void 0 ? {
661
+ $case: "gcpNetworkInfo",
662
+ gcpNetworkInfo: d.gcp_network_info
663
+ } : void 0
664
+ }));
665
+ const unmarshalNetworkConnectivityConfigSchema = z.object({
666
+ network_connectivity_config_id: z.string().optional(),
667
+ account_id: z.string().optional(),
668
+ name: z.string().optional(),
669
+ region: z.string().optional(),
670
+ egress_config: z.lazy(() => unmarshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema).optional(),
671
+ updated_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
672
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
673
+ }).transform((d) => ({
674
+ networkConnectivityConfigId: d.network_connectivity_config_id,
675
+ accountId: d.account_id,
676
+ name: d.name,
677
+ region: d.region,
678
+ egressConfig: d.egress_config,
679
+ updatedTime: d.updated_time,
680
+ creationTime: d.creation_time
681
+ }));
682
+ const unmarshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema = z.object({
683
+ rule_id: z.string().optional(),
684
+ network_connectivity_config_id: z.string().optional(),
685
+ account_id: z.string().optional(),
686
+ endpoint_service: z.string().optional(),
687
+ domain_names: z.array(z.string()).optional(),
688
+ resource_names: z.array(z.string()).optional(),
689
+ vpc_endpoint_id: z.string().optional(),
690
+ connection_state: z.string().optional(),
691
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
692
+ updated_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
693
+ deactivated: z.boolean().optional(),
694
+ deactivated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
695
+ enabled: z.boolean().optional(),
696
+ error_message: z.string().optional()
697
+ }).transform((d) => ({
698
+ ruleId: d.rule_id,
699
+ networkConnectivityConfigId: d.network_connectivity_config_id,
700
+ accountId: d.account_id,
701
+ endpointService: d.endpoint_service,
702
+ domainNames: d.domain_names,
703
+ resourceNames: d.resource_names,
704
+ vpcEndpointId: d.vpc_endpoint_id,
705
+ connectionState: d.connection_state,
706
+ creationTime: d.creation_time,
707
+ updatedTime: d.updated_time,
708
+ deactivated: d.deactivated,
709
+ deactivatedAt: d.deactivated_at,
710
+ enabled: d.enabled,
711
+ errorMessage: d.error_message
712
+ }));
713
+ const unmarshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema = z.object({
714
+ rule_id: z.string().optional(),
715
+ network_connectivity_config_id: z.string().optional(),
716
+ resource_id: z.string().optional(),
717
+ group_id: z.string().optional(),
718
+ endpoint_name: z.string().optional(),
719
+ connection_state: z.string().optional(),
720
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
721
+ updated_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
722
+ deactivated: z.boolean().optional(),
723
+ deactivated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
724
+ domain_names: z.array(z.string()).optional(),
725
+ error_message: z.string().optional()
726
+ }).transform((d) => ({
727
+ ruleId: d.rule_id,
728
+ networkConnectivityConfigId: d.network_connectivity_config_id,
729
+ resourceId: d.resource_id,
730
+ groupId: d.group_id,
731
+ endpointName: d.endpoint_name,
732
+ connectionState: d.connection_state,
733
+ creationTime: d.creation_time,
734
+ updatedTime: d.updated_time,
735
+ deactivated: d.deactivated,
736
+ deactivatedAt: d.deactivated_at,
737
+ domainNames: d.domain_names,
738
+ errorMessage: d.error_message
739
+ }));
740
+ const unmarshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema = z.object({
741
+ azure_service_endpoint_rule: z.lazy(() => unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema).optional(),
742
+ aws_stable_ip_rule: z.lazy(() => unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema).optional()
743
+ }).transform((d) => ({
744
+ azureServiceEndpointRule: d.azure_service_endpoint_rule,
745
+ awsStableIpRule: d.aws_stable_ip_rule
746
+ }));
747
+ const unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema = z.object({ cidr_blocks: z.array(z.string()).optional() }).transform((d) => ({ cidrBlocks: d.cidr_blocks }));
748
+ const unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema = z.object({
749
+ target_region: z.string().optional(),
750
+ target_services: z.array(z.string()).optional(),
751
+ subnets: z.array(z.string()).optional()
752
+ }).transform((d) => ({
753
+ targetRegion: d.target_region,
754
+ targetServices: d.target_services,
755
+ subnets: d.subnets
756
+ }));
757
+ const unmarshalNetworkHealthSchema = z.object({
758
+ error_type: z.string().optional(),
759
+ error_message: z.string().optional()
760
+ }).transform((d) => ({
761
+ errorType: d.error_type,
762
+ errorMessage: d.error_message
763
+ }));
764
+ const unmarshalNetworkVpcEndpointsSchema = z.object({
765
+ rest_api: z.array(z.string()).optional(),
766
+ dataplane_relay: z.array(z.string()).optional()
767
+ }).transform((d) => ({
768
+ restApi: d.rest_api,
769
+ dataplaneRelay: d.dataplane_relay
770
+ }));
771
+ const unmarshalNetworkWarningSchema = z.object({
772
+ warning_type: z.string().optional(),
773
+ warning_message: z.string().optional()
774
+ }).transform((d) => ({
775
+ warningType: d.warning_type,
776
+ warningMessage: d.warning_message
777
+ }));
778
+ const unmarshalPrivateAccessSettingsSchema = z.object({
779
+ private_access_settings_id: z.string().optional(),
780
+ account_id: z.string().optional(),
781
+ private_access_settings_name: z.string().optional(),
782
+ region: z.string().optional(),
783
+ public_access_enabled: z.boolean().optional(),
784
+ private_access_level: z.string().optional(),
785
+ allowed_vpc_endpoint_ids: z.array(z.string()).optional()
786
+ }).transform((d) => ({
787
+ privateAccessSettingsId: d.private_access_settings_id,
788
+ accountId: d.account_id,
789
+ privateAccessSettingsName: d.private_access_settings_name,
790
+ region: d.region,
791
+ publicAccessEnabled: d.public_access_enabled,
792
+ privateAccessLevel: d.private_access_level,
793
+ allowedVpcEndpointIds: d.allowed_vpc_endpoint_ids
794
+ }));
795
+ const unmarshalReplaceAccountIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalAccountIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
796
+ const unmarshalReplaceIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
797
+ const unmarshalUpdateAccountIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalAccountIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
798
+ const unmarshalUpdateIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
799
+ const unmarshalVpcEndpointSchema = z.object({
800
+ vpc_endpoint_id: z.string().optional(),
801
+ account_id: z.string().optional(),
802
+ vpc_endpoint_name: z.string().optional(),
803
+ aws_vpc_endpoint_id: z.string().optional(),
804
+ aws_endpoint_service_id: z.string().optional(),
805
+ use_case: z.string().optional(),
806
+ region: z.string().optional(),
807
+ aws_account_id: z.string().optional(),
808
+ state: z.string().optional(),
809
+ gcp_vpc_endpoint_info: z.lazy(() => unmarshalGcpVpcEndpointInfoSchema).optional()
810
+ }).transform((d) => ({
811
+ vpcEndpointId: d.vpc_endpoint_id,
812
+ accountId: d.account_id,
813
+ vpcEndpointName: d.vpc_endpoint_name,
814
+ awsVpcEndpointId: d.aws_vpc_endpoint_id,
815
+ awsEndpointServiceId: d.aws_endpoint_service_id,
816
+ useCase: d.use_case,
817
+ region: d.region,
818
+ awsAccountId: d.aws_account_id,
819
+ state: d.state,
820
+ vpcEndpointInfo: d.gcp_vpc_endpoint_info !== void 0 ? {
821
+ $case: "gcpVpcEndpointInfo",
822
+ gcpVpcEndpointInfo: d.gcp_vpc_endpoint_info
823
+ } : void 0
824
+ }));
825
+ const unmarshalWorkspaceNetworkOptionSchema = z.object({
826
+ network_policy_id: z.string().optional(),
827
+ workspace_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
828
+ }).transform((d) => ({
829
+ networkPolicyId: d.network_policy_id,
830
+ workspaceId: d.workspace_id
831
+ }));
832
+ const marshalAccountNetworkPolicySchema = z.object({
833
+ networkPolicyId: z.string().optional(),
834
+ accountId: z.string().optional(),
835
+ egress: z.lazy(() => marshalEgressNetworkPolicySchema).optional(),
836
+ ingress: z.lazy(() => marshalIngressNetworkPolicySchema).optional(),
837
+ ingressDryRun: z.lazy(() => marshalIngressNetworkPolicySchema).optional()
838
+ }).transform((d) => ({
839
+ network_policy_id: d.networkPolicyId,
840
+ account_id: d.accountId,
841
+ egress: d.egress,
842
+ ingress: d.ingress,
843
+ ingress_dry_run: d.ingressDryRun
844
+ }));
845
+ const marshalAwsVpcEndpointInfoSchema = z.object({
846
+ awsVpcEndpointId: z.string().optional(),
847
+ awsEndpointServiceId: z.string().optional(),
848
+ awsAccountId: z.string().optional()
849
+ }).transform((d) => ({
850
+ aws_vpc_endpoint_id: d.awsVpcEndpointId,
851
+ aws_endpoint_service_id: d.awsEndpointServiceId,
852
+ aws_account_id: d.awsAccountId
853
+ }));
854
+ const marshalAzurePrivateEndpointInfoSchema = z.object({
855
+ privateEndpointName: z.string().optional(),
856
+ privateEndpointResourceGuid: z.string().optional(),
857
+ privateEndpointResourceId: z.string().optional(),
858
+ privateLinkServiceId: z.string().optional()
859
+ }).transform((d) => ({
860
+ private_endpoint_name: d.privateEndpointName,
861
+ private_endpoint_resource_guid: d.privateEndpointResourceGuid,
862
+ private_endpoint_resource_id: d.privateEndpointResourceId,
863
+ private_link_service_id: d.privateLinkServiceId
864
+ }));
865
+ const marshalCreateAccountIpAccessListRequestSchema = z.object({
866
+ accountId: z.string().optional(),
867
+ label: z.string().optional(),
868
+ listType: z.string().optional(),
869
+ ipAddresses: z.array(z.string()).optional()
870
+ }).transform((d) => ({
871
+ account_id: d.accountId,
872
+ label: d.label,
873
+ list_type: d.listType,
874
+ ip_addresses: d.ipAddresses
875
+ }));
876
+ const marshalCreateIpAccessListRequestSchema = z.object({
877
+ label: z.string().optional(),
878
+ listType: z.string().optional(),
879
+ ipAddresses: z.array(z.string()).optional()
880
+ }).transform((d) => ({
881
+ label: d.label,
882
+ list_type: d.listType,
883
+ ip_addresses: d.ipAddresses
884
+ }));
885
+ const marshalCreateNetworkConnectivityConfigurationSchema = z.object({
886
+ networkConnectivityConfigId: z.string().optional(),
887
+ accountId: z.string().optional(),
888
+ name: z.string().optional(),
889
+ region: z.string().optional(),
890
+ egressConfig: z.lazy(() => marshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema).optional(),
891
+ updatedTime: z.bigint().optional(),
892
+ creationTime: z.bigint().optional()
893
+ }).transform((d) => ({
894
+ network_connectivity_config_id: d.networkConnectivityConfigId,
895
+ account_id: d.accountId,
896
+ name: d.name,
897
+ region: d.region,
898
+ egress_config: d.egressConfig,
899
+ updated_time: d.updatedTime,
900
+ creation_time: d.creationTime
901
+ }));
902
+ const marshalCreateNetworkRequestSchema = z.object({
903
+ accountId: z.string().optional(),
904
+ networkName: z.string().optional(),
905
+ vpcId: z.string().optional(),
906
+ subnetIds: z.array(z.string()).optional(),
907
+ securityGroupIds: z.array(z.string()).optional(),
908
+ vpcEndpoints: z.lazy(() => marshalNetworkVpcEndpointsSchema).optional(),
909
+ gcpNetworkInfo: z.lazy(() => marshalGcpNetworkInfoSchema).optional()
910
+ }).transform((d) => ({
911
+ account_id: d.accountId,
912
+ network_name: d.networkName,
913
+ vpc_id: d.vpcId,
914
+ subnet_ids: d.subnetIds,
915
+ security_group_ids: d.securityGroupIds,
916
+ vpc_endpoints: d.vpcEndpoints,
917
+ gcp_network_info: d.gcpNetworkInfo
918
+ }));
919
+ const marshalCreatePrivateAccessSettingsRequestSchema = z.object({
920
+ accountId: z.string().optional(),
921
+ privateAccessSettingsName: z.string().optional(),
922
+ region: z.string().optional(),
923
+ publicAccessEnabled: z.boolean().optional(),
924
+ privateAccessLevel: z.string().optional(),
925
+ allowedVpcEndpointIds: z.array(z.string()).optional()
926
+ }).transform((d) => ({
927
+ account_id: d.accountId,
928
+ private_access_settings_name: d.privateAccessSettingsName,
929
+ region: d.region,
930
+ public_access_enabled: d.publicAccessEnabled,
931
+ private_access_level: d.privateAccessLevel,
932
+ allowed_vpc_endpoint_ids: d.allowedVpcEndpointIds
933
+ }));
934
+ const marshalCreatePrivateEndpointRuleSchema = z.object({
935
+ ruleId: z.string().optional(),
936
+ networkConnectivityConfigId: z.string().optional(),
937
+ connectionState: z.string().optional(),
938
+ domainNames: z.array(z.string()).optional(),
939
+ creationTime: z.bigint().optional(),
940
+ updatedTime: z.bigint().optional(),
941
+ deactivated: z.boolean().optional(),
942
+ deactivatedAt: z.bigint().optional(),
943
+ errorMessage: z.string().optional(),
944
+ resourceId: z.string().optional(),
945
+ groupId: z.string().optional(),
946
+ endpointName: z.string().optional(),
947
+ accountId: z.string().optional(),
948
+ endpointService: z.string().optional(),
949
+ resourceNames: z.array(z.string()).optional(),
950
+ vpcEndpointId: z.string().optional(),
951
+ enabled: z.boolean().optional(),
952
+ endpoint: z.discriminatedUnion("$case", [z.object({
953
+ $case: z.literal("gcpEndpoint"),
954
+ gcpEndpoint: z.lazy(() => marshalGcpEndpointSchema)
955
+ })]).optional()
956
+ }).transform((d) => ({
957
+ rule_id: d.ruleId,
958
+ network_connectivity_config_id: d.networkConnectivityConfigId,
959
+ connection_state: d.connectionState,
960
+ domain_names: d.domainNames,
961
+ creation_time: d.creationTime,
962
+ updated_time: d.updatedTime,
963
+ deactivated: d.deactivated,
964
+ deactivated_at: d.deactivatedAt,
965
+ error_message: d.errorMessage,
966
+ resource_id: d.resourceId,
967
+ group_id: d.groupId,
968
+ endpoint_name: d.endpointName,
969
+ account_id: d.accountId,
970
+ endpoint_service: d.endpointService,
971
+ resource_names: d.resourceNames,
972
+ vpc_endpoint_id: d.vpcEndpointId,
973
+ enabled: d.enabled,
974
+ ...d.endpoint?.$case === "gcpEndpoint" && { gcp_endpoint: d.endpoint.gcpEndpoint }
975
+ }));
976
+ const marshalCreateVpcEndpointRequestSchema = z.object({
977
+ accountId: z.string().optional(),
978
+ vpcEndpointName: z.string().optional(),
979
+ region: z.string().optional(),
980
+ awsVpcEndpointId: z.string().optional(),
981
+ vpcEndpointInfo: z.discriminatedUnion("$case", [z.object({
982
+ $case: z.literal("gcpVpcEndpointInfo"),
983
+ gcpVpcEndpointInfo: z.lazy(() => marshalGcpVpcEndpointInfoSchema)
984
+ })]).optional()
985
+ }).transform((d) => ({
986
+ account_id: d.accountId,
987
+ vpc_endpoint_name: d.vpcEndpointName,
988
+ region: d.region,
989
+ aws_vpc_endpoint_id: d.awsVpcEndpointId,
990
+ ...d.vpcEndpointInfo?.$case === "gcpVpcEndpointInfo" && { gcp_vpc_endpoint_info: d.vpcEndpointInfo.gcpVpcEndpointInfo }
991
+ }));
992
+ const marshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema = z.object({
993
+ defaultRules: z.lazy(() => marshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema).optional(),
994
+ targetRules: z.lazy(() => marshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema).optional()
995
+ }).transform((d) => ({
996
+ default_rules: d.defaultRules,
997
+ target_rules: d.targetRules
998
+ }));
999
+ const marshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema = z.object({
1000
+ azurePrivateEndpointRules: z.array(z.lazy(() => marshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema)).optional(),
1001
+ awsPrivateEndpointRules: z.array(z.lazy(() => marshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema)).optional()
1002
+ }).transform((d) => ({
1003
+ azure_private_endpoint_rules: d.azurePrivateEndpointRules,
1004
+ aws_private_endpoint_rules: d.awsPrivateEndpointRules
1005
+ }));
1006
+ const marshalEgressNetworkPolicySchema = z.object({ networkAccess: z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicySchema).optional() }).transform((d) => ({ network_access: d.networkAccess }));
1007
+ const marshalEgressNetworkPolicy_NetworkAccessPolicySchema = z.object({
1008
+ restrictionMode: z.string().optional(),
1009
+ allowedInternetDestinations: z.array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema)).optional(),
1010
+ allowedStorageDestinations: z.array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema)).optional(),
1011
+ policyEnforcement: z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema).optional(),
1012
+ blockedInternetDestinations: z.array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema)).optional(),
1013
+ allowedDatabricksDestinations: z.array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema)).optional()
1014
+ }).transform((d) => ({
1015
+ restriction_mode: d.restrictionMode,
1016
+ allowed_internet_destinations: d.allowedInternetDestinations,
1017
+ allowed_storage_destinations: d.allowedStorageDestinations,
1018
+ policy_enforcement: d.policyEnforcement,
1019
+ blocked_internet_destinations: d.blockedInternetDestinations,
1020
+ allowed_databricks_destinations: d.allowedDatabricksDestinations
1021
+ }));
1022
+ const marshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema = z.object({ workspaceIds: z.array(z.bigint()).optional() }).transform((d) => ({ workspace_ids: d.workspaceIds }));
1023
+ const marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema = z.object({
1024
+ destination: z.string().optional(),
1025
+ internetDestinationType: z.string().optional()
1026
+ }).transform((d) => ({
1027
+ destination: d.destination,
1028
+ internet_destination_type: d.internetDestinationType
1029
+ }));
1030
+ const marshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema = z.object({
1031
+ enforcementMode: z.string().optional(),
1032
+ dryRunModeProductFilter: z.array(z.string()).optional()
1033
+ }).transform((d) => ({
1034
+ enforcement_mode: d.enforcementMode,
1035
+ dry_run_mode_product_filter: d.dryRunModeProductFilter
1036
+ }));
1037
+ const marshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema = z.object({
1038
+ bucketName: z.string().optional(),
1039
+ region: z.string().optional(),
1040
+ storageDestinationType: z.string().optional(),
1041
+ azureStorageAccount: z.string().optional(),
1042
+ azureStorageService: z.string().optional()
1043
+ }).transform((d) => ({
1044
+ bucket_name: d.bucketName,
1045
+ region: d.region,
1046
+ storage_destination_type: d.storageDestinationType,
1047
+ azure_storage_account: d.azureStorageAccount,
1048
+ azure_storage_service: d.azureStorageService
1049
+ }));
1050
+ const marshalEndpointSchema = z.object({
1051
+ name: z.string().optional(),
1052
+ endpointId: z.string().optional(),
1053
+ accountId: z.string().optional(),
1054
+ displayName: z.string().optional(),
1055
+ useCase: z.string().optional(),
1056
+ region: z.string().optional(),
1057
+ state: z.string().optional(),
1058
+ endpointInfo: z.discriminatedUnion("$case", [
1059
+ z.object({
1060
+ $case: z.literal("azurePrivateEndpointInfo"),
1061
+ azurePrivateEndpointInfo: z.lazy(() => marshalAzurePrivateEndpointInfoSchema)
1062
+ }),
1063
+ z.object({
1064
+ $case: z.literal("awsVpcEndpointInfo"),
1065
+ awsVpcEndpointInfo: z.lazy(() => marshalAwsVpcEndpointInfoSchema)
1066
+ }),
1067
+ z.object({
1068
+ $case: z.literal("gcpPscEndpointInfo"),
1069
+ gcpPscEndpointInfo: z.lazy(() => marshalGcpPscEndpointInfoSchema)
1070
+ })
1071
+ ]).optional(),
1072
+ createTime: z.any().transform((d) => d.toString()).optional()
1073
+ }).transform((d) => ({
1074
+ name: d.name,
1075
+ endpoint_id: d.endpointId,
1076
+ account_id: d.accountId,
1077
+ display_name: d.displayName,
1078
+ use_case: d.useCase,
1079
+ region: d.region,
1080
+ state: d.state,
1081
+ ...d.endpointInfo?.$case === "azurePrivateEndpointInfo" && { azure_private_endpoint_info: d.endpointInfo.azurePrivateEndpointInfo },
1082
+ ...d.endpointInfo?.$case === "awsVpcEndpointInfo" && { aws_vpc_endpoint_info: d.endpointInfo.awsVpcEndpointInfo },
1083
+ ...d.endpointInfo?.$case === "gcpPscEndpointInfo" && { gcp_psc_endpoint_info: d.endpointInfo.gcpPscEndpointInfo },
1084
+ create_time: d.createTime
1085
+ }));
1086
+ const marshalGcpEndpointSchema = z.object({
1087
+ pscEndpointUri: z.string().optional(),
1088
+ targetServices: z.discriminatedUnion("$case", [
1089
+ z.object({
1090
+ $case: z.literal("serviceAttachment"),
1091
+ serviceAttachment: z.string()
1092
+ }),
1093
+ z.object({
1094
+ $case: z.literal("googleApiEndpoints"),
1095
+ googleApiEndpoints: z.lazy(() => marshalGoogleApiEndpointsSchema)
1096
+ }),
1097
+ z.object({
1098
+ $case: z.literal("allVpcScServices"),
1099
+ allVpcScServices: z.boolean()
1100
+ })
1101
+ ]).optional()
1102
+ }).transform((d) => ({
1103
+ psc_endpoint_uri: d.pscEndpointUri,
1104
+ ...d.targetServices?.$case === "serviceAttachment" && { service_attachment: d.targetServices.serviceAttachment },
1105
+ ...d.targetServices?.$case === "googleApiEndpoints" && { google_api_endpoints: d.targetServices.googleApiEndpoints },
1106
+ ...d.targetServices?.$case === "allVpcScServices" && { all_vpc_sc_services: d.targetServices.allVpcScServices }
1107
+ }));
1108
+ const marshalGcpNetworkInfoSchema = z.object({
1109
+ networkProjectId: z.string().optional(),
1110
+ vpcId: z.string().optional(),
1111
+ subnetId: z.string().optional(),
1112
+ subnetRegion: z.string().optional(),
1113
+ podIpRangeName: z.string().optional(),
1114
+ serviceIpRangeName: z.string().optional()
1115
+ }).transform((d) => ({
1116
+ network_project_id: d.networkProjectId,
1117
+ vpc_id: d.vpcId,
1118
+ subnet_id: d.subnetId,
1119
+ subnet_region: d.subnetRegion,
1120
+ pod_ip_range_name: d.podIpRangeName,
1121
+ service_ip_range_name: d.serviceIpRangeName
1122
+ }));
1123
+ const marshalGcpPscEndpointInfoSchema = z.object({
1124
+ pscConnectionId: z.string().optional(),
1125
+ projectId: z.string().optional(),
1126
+ pscEndpoint: z.string().optional(),
1127
+ endpointRegion: z.string().optional(),
1128
+ serviceAttachmentId: z.string().optional()
1129
+ }).transform((d) => ({
1130
+ psc_connection_id: d.pscConnectionId,
1131
+ project_id: d.projectId,
1132
+ psc_endpoint: d.pscEndpoint,
1133
+ endpoint_region: d.endpointRegion,
1134
+ service_attachment_id: d.serviceAttachmentId
1135
+ }));
1136
+ const marshalGcpVpcEndpointInfoSchema = z.object({
1137
+ pscConnectionId: z.string().optional(),
1138
+ projectId: z.string().optional(),
1139
+ pscEndpointName: z.string().optional(),
1140
+ endpointRegion: z.string().optional(),
1141
+ serviceAttachmentId: z.string().optional()
1142
+ }).transform((d) => ({
1143
+ psc_connection_id: d.pscConnectionId,
1144
+ project_id: d.projectId,
1145
+ psc_endpoint_name: d.pscEndpointName,
1146
+ endpoint_region: d.endpointRegion,
1147
+ service_attachment_id: d.serviceAttachmentId
1148
+ }));
1149
+ const marshalGoogleApiEndpointsSchema = z.object({ endpoints: z.array(z.string()).optional() }).transform((d) => ({ endpoints: d.endpoints }));
1150
+ const marshalIngressNetworkPolicySchema = z.object({
1151
+ publicAccess: z.lazy(() => marshalIngressNetworkPolicy_PublicAccessSchema).optional(),
1152
+ privateAccess: z.lazy(() => marshalIngressNetworkPolicy_PrivateAccessSchema).optional(),
1153
+ crossWorkspaceAccess: z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceAccessSchema).optional()
1154
+ }).transform((d) => ({
1155
+ public_access: d.publicAccess,
1156
+ private_access: d.privateAccess,
1157
+ cross_workspace_access: d.crossWorkspaceAccess
1158
+ }));
1159
+ const marshalIngressNetworkPolicy_AccountApiDestinationSchema = z.object({
1160
+ scopes: z.array(z.string()).optional(),
1161
+ scopeQualifier: z.string().optional()
1162
+ }).transform((d) => ({
1163
+ scopes: d.scopes,
1164
+ scope_qualifier: d.scopeQualifier
1165
+ }));
1166
+ const marshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1167
+ const marshalIngressNetworkPolicy_AccountUiDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1168
+ const marshalIngressNetworkPolicy_AppsRuntimeDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1169
+ const marshalIngressNetworkPolicy_AuthenticationSchema = z.object({
1170
+ identityType: z.string().optional(),
1171
+ identities: z.array(z.lazy(() => marshalIngressNetworkPolicy_AuthenticationIdentitySchema)).optional()
1172
+ }).transform((d) => ({
1173
+ identity_type: d.identityType,
1174
+ identities: d.identities
1175
+ }));
1176
+ const marshalIngressNetworkPolicy_AuthenticationIdentitySchema = z.object({
1177
+ principalType: z.string().optional(),
1178
+ principalId: z.bigint().optional()
1179
+ }).transform((d) => ({
1180
+ principal_type: d.principalType,
1181
+ principal_id: d.principalId
1182
+ }));
1183
+ const marshalIngressNetworkPolicy_CrossWorkspaceAccessSchema = z.object({
1184
+ restrictionMode: z.string().optional(),
1185
+ denyRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema)).optional(),
1186
+ allowRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema)).optional()
1187
+ }).transform((d) => ({
1188
+ restriction_mode: d.restrictionMode,
1189
+ deny_rules: d.denyRules,
1190
+ allow_rules: d.allowRules
1191
+ }));
1192
+ const marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema = z.object({
1193
+ origin: z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema).optional(),
1194
+ destination: z.lazy(() => marshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
1195
+ authentication: z.lazy(() => marshalIngressNetworkPolicy_AuthenticationSchema).optional(),
1196
+ label: z.string().optional()
1197
+ }).transform((d) => ({
1198
+ origin: d.origin,
1199
+ destination: d.destination,
1200
+ authentication: d.authentication,
1201
+ label: d.label
1202
+ }));
1203
+ const marshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema = z.object({ source: z.discriminatedUnion("$case", [z.object({
1204
+ $case: z.literal("allSourceWorkspaces"),
1205
+ allSourceWorkspaces: z.boolean()
1206
+ }), z.object({
1207
+ $case: z.literal("selectedWorkspaces"),
1208
+ selectedWorkspaces: z.lazy(() => marshalIngressNetworkPolicy_WorkspaceIdListSchema)
1209
+ })]).optional() }).transform((d) => ({
1210
+ ...d.source?.$case === "allSourceWorkspaces" && { all_source_workspaces: d.source.allSourceWorkspaces },
1211
+ ...d.source?.$case === "selectedWorkspaces" && { selected_workspaces: d.source.selectedWorkspaces }
1212
+ }));
1213
+ const marshalIngressNetworkPolicy_EndpointsSchema = z.object({ endpointIds: z.array(z.string()).optional() }).transform((d) => ({ endpoint_ids: d.endpointIds }));
1214
+ const marshalIngressNetworkPolicy_IpRangesSchema = z.object({ ipRanges: z.array(z.string()).optional() }).transform((d) => ({ ip_ranges: d.ipRanges }));
1215
+ const marshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1216
+ const marshalIngressNetworkPolicy_PrivateAccessSchema = z.object({
1217
+ restrictionMode: z.string().optional(),
1218
+ denyRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_PrivateIngressRuleSchema)).optional(),
1219
+ allowRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_PrivateIngressRuleSchema)).optional()
1220
+ }).transform((d) => ({
1221
+ restriction_mode: d.restrictionMode,
1222
+ deny_rules: d.denyRules,
1223
+ allow_rules: d.allowRules
1224
+ }));
1225
+ const marshalIngressNetworkPolicy_PrivateIngressRuleSchema = z.object({
1226
+ origin: z.lazy(() => marshalIngressNetworkPolicy_PrivateRequestOriginSchema).optional(),
1227
+ destination: z.lazy(() => marshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
1228
+ authentication: z.lazy(() => marshalIngressNetworkPolicy_AuthenticationSchema).optional(),
1229
+ label: z.string().optional()
1230
+ }).transform((d) => ({
1231
+ origin: d.origin,
1232
+ destination: d.destination,
1233
+ authentication: d.authentication,
1234
+ label: d.label
1235
+ }));
1236
+ const marshalIngressNetworkPolicy_PrivateRequestOriginSchema = z.object({ source: z.discriminatedUnion("$case", [
1237
+ z.object({
1238
+ $case: z.literal("endpoints"),
1239
+ endpoints: z.lazy(() => marshalIngressNetworkPolicy_EndpointsSchema)
1240
+ }),
1241
+ z.object({
1242
+ $case: z.literal("allRegisteredEndpoints"),
1243
+ allRegisteredEndpoints: z.boolean()
1244
+ }),
1245
+ z.object({
1246
+ $case: z.literal("azureWorkspacePrivateLink"),
1247
+ azureWorkspacePrivateLink: z.boolean()
1248
+ }),
1249
+ z.object({
1250
+ $case: z.literal("allPrivateAccess"),
1251
+ allPrivateAccess: z.boolean()
1252
+ })
1253
+ ]).optional() }).transform((d) => ({
1254
+ ...d.source?.$case === "endpoints" && { endpoints: d.source.endpoints },
1255
+ ...d.source?.$case === "allRegisteredEndpoints" && { all_registered_endpoints: d.source.allRegisteredEndpoints },
1256
+ ...d.source?.$case === "azureWorkspacePrivateLink" && { azure_workspace_private_link: d.source.azureWorkspacePrivateLink },
1257
+ ...d.source?.$case === "allPrivateAccess" && { all_private_access: d.source.allPrivateAccess }
1258
+ }));
1259
+ const marshalIngressNetworkPolicy_PublicAccessSchema = z.object({
1260
+ restrictionMode: z.string().optional(),
1261
+ denyRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_PublicIngressRuleSchema)).optional(),
1262
+ allowRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_PublicIngressRuleSchema)).optional()
1263
+ }).transform((d) => ({
1264
+ restriction_mode: d.restrictionMode,
1265
+ deny_rules: d.denyRules,
1266
+ allow_rules: d.allowRules
1267
+ }));
1268
+ const marshalIngressNetworkPolicy_PublicIngressRuleSchema = z.object({
1269
+ origin: z.lazy(() => marshalIngressNetworkPolicy_PublicRequestOriginSchema).optional(),
1270
+ destination: z.lazy(() => marshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
1271
+ authentication: z.lazy(() => marshalIngressNetworkPolicy_AuthenticationSchema).optional(),
1272
+ label: z.string().optional()
1273
+ }).transform((d) => ({
1274
+ origin: d.origin,
1275
+ destination: d.destination,
1276
+ authentication: d.authentication,
1277
+ label: d.label
1278
+ }));
1279
+ const marshalIngressNetworkPolicy_PublicRequestOriginSchema = z.object({ source: z.discriminatedUnion("$case", [
1280
+ z.object({
1281
+ $case: z.literal("allIpRanges"),
1282
+ allIpRanges: z.boolean()
1283
+ }),
1284
+ z.object({
1285
+ $case: z.literal("includedIpRanges"),
1286
+ includedIpRanges: z.lazy(() => marshalIngressNetworkPolicy_IpRangesSchema)
1287
+ }),
1288
+ z.object({
1289
+ $case: z.literal("excludedIpRanges"),
1290
+ excludedIpRanges: z.lazy(() => marshalIngressNetworkPolicy_IpRangesSchema)
1291
+ })
1292
+ ]).optional() }).transform((d) => ({
1293
+ ...d.source?.$case === "allIpRanges" && { all_ip_ranges: d.source.allIpRanges },
1294
+ ...d.source?.$case === "includedIpRanges" && { included_ip_ranges: d.source.includedIpRanges },
1295
+ ...d.source?.$case === "excludedIpRanges" && { excluded_ip_ranges: d.source.excludedIpRanges }
1296
+ }));
1297
+ const marshalIngressNetworkPolicy_RequestDestinationSchema = z.object({
1298
+ allDestinations: z.boolean().optional(),
1299
+ workspaceUi: z.lazy(() => marshalIngressNetworkPolicy_WorkspaceUiDestinationSchema).optional(),
1300
+ workspaceApi: z.lazy(() => marshalIngressNetworkPolicy_WorkspaceApiDestinationSchema).optional(),
1301
+ appsRuntime: z.lazy(() => marshalIngressNetworkPolicy_AppsRuntimeDestinationSchema).optional(),
1302
+ lakebaseRuntime: z.lazy(() => marshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema).optional(),
1303
+ accountUi: z.lazy(() => marshalIngressNetworkPolicy_AccountUiDestinationSchema).optional(),
1304
+ accountApi: z.lazy(() => marshalIngressNetworkPolicy_AccountApiDestinationSchema).optional(),
1305
+ accountDatabricksOne: z.lazy(() => marshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema).optional()
1306
+ }).transform((d) => ({
1307
+ all_destinations: d.allDestinations,
1308
+ workspace_ui: d.workspaceUi,
1309
+ workspace_api: d.workspaceApi,
1310
+ apps_runtime: d.appsRuntime,
1311
+ lakebase_runtime: d.lakebaseRuntime,
1312
+ account_ui: d.accountUi,
1313
+ account_api: d.accountApi,
1314
+ account_databricks_one: d.accountDatabricksOne
1315
+ }));
1316
+ const marshalIngressNetworkPolicy_WorkspaceApiDestinationSchema = z.object({
1317
+ scopes: z.array(z.string()).optional(),
1318
+ scopeQualifier: z.string().optional()
1319
+ }).transform((d) => ({
1320
+ scopes: d.scopes,
1321
+ scope_qualifier: d.scopeQualifier
1322
+ }));
1323
+ const marshalIngressNetworkPolicy_WorkspaceIdListSchema = z.object({ workspaceIds: z.array(z.bigint()).optional() }).transform((d) => ({ workspace_ids: d.workspaceIds }));
1324
+ const marshalIngressNetworkPolicy_WorkspaceUiDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1325
+ const marshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema = z.object({
1326
+ ruleId: z.string().optional(),
1327
+ networkConnectivityConfigId: z.string().optional(),
1328
+ accountId: z.string().optional(),
1329
+ endpointService: z.string().optional(),
1330
+ domainNames: z.array(z.string()).optional(),
1331
+ resourceNames: z.array(z.string()).optional(),
1332
+ vpcEndpointId: z.string().optional(),
1333
+ connectionState: z.string().optional(),
1334
+ creationTime: z.bigint().optional(),
1335
+ updatedTime: z.bigint().optional(),
1336
+ deactivated: z.boolean().optional(),
1337
+ deactivatedAt: z.bigint().optional(),
1338
+ enabled: z.boolean().optional(),
1339
+ errorMessage: z.string().optional()
1340
+ }).transform((d) => ({
1341
+ rule_id: d.ruleId,
1342
+ network_connectivity_config_id: d.networkConnectivityConfigId,
1343
+ account_id: d.accountId,
1344
+ endpoint_service: d.endpointService,
1345
+ domain_names: d.domainNames,
1346
+ resource_names: d.resourceNames,
1347
+ vpc_endpoint_id: d.vpcEndpointId,
1348
+ connection_state: d.connectionState,
1349
+ creation_time: d.creationTime,
1350
+ updated_time: d.updatedTime,
1351
+ deactivated: d.deactivated,
1352
+ deactivated_at: d.deactivatedAt,
1353
+ enabled: d.enabled,
1354
+ error_message: d.errorMessage
1355
+ }));
1356
+ const marshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema = z.object({
1357
+ ruleId: z.string().optional(),
1358
+ networkConnectivityConfigId: z.string().optional(),
1359
+ resourceId: z.string().optional(),
1360
+ groupId: z.string().optional(),
1361
+ endpointName: z.string().optional(),
1362
+ connectionState: z.string().optional(),
1363
+ creationTime: z.bigint().optional(),
1364
+ updatedTime: z.bigint().optional(),
1365
+ deactivated: z.boolean().optional(),
1366
+ deactivatedAt: z.bigint().optional(),
1367
+ domainNames: z.array(z.string()).optional(),
1368
+ errorMessage: z.string().optional()
1369
+ }).transform((d) => ({
1370
+ rule_id: d.ruleId,
1371
+ network_connectivity_config_id: d.networkConnectivityConfigId,
1372
+ resource_id: d.resourceId,
1373
+ group_id: d.groupId,
1374
+ endpoint_name: d.endpointName,
1375
+ connection_state: d.connectionState,
1376
+ creation_time: d.creationTime,
1377
+ updated_time: d.updatedTime,
1378
+ deactivated: d.deactivated,
1379
+ deactivated_at: d.deactivatedAt,
1380
+ domain_names: d.domainNames,
1381
+ error_message: d.errorMessage
1382
+ }));
1383
+ const marshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema = z.object({
1384
+ azureServiceEndpointRule: z.lazy(() => marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema).optional(),
1385
+ awsStableIpRule: z.lazy(() => marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema).optional()
1386
+ }).transform((d) => ({
1387
+ azure_service_endpoint_rule: d.azureServiceEndpointRule,
1388
+ aws_stable_ip_rule: d.awsStableIpRule
1389
+ }));
1390
+ const marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema = z.object({ cidrBlocks: z.array(z.string()).optional() }).transform((d) => ({ cidr_blocks: d.cidrBlocks }));
1391
+ const marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema = z.object({
1392
+ targetRegion: z.string().optional(),
1393
+ targetServices: z.array(z.string()).optional(),
1394
+ subnets: z.array(z.string()).optional()
1395
+ }).transform((d) => ({
1396
+ target_region: d.targetRegion,
1397
+ target_services: d.targetServices,
1398
+ subnets: d.subnets
1399
+ }));
1400
+ const marshalNetworkVpcEndpointsSchema = z.object({
1401
+ restApi: z.array(z.string()).optional(),
1402
+ dataplaneRelay: z.array(z.string()).optional()
1403
+ }).transform((d) => ({
1404
+ rest_api: d.restApi,
1405
+ dataplane_relay: d.dataplaneRelay
1406
+ }));
1407
+ const marshalPrivateAccessSettingsSchema = z.object({
1408
+ privateAccessSettingsId: z.string().optional(),
1409
+ accountId: z.string().optional(),
1410
+ privateAccessSettingsName: z.string().optional(),
1411
+ region: z.string().optional(),
1412
+ publicAccessEnabled: z.boolean().optional(),
1413
+ privateAccessLevel: z.string().optional(),
1414
+ allowedVpcEndpointIds: z.array(z.string()).optional()
1415
+ }).transform((d) => ({
1416
+ private_access_settings_id: d.privateAccessSettingsId,
1417
+ account_id: d.accountId,
1418
+ private_access_settings_name: d.privateAccessSettingsName,
1419
+ region: d.region,
1420
+ public_access_enabled: d.publicAccessEnabled,
1421
+ private_access_level: d.privateAccessLevel,
1422
+ allowed_vpc_endpoint_ids: d.allowedVpcEndpointIds
1423
+ }));
1424
+ const marshalReplaceAccountIpAccessListRequestSchema = z.object({
1425
+ accountId: z.string().optional(),
1426
+ listId: z.string().optional(),
1427
+ label: z.string().optional(),
1428
+ listType: z.string().optional(),
1429
+ ipAddresses: z.array(z.string()).optional(),
1430
+ enabled: z.boolean().optional()
1431
+ }).transform((d) => ({
1432
+ account_id: d.accountId,
1433
+ list_id: d.listId,
1434
+ label: d.label,
1435
+ list_type: d.listType,
1436
+ ip_addresses: d.ipAddresses,
1437
+ enabled: d.enabled
1438
+ }));
1439
+ const marshalReplaceIpAccessListRequestSchema = z.object({
1440
+ listId: z.string().optional(),
1441
+ label: z.string().optional(),
1442
+ listType: z.string().optional(),
1443
+ ipAddresses: z.array(z.string()).optional(),
1444
+ enabled: z.boolean().optional()
1445
+ }).transform((d) => ({
1446
+ list_id: d.listId,
1447
+ label: d.label,
1448
+ list_type: d.listType,
1449
+ ip_addresses: d.ipAddresses,
1450
+ enabled: d.enabled
1451
+ }));
1452
+ const marshalUpdateAccountIpAccessListRequestSchema = z.object({
1453
+ accountId: z.string().optional(),
1454
+ listId: z.string().optional(),
1455
+ label: z.string().optional(),
1456
+ listType: z.string().optional(),
1457
+ ipAddresses: z.array(z.string()).optional(),
1458
+ enabled: z.boolean().optional()
1459
+ }).transform((d) => ({
1460
+ account_id: d.accountId,
1461
+ list_id: d.listId,
1462
+ label: d.label,
1463
+ list_type: d.listType,
1464
+ ip_addresses: d.ipAddresses,
1465
+ enabled: d.enabled
1466
+ }));
1467
+ const marshalUpdateIpAccessListRequestSchema = z.object({
1468
+ listId: z.string().optional(),
1469
+ label: z.string().optional(),
1470
+ listType: z.string().optional(),
1471
+ ipAddresses: z.array(z.string()).optional(),
1472
+ enabled: z.boolean().optional()
1473
+ }).transform((d) => ({
1474
+ list_id: d.listId,
1475
+ label: d.label,
1476
+ list_type: d.listType,
1477
+ ip_addresses: d.ipAddresses,
1478
+ enabled: d.enabled
1479
+ }));
1480
+ const marshalUpdatePrivateEndpointRuleSchema = z.object({
1481
+ ruleId: z.string().optional(),
1482
+ networkConnectivityConfigId: z.string().optional(),
1483
+ connectionState: z.string().optional(),
1484
+ domainNames: z.array(z.string()).optional(),
1485
+ creationTime: z.bigint().optional(),
1486
+ updatedTime: z.bigint().optional(),
1487
+ deactivated: z.boolean().optional(),
1488
+ deactivatedAt: z.bigint().optional(),
1489
+ errorMessage: z.string().optional(),
1490
+ resourceId: z.string().optional(),
1491
+ groupId: z.string().optional(),
1492
+ endpointName: z.string().optional(),
1493
+ accountId: z.string().optional(),
1494
+ endpointService: z.string().optional(),
1495
+ resourceNames: z.array(z.string()).optional(),
1496
+ vpcEndpointId: z.string().optional(),
1497
+ enabled: z.boolean().optional(),
1498
+ endpoint: z.discriminatedUnion("$case", [z.object({
1499
+ $case: z.literal("gcpEndpoint"),
1500
+ gcpEndpoint: z.lazy(() => marshalGcpEndpointSchema)
1501
+ })]).optional()
1502
+ }).transform((d) => ({
1503
+ rule_id: d.ruleId,
1504
+ network_connectivity_config_id: d.networkConnectivityConfigId,
1505
+ connection_state: d.connectionState,
1506
+ domain_names: d.domainNames,
1507
+ creation_time: d.creationTime,
1508
+ updated_time: d.updatedTime,
1509
+ deactivated: d.deactivated,
1510
+ deactivated_at: d.deactivatedAt,
1511
+ error_message: d.errorMessage,
1512
+ resource_id: d.resourceId,
1513
+ group_id: d.groupId,
1514
+ endpoint_name: d.endpointName,
1515
+ account_id: d.accountId,
1516
+ endpoint_service: d.endpointService,
1517
+ resource_names: d.resourceNames,
1518
+ vpc_endpoint_id: d.vpcEndpointId,
1519
+ enabled: d.enabled,
1520
+ ...d.endpoint?.$case === "gcpEndpoint" && { gcp_endpoint: d.endpoint.gcpEndpoint }
1521
+ }));
1522
+ const marshalWorkspaceNetworkOptionSchema = z.object({
1523
+ networkPolicyId: z.string().optional(),
1524
+ workspaceId: z.bigint().optional()
1525
+ }).transform((d) => ({
1526
+ network_policy_id: d.networkPolicyId,
1527
+ workspace_id: d.workspaceId
2397
1528
  }));
2398
1529
  const gcpEndpointFieldMaskSchema = {
2399
- pscEndpointUri: { wire: 'psc_endpoint_uri' },
2400
- serviceAttachment: { wire: 'service_attachment' },
1530
+ allVpcScServices: { wire: "all_vpc_sc_services" },
1531
+ googleApiEndpoints: {
1532
+ wire: "google_api_endpoints",
1533
+ children: () => googleApiEndpointsFieldMaskSchema
1534
+ },
1535
+ pscEndpointUri: { wire: "psc_endpoint_uri" },
1536
+ serviceAttachment: { wire: "service_attachment" }
2401
1537
  };
1538
+ const googleApiEndpointsFieldMaskSchema = { endpoints: { wire: "endpoints" } };
2402
1539
  const updatePrivateEndpointRuleFieldMaskSchema = {
2403
- accountId: { wire: 'account_id' },
2404
- connectionState: { wire: 'connection_state' },
2405
- creationTime: { wire: 'creation_time' },
2406
- deactivated: { wire: 'deactivated' },
2407
- deactivatedAt: { wire: 'deactivated_at' },
2408
- domainNames: { wire: 'domain_names' },
2409
- enabled: { wire: 'enabled' },
2410
- endpointName: { wire: 'endpoint_name' },
2411
- endpointService: { wire: 'endpoint_service' },
2412
- errorMessage: { wire: 'error_message' },
2413
- gcpEndpoint: {
2414
- wire: 'gcp_endpoint',
2415
- children: () => gcpEndpointFieldMaskSchema,
2416
- },
2417
- groupId: { wire: 'group_id' },
2418
- networkConnectivityConfigId: { wire: 'network_connectivity_config_id' },
2419
- resourceId: { wire: 'resource_id' },
2420
- resourceNames: { wire: 'resource_names' },
2421
- ruleId: { wire: 'rule_id' },
2422
- updatedTime: { wire: 'updated_time' },
2423
- vpcEndpointId: { wire: 'vpc_endpoint_id' },
1540
+ accountId: { wire: "account_id" },
1541
+ connectionState: { wire: "connection_state" },
1542
+ creationTime: { wire: "creation_time" },
1543
+ deactivated: { wire: "deactivated" },
1544
+ deactivatedAt: { wire: "deactivated_at" },
1545
+ domainNames: { wire: "domain_names" },
1546
+ enabled: { wire: "enabled" },
1547
+ endpointName: { wire: "endpoint_name" },
1548
+ endpointService: { wire: "endpoint_service" },
1549
+ errorMessage: { wire: "error_message" },
1550
+ gcpEndpoint: {
1551
+ wire: "gcp_endpoint",
1552
+ children: () => gcpEndpointFieldMaskSchema
1553
+ },
1554
+ groupId: { wire: "group_id" },
1555
+ networkConnectivityConfigId: { wire: "network_connectivity_config_id" },
1556
+ resourceId: { wire: "resource_id" },
1557
+ resourceNames: { wire: "resource_names" },
1558
+ ruleId: { wire: "rule_id" },
1559
+ updatedTime: { wire: "updated_time" },
1560
+ vpcEndpointId: { wire: "vpc_endpoint_id" }
2424
1561
  };
2425
- export function updatePrivateEndpointRuleFieldMask(...paths) {
2426
- return FieldMask.build(paths, updatePrivateEndpointRuleFieldMaskSchema);
1562
+ function updatePrivateEndpointRuleFieldMask(...paths) {
1563
+ return FieldMask.build(paths, updatePrivateEndpointRuleFieldMaskSchema);
2427
1564
  }
1565
+
1566
+ //#endregion
1567
+ export { AccountIpAccessListType_IpAccessListType, EgressNetworkPolicy_NetworkAccessPolicy_InternetDestination_InternetDestinationType, EgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcement_DryRunModeProductFilter, EgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcement_EnforcementMode, EgressNetworkPolicy_NetworkAccessPolicy_RestrictionMode, EgressNetworkPolicy_NetworkAccessPolicy_StorageDestination_StorageDestinationType, EgressResourceType, EndpointState, EndpointUseCase_EndpointUseCase, IngressNetworkPolicy_ApiScopeQualifier, IngressNetworkPolicy_AuthenticationIdentity_PrincipalType, IngressNetworkPolicy_Authentication_IdentityType, IngressNetworkPolicy_CrossWorkspaceAccess_RestrictionMode, IngressNetworkPolicy_PrivateAccess_RestrictionMode, IngressNetworkPolicy_PublicAccess_RestrictionMode, IpAccessListType, NccPrivateEndpointRule_PrivateLinkConnectionState, NetworkConnectivityConfigAwsPrivateEndpointRule_PrivateLinkConnectionState, NetworkConnectivityConfigAzurePrivateEndpointRule_PrivateLinkConnectionState, PrivateAccessLevel, VpcEndpointUseCase, VpcStatus, marshalAccountNetworkPolicySchema, marshalAwsVpcEndpointInfoSchema, marshalAzurePrivateEndpointInfoSchema, marshalCreateAccountIpAccessListRequestSchema, marshalCreateIpAccessListRequestSchema, marshalCreateNetworkConnectivityConfigurationSchema, marshalCreateNetworkRequestSchema, marshalCreatePrivateAccessSettingsRequestSchema, marshalCreatePrivateEndpointRuleSchema, marshalCreateVpcEndpointRequestSchema, marshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema, marshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema, marshalEgressNetworkPolicySchema, marshalEgressNetworkPolicy_NetworkAccessPolicySchema, marshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema, marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema, marshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema, marshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema, marshalEndpointSchema, marshalGcpEndpointSchema, marshalGcpNetworkInfoSchema, marshalGcpPscEndpointInfoSchema, marshalGcpVpcEndpointInfoSchema, marshalGoogleApiEndpointsSchema, marshalIngressNetworkPolicySchema, marshalIngressNetworkPolicy_AccountApiDestinationSchema, marshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema, marshalIngressNetworkPolicy_AccountUiDestinationSchema, marshalIngressNetworkPolicy_AppsRuntimeDestinationSchema, marshalIngressNetworkPolicy_AuthenticationIdentitySchema, marshalIngressNetworkPolicy_AuthenticationSchema, marshalIngressNetworkPolicy_CrossWorkspaceAccessSchema, marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema, marshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema, marshalIngressNetworkPolicy_EndpointsSchema, marshalIngressNetworkPolicy_IpRangesSchema, marshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema, marshalIngressNetworkPolicy_PrivateAccessSchema, marshalIngressNetworkPolicy_PrivateIngressRuleSchema, marshalIngressNetworkPolicy_PrivateRequestOriginSchema, marshalIngressNetworkPolicy_PublicAccessSchema, marshalIngressNetworkPolicy_PublicIngressRuleSchema, marshalIngressNetworkPolicy_PublicRequestOriginSchema, marshalIngressNetworkPolicy_RequestDestinationSchema, marshalIngressNetworkPolicy_WorkspaceApiDestinationSchema, marshalIngressNetworkPolicy_WorkspaceIdListSchema, marshalIngressNetworkPolicy_WorkspaceUiDestinationSchema, marshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema, marshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema, marshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema, marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema, marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema, marshalNetworkVpcEndpointsSchema, marshalPrivateAccessSettingsSchema, marshalReplaceAccountIpAccessListRequestSchema, marshalReplaceIpAccessListRequestSchema, marshalUpdateAccountIpAccessListRequestSchema, marshalUpdateIpAccessListRequestSchema, marshalUpdatePrivateEndpointRuleSchema, marshalWorkspaceNetworkOptionSchema, unmarshalAccountIpAccessListSchema, unmarshalAccountNetworkPolicySchema, unmarshalAwsVpcEndpointInfoSchema, unmarshalAzurePrivateEndpointInfoSchema, unmarshalCreateAccountIpAccessListResponseSchema, unmarshalCreateIpAccessListResponseSchema, unmarshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema, unmarshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema, unmarshalDeleteAccountIpAccessListResponseSchema, unmarshalDeleteIpAccessListResponseSchema, unmarshalEgressNetworkPolicySchema, unmarshalEgressNetworkPolicy_NetworkAccessPolicySchema, unmarshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema, unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema, unmarshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema, unmarshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema, unmarshalEndpointSchema, unmarshalGcpEndpointSchema, unmarshalGcpNetworkInfoSchema, unmarshalGcpPscEndpointInfoSchema, unmarshalGcpVpcEndpointInfoSchema, unmarshalGetAccountIpAccessListResponseSchema, unmarshalGetIpAccessListResponseSchema, unmarshalGoogleApiEndpointsSchema, unmarshalIngressNetworkPolicySchema, unmarshalIngressNetworkPolicy_AccountApiDestinationSchema, unmarshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema, unmarshalIngressNetworkPolicy_AccountUiDestinationSchema, unmarshalIngressNetworkPolicy_AppsRuntimeDestinationSchema, unmarshalIngressNetworkPolicy_AuthenticationIdentitySchema, unmarshalIngressNetworkPolicy_AuthenticationSchema, unmarshalIngressNetworkPolicy_CrossWorkspaceAccessSchema, unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema, unmarshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema, unmarshalIngressNetworkPolicy_EndpointsSchema, unmarshalIngressNetworkPolicy_IpRangesSchema, unmarshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema, unmarshalIngressNetworkPolicy_PrivateAccessSchema, unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema, unmarshalIngressNetworkPolicy_PrivateRequestOriginSchema, unmarshalIngressNetworkPolicy_PublicAccessSchema, unmarshalIngressNetworkPolicy_PublicIngressRuleSchema, unmarshalIngressNetworkPolicy_PublicRequestOriginSchema, unmarshalIngressNetworkPolicy_RequestDestinationSchema, unmarshalIngressNetworkPolicy_WorkspaceApiDestinationSchema, unmarshalIngressNetworkPolicy_WorkspaceIdListSchema, unmarshalIngressNetworkPolicy_WorkspaceUiDestinationSchema, unmarshalIpAccessListSchema, unmarshalListAccountIpAccessListsResponseSchema, unmarshalListEndpointsResponseSchema, unmarshalListIpAccessListsResponseSchema, unmarshalListNccPrivateEndpointRulesResponseSchema, unmarshalListNetworkConnectivityConfigsResponseSchema, unmarshalListNetworkPoliciesResponseSchema, unmarshalNccPrivateEndpointRuleSchema, unmarshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema, unmarshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema, unmarshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema, unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema, unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema, unmarshalNetworkConnectivityConfigSchema, unmarshalNetworkHealthSchema, unmarshalNetworkSchema, unmarshalNetworkVpcEndpointsSchema, unmarshalNetworkWarningSchema, unmarshalPrivateAccessSettingsSchema, unmarshalReplaceAccountIpAccessListResponseSchema, unmarshalReplaceIpAccessListResponseSchema, unmarshalUpdateAccountIpAccessListResponseSchema, unmarshalUpdateIpAccessListResponseSchema, unmarshalVpcEndpointSchema, unmarshalWorkspaceNetworkOptionSchema, updatePrivateEndpointRuleFieldMask };
2428
1568
  //# sourceMappingURL=model.js.map