@databricks/sdk-networking 0.34.0 → 0.35.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,1539 @@
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"
153
112
  };
154
113
  /**
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',
114
+ * The restriction mode for private access. In ALLOW_ALL_REGISTERED_ENDPOINTS mode,
115
+ * requests arriving through any endpoint registered to the account are allowed, and
116
+ * deny rules and allow rules cannot be set. In RESTRICTED_ACCESS mode, access is
117
+ * restricted based on deny rules and allow rules; requests that do not match any
118
+ * allow rule are denied.
119
+ */
120
+ const IngressNetworkPolicy_PrivateAccess_RestrictionMode = {
121
+ ALLOW_ALL_REGISTERED_ENDPOINTS: "ALLOW_ALL_REGISTERED_ENDPOINTS",
122
+ RESTRICTED_ACCESS: "RESTRICTED_ACCESS"
173
123
  };
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',
124
+ const IngressNetworkPolicy_PublicAccess_RestrictionMode = {
125
+ FULL_ACCESS: "FULL_ACCESS",
126
+ RESTRICTED_ACCESS: "RESTRICTED_ACCESS"
178
127
  };
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',
128
+ const NccPrivateEndpointRule_PrivateLinkConnectionState = {
129
+ PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED: "PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED",
130
+ ESTABLISHED: "ESTABLISHED",
131
+ REJECTED: "REJECTED",
132
+ DISCONNECTED: "DISCONNECTED",
133
+ EXPIRED: "EXPIRED",
134
+ PENDING: "PENDING",
135
+ CREATING: "CREATING",
136
+ CREATE_FAILED: "CREATE_FAILED"
199
137
  };
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',
138
+ const NetworkConnectivityConfigAwsPrivateEndpointRule_PrivateLinkConnectionState = {
139
+ PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED: "PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED",
140
+ ESTABLISHED: "ESTABLISHED",
141
+ REJECTED: "REJECTED",
142
+ DISCONNECTED: "DISCONNECTED",
143
+ EXPIRED: "EXPIRED",
144
+ PENDING: "PENDING",
145
+ CREATING: "CREATING",
146
+ CREATE_FAILED: "CREATE_FAILED"
220
147
  };
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',
148
+ const NetworkConnectivityConfigAzurePrivateEndpointRule_PrivateLinkConnectionState = {
149
+ PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED: "PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED",
150
+ INIT: "INIT",
151
+ ESTABLISHED: "ESTABLISHED",
152
+ REJECTED: "REJECTED",
153
+ DISCONNECTED: "DISCONNECTED",
154
+ EXPIRED: "EXPIRED",
155
+ PENDING: "PENDING",
156
+ CREATING: "CREATING",
157
+ CREATE_FAILED: "CREATE_FAILED"
243
158
  };
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,
159
+ const unmarshalAccountIpAccessListSchema = z.object({
160
+ list_id: z.string().optional(),
161
+ label: z.string().optional(),
162
+ ip_addresses: z.array(z.string()).optional(),
163
+ address_count: z.number().optional(),
164
+ list_type: z.string().optional(),
165
+ created_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
166
+ created_by: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
167
+ updated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
168
+ updated_by: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
169
+ enabled: z.boolean().optional()
170
+ }).transform((d) => ({
171
+ listId: d.list_id,
172
+ label: d.label,
173
+ ipAddresses: d.ip_addresses,
174
+ addressCount: d.address_count,
175
+ listType: d.list_type,
176
+ createdAt: d.created_at,
177
+ createdBy: d.created_by,
178
+ updatedAt: d.updated_at,
179
+ updatedBy: d.updated_by,
180
+ enabled: d.enabled
181
+ }));
182
+ const unmarshalAccountNetworkPolicySchema = z.object({
183
+ network_policy_id: z.string().optional(),
184
+ account_id: z.string().optional(),
185
+ egress: z.lazy(() => unmarshalEgressNetworkPolicySchema).optional(),
186
+ ingress: z.lazy(() => unmarshalIngressNetworkPolicySchema).optional(),
187
+ ingress_dry_run: z.lazy(() => unmarshalIngressNetworkPolicySchema).optional()
188
+ }).transform((d) => ({
189
+ networkPolicyId: d.network_policy_id,
190
+ accountId: d.account_id,
191
+ egress: d.egress,
192
+ ingress: d.ingress,
193
+ ingressDryRun: d.ingress_dry_run
194
+ }));
195
+ const unmarshalAwsVpcEndpointInfoSchema = z.object({
196
+ aws_vpc_endpoint_id: z.string().optional(),
197
+ aws_endpoint_service_id: z.string().optional(),
198
+ aws_account_id: z.string().optional()
199
+ }).transform((d) => ({
200
+ awsVpcEndpointId: d.aws_vpc_endpoint_id,
201
+ awsEndpointServiceId: d.aws_endpoint_service_id,
202
+ awsAccountId: d.aws_account_id
203
+ }));
204
+ const unmarshalAzurePrivateEndpointInfoSchema = z.object({
205
+ private_endpoint_name: z.string().optional(),
206
+ private_endpoint_resource_guid: z.string().optional(),
207
+ private_endpoint_resource_id: z.string().optional(),
208
+ private_link_service_id: z.string().optional()
209
+ }).transform((d) => ({
210
+ privateEndpointName: d.private_endpoint_name,
211
+ privateEndpointResourceGuid: d.private_endpoint_resource_guid,
212
+ privateEndpointResourceId: d.private_endpoint_resource_id,
213
+ privateLinkServiceId: d.private_link_service_id
214
+ }));
215
+ const unmarshalCreateAccountIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalAccountIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
216
+ const unmarshalCreateIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
217
+ const unmarshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema = z.object({
218
+ default_rules: z.lazy(() => unmarshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema).optional(),
219
+ target_rules: z.lazy(() => unmarshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema).optional()
220
+ }).transform((d) => ({
221
+ defaultRules: d.default_rules,
222
+ targetRules: d.target_rules
223
+ }));
224
+ const unmarshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema = z.object({
225
+ azure_private_endpoint_rules: z.array(z.lazy(() => unmarshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema)).optional(),
226
+ aws_private_endpoint_rules: z.array(z.lazy(() => unmarshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema)).optional()
227
+ }).transform((d) => ({
228
+ azurePrivateEndpointRules: d.azure_private_endpoint_rules,
229
+ awsPrivateEndpointRules: d.aws_private_endpoint_rules
230
+ }));
231
+ const unmarshalDeleteAccountIpAccessListResponseSchema = z.object({});
232
+ const unmarshalDeleteIpAccessListResponseSchema = z.object({});
233
+ const unmarshalEgressNetworkPolicySchema = z.object({ network_access: z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicySchema).optional() }).transform((d) => ({ networkAccess: d.network_access }));
234
+ const unmarshalEgressNetworkPolicy_NetworkAccessPolicySchema = z.object({
235
+ restriction_mode: z.string().optional(),
236
+ allowed_internet_destinations: z.array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema)).optional(),
237
+ allowed_storage_destinations: z.array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema)).optional(),
238
+ policy_enforcement: z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema).optional(),
239
+ blocked_internet_destinations: z.array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema)).optional(),
240
+ allowed_databricks_destinations: z.array(z.lazy(() => unmarshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema)).optional()
241
+ }).transform((d) => ({
242
+ restrictionMode: d.restriction_mode,
243
+ allowedInternetDestinations: d.allowed_internet_destinations,
244
+ allowedStorageDestinations: d.allowed_storage_destinations,
245
+ policyEnforcement: d.policy_enforcement,
246
+ blockedInternetDestinations: d.blocked_internet_destinations,
247
+ allowedDatabricksDestinations: d.allowed_databricks_destinations
248
+ }));
249
+ 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 }));
250
+ const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema = z.object({
251
+ destination: z.string().optional(),
252
+ internet_destination_type: z.string().optional()
253
+ }).transform((d) => ({
254
+ destination: d.destination,
255
+ internetDestinationType: d.internet_destination_type
256
+ }));
257
+ const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema = z.object({
258
+ enforcement_mode: z.string().optional(),
259
+ dry_run_mode_product_filter: z.array(z.string()).optional()
260
+ }).transform((d) => ({
261
+ enforcementMode: d.enforcement_mode,
262
+ dryRunModeProductFilter: d.dry_run_mode_product_filter
263
+ }));
264
+ const unmarshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema = z.object({
265
+ bucket_name: z.string().optional(),
266
+ region: z.string().optional(),
267
+ storage_destination_type: z.string().optional(),
268
+ azure_storage_account: z.string().optional(),
269
+ azure_storage_service: z.string().optional()
270
+ }).transform((d) => ({
271
+ bucketName: d.bucket_name,
272
+ region: d.region,
273
+ storageDestinationType: d.storage_destination_type,
274
+ azureStorageAccount: d.azure_storage_account,
275
+ azureStorageService: d.azure_storage_service
276
+ }));
277
+ const unmarshalEndpointSchema = z.object({
278
+ name: z.string().optional(),
279
+ endpoint_id: z.string().optional(),
280
+ account_id: z.string().optional(),
281
+ display_name: z.string().optional(),
282
+ use_case: z.string().optional(),
283
+ region: z.string().optional(),
284
+ state: z.string().optional(),
285
+ azure_private_endpoint_info: z.lazy(() => unmarshalAzurePrivateEndpointInfoSchema).optional(),
286
+ aws_vpc_endpoint_info: z.lazy(() => unmarshalAwsVpcEndpointInfoSchema).optional(),
287
+ gcp_psc_endpoint_info: z.lazy(() => unmarshalGcpPscEndpointInfoSchema).optional(),
288
+ create_time: z.string().transform((s) => Temporal.Instant.from(s)).optional()
289
+ }).transform((d) => ({
290
+ name: d.name,
291
+ endpointId: d.endpoint_id,
292
+ accountId: d.account_id,
293
+ displayName: d.display_name,
294
+ useCase: d.use_case,
295
+ region: d.region,
296
+ state: d.state,
297
+ endpointInfo: d.azure_private_endpoint_info !== void 0 ? {
298
+ $case: "azurePrivateEndpointInfo",
299
+ azurePrivateEndpointInfo: d.azure_private_endpoint_info
300
+ } : d.aws_vpc_endpoint_info !== void 0 ? {
301
+ $case: "awsVpcEndpointInfo",
302
+ awsVpcEndpointInfo: d.aws_vpc_endpoint_info
303
+ } : d.gcp_psc_endpoint_info !== void 0 ? {
304
+ $case: "gcpPscEndpointInfo",
305
+ gcpPscEndpointInfo: d.gcp_psc_endpoint_info
306
+ } : void 0,
307
+ createTime: d.create_time
308
+ }));
309
+ const unmarshalGcpEndpointSchema = z.object({
310
+ psc_endpoint_uri: z.string().optional(),
311
+ service_attachment: z.string().optional()
312
+ }).transform((d) => ({
313
+ pscEndpointUri: d.psc_endpoint_uri,
314
+ targetServices: d.service_attachment !== void 0 ? {
315
+ $case: "serviceAttachment",
316
+ serviceAttachment: d.service_attachment
317
+ } : void 0
318
+ }));
319
+ const unmarshalGcpNetworkInfoSchema = z.object({
320
+ network_project_id: z.string().optional(),
321
+ vpc_id: z.string().optional(),
322
+ subnet_id: z.string().optional(),
323
+ subnet_region: z.string().optional(),
324
+ pod_ip_range_name: z.string().optional(),
325
+ service_ip_range_name: z.string().optional()
326
+ }).transform((d) => ({
327
+ networkProjectId: d.network_project_id,
328
+ vpcId: d.vpc_id,
329
+ subnetId: d.subnet_id,
330
+ subnetRegion: d.subnet_region,
331
+ podIpRangeName: d.pod_ip_range_name,
332
+ serviceIpRangeName: d.service_ip_range_name
333
+ }));
334
+ const unmarshalGcpPscEndpointInfoSchema = z.object({
335
+ psc_connection_id: z.string().optional(),
336
+ project_id: z.string().optional(),
337
+ psc_endpoint: z.string().optional(),
338
+ endpoint_region: z.string().optional(),
339
+ service_attachment_id: z.string().optional()
340
+ }).transform((d) => ({
341
+ pscConnectionId: d.psc_connection_id,
342
+ projectId: d.project_id,
343
+ pscEndpoint: d.psc_endpoint,
344
+ endpointRegion: d.endpoint_region,
345
+ serviceAttachmentId: d.service_attachment_id
346
+ }));
347
+ const unmarshalGcpVpcEndpointInfoSchema = z.object({
348
+ psc_connection_id: z.string().optional(),
349
+ project_id: z.string().optional(),
350
+ psc_endpoint_name: z.string().optional(),
351
+ endpoint_region: z.string().optional(),
352
+ service_attachment_id: z.string().optional()
353
+ }).transform((d) => ({
354
+ pscConnectionId: d.psc_connection_id,
355
+ projectId: d.project_id,
356
+ pscEndpointName: d.psc_endpoint_name,
357
+ endpointRegion: d.endpoint_region,
358
+ serviceAttachmentId: d.service_attachment_id
359
+ }));
360
+ const unmarshalGetAccountIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalAccountIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
361
+ const unmarshalGetIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
362
+ const unmarshalIngressNetworkPolicySchema = z.object({
363
+ public_access: z.lazy(() => unmarshalIngressNetworkPolicy_PublicAccessSchema).optional(),
364
+ private_access: z.lazy(() => unmarshalIngressNetworkPolicy_PrivateAccessSchema).optional(),
365
+ cross_workspace_access: z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceAccessSchema).optional()
366
+ }).transform((d) => ({
367
+ publicAccess: d.public_access,
368
+ privateAccess: d.private_access,
369
+ crossWorkspaceAccess: d.cross_workspace_access
370
+ }));
371
+ const unmarshalIngressNetworkPolicy_AccountApiDestinationSchema = z.object({
372
+ scopes: z.array(z.string()).optional(),
373
+ scope_qualifier: z.string().optional()
374
+ }).transform((d) => ({
375
+ scopes: d.scopes,
376
+ scopeQualifier: d.scope_qualifier
377
+ }));
378
+ const unmarshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
379
+ const unmarshalIngressNetworkPolicy_AccountUiDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
380
+ const unmarshalIngressNetworkPolicy_AppsRuntimeDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
381
+ const unmarshalIngressNetworkPolicy_AuthenticationSchema = z.object({
382
+ identity_type: z.string().optional(),
383
+ identities: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_AuthenticationIdentitySchema)).optional()
384
+ }).transform((d) => ({
385
+ identityType: d.identity_type,
386
+ identities: d.identities
387
+ }));
388
+ const unmarshalIngressNetworkPolicy_AuthenticationIdentitySchema = z.object({
389
+ principal_type: z.string().optional(),
390
+ principal_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
391
+ }).transform((d) => ({
392
+ principalType: d.principal_type,
393
+ principalId: d.principal_id
394
+ }));
395
+ const unmarshalIngressNetworkPolicy_CrossWorkspaceAccessSchema = z.object({
396
+ restriction_mode: z.string().optional(),
397
+ deny_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema)).optional(),
398
+ allow_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema)).optional()
399
+ }).transform((d) => ({
400
+ restrictionMode: d.restriction_mode,
401
+ denyRules: d.deny_rules,
402
+ allowRules: d.allow_rules
403
+ }));
404
+ const unmarshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema = z.object({
405
+ origin: z.lazy(() => unmarshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema).optional(),
406
+ destination: z.lazy(() => unmarshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
407
+ authentication: z.lazy(() => unmarshalIngressNetworkPolicy_AuthenticationSchema).optional(),
408
+ label: z.string().optional()
409
+ }).transform((d) => ({
410
+ origin: d.origin,
411
+ destination: d.destination,
412
+ authentication: d.authentication,
413
+ label: d.label
414
+ }));
415
+ const unmarshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema = z.object({
416
+ all_source_workspaces: z.boolean().optional(),
417
+ selected_workspaces: z.lazy(() => unmarshalIngressNetworkPolicy_WorkspaceIdListSchema).optional()
418
+ }).transform((d) => ({ source: d.all_source_workspaces !== void 0 ? {
419
+ $case: "allSourceWorkspaces",
420
+ allSourceWorkspaces: d.all_source_workspaces
421
+ } : d.selected_workspaces !== void 0 ? {
422
+ $case: "selectedWorkspaces",
423
+ selectedWorkspaces: d.selected_workspaces
424
+ } : void 0 }));
425
+ const unmarshalIngressNetworkPolicy_EndpointsSchema = z.object({ endpoint_ids: z.array(z.string()).optional() }).transform((d) => ({ endpointIds: d.endpoint_ids }));
426
+ const unmarshalIngressNetworkPolicy_IpRangesSchema = z.object({ ip_ranges: z.array(z.string()).optional() }).transform((d) => ({ ipRanges: d.ip_ranges }));
427
+ const unmarshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
428
+ const unmarshalIngressNetworkPolicy_PrivateAccessSchema = z.object({
429
+ restriction_mode: z.string().optional(),
430
+ deny_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema)).optional(),
431
+ allow_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema)).optional()
432
+ }).transform((d) => ({
433
+ restrictionMode: d.restriction_mode,
434
+ denyRules: d.deny_rules,
435
+ allowRules: d.allow_rules
436
+ }));
437
+ const unmarshalIngressNetworkPolicy_PrivateIngressRuleSchema = z.object({
438
+ origin: z.lazy(() => unmarshalIngressNetworkPolicy_PrivateRequestOriginSchema).optional(),
439
+ destination: z.lazy(() => unmarshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
440
+ authentication: z.lazy(() => unmarshalIngressNetworkPolicy_AuthenticationSchema).optional(),
441
+ label: z.string().optional()
442
+ }).transform((d) => ({
443
+ origin: d.origin,
444
+ destination: d.destination,
445
+ authentication: d.authentication,
446
+ label: d.label
447
+ }));
448
+ const unmarshalIngressNetworkPolicy_PrivateRequestOriginSchema = z.object({
449
+ endpoints: z.lazy(() => unmarshalIngressNetworkPolicy_EndpointsSchema).optional(),
450
+ all_registered_endpoints: z.boolean().optional(),
451
+ azure_workspace_private_link: z.boolean().optional(),
452
+ all_private_access: z.boolean().optional()
453
+ }).transform((d) => ({ source: d.endpoints !== void 0 ? {
454
+ $case: "endpoints",
455
+ endpoints: d.endpoints
456
+ } : d.all_registered_endpoints !== void 0 ? {
457
+ $case: "allRegisteredEndpoints",
458
+ allRegisteredEndpoints: d.all_registered_endpoints
459
+ } : d.azure_workspace_private_link !== void 0 ? {
460
+ $case: "azureWorkspacePrivateLink",
461
+ azureWorkspacePrivateLink: d.azure_workspace_private_link
462
+ } : d.all_private_access !== void 0 ? {
463
+ $case: "allPrivateAccess",
464
+ allPrivateAccess: d.all_private_access
465
+ } : void 0 }));
466
+ const unmarshalIngressNetworkPolicy_PublicAccessSchema = z.object({
467
+ restriction_mode: z.string().optional(),
468
+ deny_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_PublicIngressRuleSchema)).optional(),
469
+ allow_rules: z.array(z.lazy(() => unmarshalIngressNetworkPolicy_PublicIngressRuleSchema)).optional()
470
+ }).transform((d) => ({
471
+ restrictionMode: d.restriction_mode,
472
+ denyRules: d.deny_rules,
473
+ allowRules: d.allow_rules
474
+ }));
475
+ const unmarshalIngressNetworkPolicy_PublicIngressRuleSchema = z.object({
476
+ origin: z.lazy(() => unmarshalIngressNetworkPolicy_PublicRequestOriginSchema).optional(),
477
+ destination: z.lazy(() => unmarshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
478
+ authentication: z.lazy(() => unmarshalIngressNetworkPolicy_AuthenticationSchema).optional(),
479
+ label: z.string().optional()
480
+ }).transform((d) => ({
481
+ origin: d.origin,
482
+ destination: d.destination,
483
+ authentication: d.authentication,
484
+ label: d.label
485
+ }));
486
+ const unmarshalIngressNetworkPolicy_PublicRequestOriginSchema = z.object({
487
+ all_ip_ranges: z.boolean().optional(),
488
+ included_ip_ranges: z.lazy(() => unmarshalIngressNetworkPolicy_IpRangesSchema).optional(),
489
+ excluded_ip_ranges: z.lazy(() => unmarshalIngressNetworkPolicy_IpRangesSchema).optional()
490
+ }).transform((d) => ({ source: d.all_ip_ranges !== void 0 ? {
491
+ $case: "allIpRanges",
492
+ allIpRanges: d.all_ip_ranges
493
+ } : d.included_ip_ranges !== void 0 ? {
494
+ $case: "includedIpRanges",
495
+ includedIpRanges: d.included_ip_ranges
496
+ } : d.excluded_ip_ranges !== void 0 ? {
497
+ $case: "excludedIpRanges",
498
+ excludedIpRanges: d.excluded_ip_ranges
499
+ } : void 0 }));
500
+ const unmarshalIngressNetworkPolicy_RequestDestinationSchema = z.object({
501
+ all_destinations: z.boolean().optional(),
502
+ workspace_ui: z.lazy(() => unmarshalIngressNetworkPolicy_WorkspaceUiDestinationSchema).optional(),
503
+ workspace_api: z.lazy(() => unmarshalIngressNetworkPolicy_WorkspaceApiDestinationSchema).optional(),
504
+ apps_runtime: z.lazy(() => unmarshalIngressNetworkPolicy_AppsRuntimeDestinationSchema).optional(),
505
+ lakebase_runtime: z.lazy(() => unmarshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema).optional(),
506
+ account_ui: z.lazy(() => unmarshalIngressNetworkPolicy_AccountUiDestinationSchema).optional(),
507
+ account_api: z.lazy(() => unmarshalIngressNetworkPolicy_AccountApiDestinationSchema).optional(),
508
+ account_databricks_one: z.lazy(() => unmarshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema).optional()
509
+ }).transform((d) => ({
510
+ allDestinations: d.all_destinations,
511
+ workspaceUi: d.workspace_ui,
512
+ workspaceApi: d.workspace_api,
513
+ appsRuntime: d.apps_runtime,
514
+ lakebaseRuntime: d.lakebase_runtime,
515
+ accountUi: d.account_ui,
516
+ accountApi: d.account_api,
517
+ accountDatabricksOne: d.account_databricks_one
518
+ }));
519
+ const unmarshalIngressNetworkPolicy_WorkspaceApiDestinationSchema = z.object({
520
+ scopes: z.array(z.string()).optional(),
521
+ scope_qualifier: z.string().optional()
522
+ }).transform((d) => ({
523
+ scopes: d.scopes,
524
+ scopeQualifier: d.scope_qualifier
525
+ }));
526
+ 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 }));
527
+ const unmarshalIngressNetworkPolicy_WorkspaceUiDestinationSchema = z.object({ all_destinations: z.boolean().optional() }).transform((d) => ({ allDestinations: d.all_destinations }));
528
+ const unmarshalIpAccessListSchema = z.object({
529
+ list_id: z.string().optional(),
530
+ label: z.string().optional(),
531
+ ip_addresses: z.array(z.string()).optional(),
532
+ address_count: z.number().optional(),
533
+ list_type: z.string().optional(),
534
+ created_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
535
+ created_by: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
536
+ updated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
537
+ updated_by: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
538
+ enabled: z.boolean().optional()
539
+ }).transform((d) => ({
540
+ listId: d.list_id,
541
+ label: d.label,
542
+ ipAddresses: d.ip_addresses,
543
+ addressCount: d.address_count,
544
+ listType: d.list_type,
545
+ createdAt: d.created_at,
546
+ createdBy: d.created_by,
547
+ updatedAt: d.updated_at,
548
+ updatedBy: d.updated_by,
549
+ enabled: d.enabled
550
+ }));
551
+ const unmarshalListAccountIpAccessListsResponseSchema = z.object({ ip_access_lists: z.array(z.lazy(() => unmarshalAccountIpAccessListSchema)).optional() }).transform((d) => ({ ipAccessLists: d.ip_access_lists }));
552
+ const unmarshalListEndpointsResponseSchema = z.object({
553
+ items: z.array(z.lazy(() => unmarshalEndpointSchema)).optional(),
554
+ next_page_token: z.string().optional()
555
+ }).transform((d) => ({
556
+ items: d.items,
557
+ nextPageToken: d.next_page_token
558
+ }));
559
+ const unmarshalListIpAccessListsResponseSchema = z.object({ ip_access_lists: z.array(z.lazy(() => unmarshalIpAccessListSchema)).optional() }).transform((d) => ({ ipAccessLists: d.ip_access_lists }));
560
+ const unmarshalListNccPrivateEndpointRulesResponseSchema = z.object({
561
+ items: z.array(z.lazy(() => unmarshalNccPrivateEndpointRuleSchema)).optional(),
562
+ next_page_token: z.string().optional()
563
+ }).transform((d) => ({
564
+ items: d.items,
565
+ nextPageToken: d.next_page_token
566
+ }));
567
+ const unmarshalListNetworkConnectivityConfigsResponseSchema = z.object({
568
+ items: z.array(z.lazy(() => unmarshalNetworkConnectivityConfigSchema)).optional(),
569
+ next_page_token: z.string().optional()
570
+ }).transform((d) => ({
571
+ items: d.items,
572
+ nextPageToken: d.next_page_token
573
+ }));
574
+ const unmarshalListNetworkPoliciesResponseSchema = z.object({
575
+ items: z.array(z.lazy(() => unmarshalAccountNetworkPolicySchema)).optional(),
576
+ next_page_token: z.string().optional()
577
+ }).transform((d) => ({
578
+ items: d.items,
579
+ nextPageToken: d.next_page_token
580
+ }));
581
+ const unmarshalNccPrivateEndpointRuleSchema = z.object({
582
+ rule_id: z.string().optional(),
583
+ network_connectivity_config_id: z.string().optional(),
584
+ connection_state: z.string().optional(),
585
+ domain_names: z.array(z.string()).optional(),
586
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
587
+ updated_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
588
+ deactivated: z.boolean().optional(),
589
+ deactivated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
590
+ error_message: z.string().optional(),
591
+ resource_id: z.string().optional(),
592
+ group_id: z.string().optional(),
593
+ endpoint_name: z.string().optional(),
594
+ account_id: z.string().optional(),
595
+ endpoint_service: z.string().optional(),
596
+ resource_names: z.array(z.string()).optional(),
597
+ vpc_endpoint_id: z.string().optional(),
598
+ enabled: z.boolean().optional(),
599
+ gcp_endpoint: z.lazy(() => unmarshalGcpEndpointSchema).optional()
600
+ }).transform((d) => ({
601
+ ruleId: d.rule_id,
602
+ networkConnectivityConfigId: d.network_connectivity_config_id,
603
+ connectionState: d.connection_state,
604
+ domainNames: d.domain_names,
605
+ creationTime: d.creation_time,
606
+ updatedTime: d.updated_time,
607
+ deactivated: d.deactivated,
608
+ deactivatedAt: d.deactivated_at,
609
+ errorMessage: d.error_message,
610
+ resourceId: d.resource_id,
611
+ groupId: d.group_id,
612
+ endpointName: d.endpoint_name,
613
+ accountId: d.account_id,
614
+ endpointService: d.endpoint_service,
615
+ resourceNames: d.resource_names,
616
+ vpcEndpointId: d.vpc_endpoint_id,
617
+ enabled: d.enabled,
618
+ endpoint: d.gcp_endpoint !== void 0 ? {
619
+ $case: "gcpEndpoint",
620
+ gcpEndpoint: d.gcp_endpoint
621
+ } : void 0
622
+ }));
623
+ const unmarshalNetworkSchema = z.object({
624
+ network_id: z.string().optional(),
625
+ account_id: z.string().optional(),
626
+ workspace_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
627
+ vpc_id: z.string().optional(),
628
+ subnet_ids: z.array(z.string()).optional(),
629
+ security_group_ids: z.array(z.string()).optional(),
630
+ vpc_status: z.string().optional(),
631
+ error_messages: z.array(z.lazy(() => unmarshalNetworkHealthSchema)).optional(),
632
+ network_name: z.string().optional(),
633
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
634
+ warning_messages: z.array(z.lazy(() => unmarshalNetworkWarningSchema)).optional(),
635
+ vpc_endpoints: z.lazy(() => unmarshalNetworkVpcEndpointsSchema).optional(),
636
+ gcp_network_info: z.lazy(() => unmarshalGcpNetworkInfoSchema).optional()
637
+ }).transform((d) => ({
638
+ networkId: d.network_id,
639
+ accountId: d.account_id,
640
+ workspaceId: d.workspace_id,
641
+ vpcId: d.vpc_id,
642
+ subnetIds: d.subnet_ids,
643
+ securityGroupIds: d.security_group_ids,
644
+ vpcStatus: d.vpc_status,
645
+ errorMessages: d.error_messages,
646
+ networkName: d.network_name,
647
+ creationTime: d.creation_time,
648
+ warningMessages: d.warning_messages,
649
+ vpcEndpoints: d.vpc_endpoints,
650
+ networkInfo: d.gcp_network_info !== void 0 ? {
651
+ $case: "gcpNetworkInfo",
652
+ gcpNetworkInfo: d.gcp_network_info
653
+ } : void 0
654
+ }));
655
+ const unmarshalNetworkConnectivityConfigSchema = z.object({
656
+ network_connectivity_config_id: z.string().optional(),
657
+ account_id: z.string().optional(),
658
+ name: z.string().optional(),
659
+ region: z.string().optional(),
660
+ egress_config: z.lazy(() => unmarshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema).optional(),
661
+ updated_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
662
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
663
+ }).transform((d) => ({
664
+ networkConnectivityConfigId: d.network_connectivity_config_id,
665
+ accountId: d.account_id,
666
+ name: d.name,
667
+ region: d.region,
668
+ egressConfig: d.egress_config,
669
+ updatedTime: d.updated_time,
670
+ creationTime: d.creation_time
671
+ }));
672
+ const unmarshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema = z.object({
673
+ rule_id: z.string().optional(),
674
+ network_connectivity_config_id: z.string().optional(),
675
+ account_id: z.string().optional(),
676
+ endpoint_service: z.string().optional(),
677
+ domain_names: z.array(z.string()).optional(),
678
+ resource_names: z.array(z.string()).optional(),
679
+ vpc_endpoint_id: z.string().optional(),
680
+ connection_state: z.string().optional(),
681
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
682
+ updated_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
683
+ deactivated: z.boolean().optional(),
684
+ deactivated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
685
+ enabled: z.boolean().optional(),
686
+ error_message: z.string().optional()
687
+ }).transform((d) => ({
688
+ ruleId: d.rule_id,
689
+ networkConnectivityConfigId: d.network_connectivity_config_id,
690
+ accountId: d.account_id,
691
+ endpointService: d.endpoint_service,
692
+ domainNames: d.domain_names,
693
+ resourceNames: d.resource_names,
694
+ vpcEndpointId: d.vpc_endpoint_id,
695
+ connectionState: d.connection_state,
696
+ creationTime: d.creation_time,
697
+ updatedTime: d.updated_time,
698
+ deactivated: d.deactivated,
699
+ deactivatedAt: d.deactivated_at,
700
+ enabled: d.enabled,
701
+ errorMessage: d.error_message
702
+ }));
703
+ const unmarshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema = z.object({
704
+ rule_id: z.string().optional(),
705
+ network_connectivity_config_id: z.string().optional(),
706
+ resource_id: z.string().optional(),
707
+ group_id: z.string().optional(),
708
+ endpoint_name: z.string().optional(),
709
+ connection_state: z.string().optional(),
710
+ creation_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
711
+ updated_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
712
+ deactivated: z.boolean().optional(),
713
+ deactivated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
714
+ domain_names: z.array(z.string()).optional(),
715
+ error_message: z.string().optional()
716
+ }).transform((d) => ({
717
+ ruleId: d.rule_id,
718
+ networkConnectivityConfigId: d.network_connectivity_config_id,
719
+ resourceId: d.resource_id,
720
+ groupId: d.group_id,
721
+ endpointName: d.endpoint_name,
722
+ connectionState: d.connection_state,
723
+ creationTime: d.creation_time,
724
+ updatedTime: d.updated_time,
725
+ deactivated: d.deactivated,
726
+ deactivatedAt: d.deactivated_at,
727
+ domainNames: d.domain_names,
728
+ errorMessage: d.error_message
729
+ }));
730
+ const unmarshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema = z.object({
731
+ azure_service_endpoint_rule: z.lazy(() => unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema).optional(),
732
+ aws_stable_ip_rule: z.lazy(() => unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema).optional()
733
+ }).transform((d) => ({
734
+ azureServiceEndpointRule: d.azure_service_endpoint_rule,
735
+ awsStableIpRule: d.aws_stable_ip_rule
736
+ }));
737
+ const unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema = z.object({ cidr_blocks: z.array(z.string()).optional() }).transform((d) => ({ cidrBlocks: d.cidr_blocks }));
738
+ const unmarshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema = z.object({
739
+ target_region: z.string().optional(),
740
+ target_services: z.array(z.string()).optional(),
741
+ subnets: z.array(z.string()).optional()
742
+ }).transform((d) => ({
743
+ targetRegion: d.target_region,
744
+ targetServices: d.target_services,
745
+ subnets: d.subnets
746
+ }));
747
+ const unmarshalNetworkHealthSchema = z.object({
748
+ error_type: z.string().optional(),
749
+ error_message: z.string().optional()
750
+ }).transform((d) => ({
751
+ errorType: d.error_type,
752
+ errorMessage: d.error_message
753
+ }));
754
+ const unmarshalNetworkVpcEndpointsSchema = z.object({
755
+ rest_api: z.array(z.string()).optional(),
756
+ dataplane_relay: z.array(z.string()).optional()
757
+ }).transform((d) => ({
758
+ restApi: d.rest_api,
759
+ dataplaneRelay: d.dataplane_relay
760
+ }));
761
+ const unmarshalNetworkWarningSchema = z.object({
762
+ warning_type: z.string().optional(),
763
+ warning_message: z.string().optional()
764
+ }).transform((d) => ({
765
+ warningType: d.warning_type,
766
+ warningMessage: d.warning_message
767
+ }));
768
+ const unmarshalPrivateAccessSettingsSchema = z.object({
769
+ private_access_settings_id: z.string().optional(),
770
+ account_id: z.string().optional(),
771
+ private_access_settings_name: z.string().optional(),
772
+ region: z.string().optional(),
773
+ public_access_enabled: z.boolean().optional(),
774
+ private_access_level: z.string().optional(),
775
+ allowed_vpc_endpoint_ids: z.array(z.string()).optional()
776
+ }).transform((d) => ({
777
+ privateAccessSettingsId: d.private_access_settings_id,
778
+ accountId: d.account_id,
779
+ privateAccessSettingsName: d.private_access_settings_name,
780
+ region: d.region,
781
+ publicAccessEnabled: d.public_access_enabled,
782
+ privateAccessLevel: d.private_access_level,
783
+ allowedVpcEndpointIds: d.allowed_vpc_endpoint_ids
784
+ }));
785
+ const unmarshalReplaceAccountIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalAccountIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
786
+ const unmarshalReplaceIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
787
+ const unmarshalUpdateAccountIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalAccountIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
788
+ const unmarshalUpdateIpAccessListResponseSchema = z.object({ ip_access_list: z.lazy(() => unmarshalIpAccessListSchema).optional() }).transform((d) => ({ ipAccessList: d.ip_access_list }));
789
+ const unmarshalVpcEndpointSchema = z.object({
790
+ vpc_endpoint_id: z.string().optional(),
791
+ account_id: z.string().optional(),
792
+ vpc_endpoint_name: z.string().optional(),
793
+ aws_vpc_endpoint_id: z.string().optional(),
794
+ aws_endpoint_service_id: z.string().optional(),
795
+ use_case: z.string().optional(),
796
+ region: z.string().optional(),
797
+ aws_account_id: z.string().optional(),
798
+ state: z.string().optional(),
799
+ gcp_vpc_endpoint_info: z.lazy(() => unmarshalGcpVpcEndpointInfoSchema).optional()
800
+ }).transform((d) => ({
801
+ vpcEndpointId: d.vpc_endpoint_id,
802
+ accountId: d.account_id,
803
+ vpcEndpointName: d.vpc_endpoint_name,
804
+ awsVpcEndpointId: d.aws_vpc_endpoint_id,
805
+ awsEndpointServiceId: d.aws_endpoint_service_id,
806
+ useCase: d.use_case,
807
+ region: d.region,
808
+ awsAccountId: d.aws_account_id,
809
+ state: d.state,
810
+ vpcEndpointInfo: d.gcp_vpc_endpoint_info !== void 0 ? {
811
+ $case: "gcpVpcEndpointInfo",
812
+ gcpVpcEndpointInfo: d.gcp_vpc_endpoint_info
813
+ } : void 0
814
+ }));
815
+ const unmarshalWorkspaceNetworkOptionSchema = z.object({
816
+ network_policy_id: z.string().optional(),
817
+ workspace_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional()
818
+ }).transform((d) => ({
819
+ networkPolicyId: d.network_policy_id,
820
+ workspaceId: d.workspace_id
821
+ }));
822
+ const marshalAccountNetworkPolicySchema = z.object({
823
+ networkPolicyId: z.string().optional(),
824
+ accountId: z.string().optional(),
825
+ egress: z.lazy(() => marshalEgressNetworkPolicySchema).optional(),
826
+ ingress: z.lazy(() => marshalIngressNetworkPolicySchema).optional(),
827
+ ingressDryRun: z.lazy(() => marshalIngressNetworkPolicySchema).optional()
828
+ }).transform((d) => ({
829
+ network_policy_id: d.networkPolicyId,
830
+ account_id: d.accountId,
831
+ egress: d.egress,
832
+ ingress: d.ingress,
833
+ ingress_dry_run: d.ingressDryRun
834
+ }));
835
+ const marshalAwsVpcEndpointInfoSchema = z.object({
836
+ awsVpcEndpointId: z.string().optional(),
837
+ awsEndpointServiceId: z.string().optional(),
838
+ awsAccountId: z.string().optional()
839
+ }).transform((d) => ({
840
+ aws_vpc_endpoint_id: d.awsVpcEndpointId,
841
+ aws_endpoint_service_id: d.awsEndpointServiceId,
842
+ aws_account_id: d.awsAccountId
843
+ }));
844
+ const marshalAzurePrivateEndpointInfoSchema = z.object({
845
+ privateEndpointName: z.string().optional(),
846
+ privateEndpointResourceGuid: z.string().optional(),
847
+ privateEndpointResourceId: z.string().optional(),
848
+ privateLinkServiceId: z.string().optional()
849
+ }).transform((d) => ({
850
+ private_endpoint_name: d.privateEndpointName,
851
+ private_endpoint_resource_guid: d.privateEndpointResourceGuid,
852
+ private_endpoint_resource_id: d.privateEndpointResourceId,
853
+ private_link_service_id: d.privateLinkServiceId
854
+ }));
855
+ const marshalCreateAccountIpAccessListRequestSchema = z.object({
856
+ accountId: z.string().optional(),
857
+ label: z.string().optional(),
858
+ listType: z.string().optional(),
859
+ ipAddresses: z.array(z.string()).optional()
860
+ }).transform((d) => ({
861
+ account_id: d.accountId,
862
+ label: d.label,
863
+ list_type: d.listType,
864
+ ip_addresses: d.ipAddresses
865
+ }));
866
+ const marshalCreateIpAccessListRequestSchema = z.object({
867
+ label: z.string().optional(),
868
+ listType: z.string().optional(),
869
+ ipAddresses: z.array(z.string()).optional()
870
+ }).transform((d) => ({
871
+ label: d.label,
872
+ list_type: d.listType,
873
+ ip_addresses: d.ipAddresses
874
+ }));
875
+ const marshalCreateNetworkConnectivityConfigurationSchema = z.object({
876
+ networkConnectivityConfigId: z.string().optional(),
877
+ accountId: z.string().optional(),
878
+ name: z.string().optional(),
879
+ region: z.string().optional(),
880
+ egressConfig: z.lazy(() => marshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema).optional(),
881
+ updatedTime: z.bigint().optional(),
882
+ creationTime: z.bigint().optional()
883
+ }).transform((d) => ({
884
+ network_connectivity_config_id: d.networkConnectivityConfigId,
885
+ account_id: d.accountId,
886
+ name: d.name,
887
+ region: d.region,
888
+ egress_config: d.egressConfig,
889
+ updated_time: d.updatedTime,
890
+ creation_time: d.creationTime
891
+ }));
892
+ const marshalCreateNetworkRequestSchema = z.object({
893
+ accountId: z.string().optional(),
894
+ networkName: z.string().optional(),
895
+ vpcId: z.string().optional(),
896
+ subnetIds: z.array(z.string()).optional(),
897
+ securityGroupIds: z.array(z.string()).optional(),
898
+ vpcEndpoints: z.lazy(() => marshalNetworkVpcEndpointsSchema).optional(),
899
+ gcpNetworkInfo: z.lazy(() => marshalGcpNetworkInfoSchema).optional()
900
+ }).transform((d) => ({
901
+ account_id: d.accountId,
902
+ network_name: d.networkName,
903
+ vpc_id: d.vpcId,
904
+ subnet_ids: d.subnetIds,
905
+ security_group_ids: d.securityGroupIds,
906
+ vpc_endpoints: d.vpcEndpoints,
907
+ gcp_network_info: d.gcpNetworkInfo
908
+ }));
909
+ const marshalCreatePrivateAccessSettingsRequestSchema = z.object({
910
+ accountId: z.string().optional(),
911
+ privateAccessSettingsName: z.string().optional(),
912
+ region: z.string().optional(),
913
+ publicAccessEnabled: z.boolean().optional(),
914
+ privateAccessLevel: z.string().optional(),
915
+ allowedVpcEndpointIds: z.array(z.string()).optional()
916
+ }).transform((d) => ({
917
+ account_id: d.accountId,
918
+ private_access_settings_name: d.privateAccessSettingsName,
919
+ region: d.region,
920
+ public_access_enabled: d.publicAccessEnabled,
921
+ private_access_level: d.privateAccessLevel,
922
+ allowed_vpc_endpoint_ids: d.allowedVpcEndpointIds
923
+ }));
924
+ const marshalCreatePrivateEndpointRuleSchema = z.object({
925
+ ruleId: z.string().optional(),
926
+ networkConnectivityConfigId: z.string().optional(),
927
+ connectionState: z.string().optional(),
928
+ domainNames: z.array(z.string()).optional(),
929
+ creationTime: z.bigint().optional(),
930
+ updatedTime: z.bigint().optional(),
931
+ deactivated: z.boolean().optional(),
932
+ deactivatedAt: z.bigint().optional(),
933
+ errorMessage: z.string().optional(),
934
+ resourceId: z.string().optional(),
935
+ groupId: z.string().optional(),
936
+ endpointName: z.string().optional(),
937
+ accountId: z.string().optional(),
938
+ endpointService: z.string().optional(),
939
+ resourceNames: z.array(z.string()).optional(),
940
+ vpcEndpointId: z.string().optional(),
941
+ enabled: z.boolean().optional(),
942
+ endpoint: z.discriminatedUnion("$case", [z.object({
943
+ $case: z.literal("gcpEndpoint"),
944
+ gcpEndpoint: z.lazy(() => marshalGcpEndpointSchema)
945
+ })]).optional()
946
+ }).transform((d) => ({
947
+ rule_id: d.ruleId,
948
+ network_connectivity_config_id: d.networkConnectivityConfigId,
949
+ connection_state: d.connectionState,
950
+ domain_names: d.domainNames,
951
+ creation_time: d.creationTime,
952
+ updated_time: d.updatedTime,
953
+ deactivated: d.deactivated,
954
+ deactivated_at: d.deactivatedAt,
955
+ error_message: d.errorMessage,
956
+ resource_id: d.resourceId,
957
+ group_id: d.groupId,
958
+ endpoint_name: d.endpointName,
959
+ account_id: d.accountId,
960
+ endpoint_service: d.endpointService,
961
+ resource_names: d.resourceNames,
962
+ vpc_endpoint_id: d.vpcEndpointId,
963
+ enabled: d.enabled,
964
+ ...d.endpoint?.$case === "gcpEndpoint" && { gcp_endpoint: d.endpoint.gcpEndpoint }
965
+ }));
966
+ const marshalCreateVpcEndpointRequestSchema = z.object({
967
+ accountId: z.string().optional(),
968
+ vpcEndpointName: z.string().optional(),
969
+ region: z.string().optional(),
970
+ awsVpcEndpointId: z.string().optional(),
971
+ vpcEndpointInfo: z.discriminatedUnion("$case", [z.object({
972
+ $case: z.literal("gcpVpcEndpointInfo"),
973
+ gcpVpcEndpointInfo: z.lazy(() => marshalGcpVpcEndpointInfoSchema)
974
+ })]).optional()
975
+ }).transform((d) => ({
976
+ account_id: d.accountId,
977
+ vpc_endpoint_name: d.vpcEndpointName,
978
+ region: d.region,
979
+ aws_vpc_endpoint_id: d.awsVpcEndpointId,
980
+ ...d.vpcEndpointInfo?.$case === "gcpVpcEndpointInfo" && { gcp_vpc_endpoint_info: d.vpcEndpointInfo.gcpVpcEndpointInfo }
981
+ }));
982
+ const marshalCustomerFacingNetworkConnectivityConfigEgressConfigSchema = z.object({
983
+ defaultRules: z.lazy(() => marshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema).optional(),
984
+ targetRules: z.lazy(() => marshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema).optional()
985
+ }).transform((d) => ({
986
+ default_rules: d.defaultRules,
987
+ target_rules: d.targetRules
988
+ }));
989
+ const marshalCustomerFacingNetworkConnectivityConfigEgressConfig_CustomerFacingTargetRuleSchema = z.object({
990
+ azurePrivateEndpointRules: z.array(z.lazy(() => marshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema)).optional(),
991
+ awsPrivateEndpointRules: z.array(z.lazy(() => marshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema)).optional()
992
+ }).transform((d) => ({
993
+ azure_private_endpoint_rules: d.azurePrivateEndpointRules,
994
+ aws_private_endpoint_rules: d.awsPrivateEndpointRules
995
+ }));
996
+ const marshalEgressNetworkPolicySchema = z.object({ networkAccess: z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicySchema).optional() }).transform((d) => ({ network_access: d.networkAccess }));
997
+ const marshalEgressNetworkPolicy_NetworkAccessPolicySchema = z.object({
998
+ restrictionMode: z.string().optional(),
999
+ allowedInternetDestinations: z.array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema)).optional(),
1000
+ allowedStorageDestinations: z.array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema)).optional(),
1001
+ policyEnforcement: z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema).optional(),
1002
+ blockedInternetDestinations: z.array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema)).optional(),
1003
+ allowedDatabricksDestinations: z.array(z.lazy(() => marshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema)).optional()
1004
+ }).transform((d) => ({
1005
+ restriction_mode: d.restrictionMode,
1006
+ allowed_internet_destinations: d.allowedInternetDestinations,
1007
+ allowed_storage_destinations: d.allowedStorageDestinations,
1008
+ policy_enforcement: d.policyEnforcement,
1009
+ blocked_internet_destinations: d.blockedInternetDestinations,
1010
+ allowed_databricks_destinations: d.allowedDatabricksDestinations
1011
+ }));
1012
+ const marshalEgressNetworkPolicy_NetworkAccessPolicy_DatabricksDestinationSchema = z.object({ workspaceIds: z.array(z.bigint()).optional() }).transform((d) => ({ workspace_ids: d.workspaceIds }));
1013
+ const marshalEgressNetworkPolicy_NetworkAccessPolicy_InternetDestinationSchema = z.object({
1014
+ destination: z.string().optional(),
1015
+ internetDestinationType: z.string().optional()
1016
+ }).transform((d) => ({
1017
+ destination: d.destination,
1018
+ internet_destination_type: d.internetDestinationType
1019
+ }));
1020
+ const marshalEgressNetworkPolicy_NetworkAccessPolicy_PolicyEnforcementSchema = z.object({
1021
+ enforcementMode: z.string().optional(),
1022
+ dryRunModeProductFilter: z.array(z.string()).optional()
1023
+ }).transform((d) => ({
1024
+ enforcement_mode: d.enforcementMode,
1025
+ dry_run_mode_product_filter: d.dryRunModeProductFilter
1026
+ }));
1027
+ const marshalEgressNetworkPolicy_NetworkAccessPolicy_StorageDestinationSchema = z.object({
1028
+ bucketName: z.string().optional(),
1029
+ region: z.string().optional(),
1030
+ storageDestinationType: z.string().optional(),
1031
+ azureStorageAccount: z.string().optional(),
1032
+ azureStorageService: z.string().optional()
1033
+ }).transform((d) => ({
1034
+ bucket_name: d.bucketName,
1035
+ region: d.region,
1036
+ storage_destination_type: d.storageDestinationType,
1037
+ azure_storage_account: d.azureStorageAccount,
1038
+ azure_storage_service: d.azureStorageService
1039
+ }));
1040
+ const marshalEndpointSchema = z.object({
1041
+ name: z.string().optional(),
1042
+ endpointId: z.string().optional(),
1043
+ accountId: z.string().optional(),
1044
+ displayName: z.string().optional(),
1045
+ useCase: z.string().optional(),
1046
+ region: z.string().optional(),
1047
+ state: z.string().optional(),
1048
+ endpointInfo: z.discriminatedUnion("$case", [
1049
+ z.object({
1050
+ $case: z.literal("azurePrivateEndpointInfo"),
1051
+ azurePrivateEndpointInfo: z.lazy(() => marshalAzurePrivateEndpointInfoSchema)
1052
+ }),
1053
+ z.object({
1054
+ $case: z.literal("awsVpcEndpointInfo"),
1055
+ awsVpcEndpointInfo: z.lazy(() => marshalAwsVpcEndpointInfoSchema)
1056
+ }),
1057
+ z.object({
1058
+ $case: z.literal("gcpPscEndpointInfo"),
1059
+ gcpPscEndpointInfo: z.lazy(() => marshalGcpPscEndpointInfoSchema)
1060
+ })
1061
+ ]).optional(),
1062
+ createTime: z.any().transform((d) => d.toString()).optional()
1063
+ }).transform((d) => ({
1064
+ name: d.name,
1065
+ endpoint_id: d.endpointId,
1066
+ account_id: d.accountId,
1067
+ display_name: d.displayName,
1068
+ use_case: d.useCase,
1069
+ region: d.region,
1070
+ state: d.state,
1071
+ ...d.endpointInfo?.$case === "azurePrivateEndpointInfo" && { azure_private_endpoint_info: d.endpointInfo.azurePrivateEndpointInfo },
1072
+ ...d.endpointInfo?.$case === "awsVpcEndpointInfo" && { aws_vpc_endpoint_info: d.endpointInfo.awsVpcEndpointInfo },
1073
+ ...d.endpointInfo?.$case === "gcpPscEndpointInfo" && { gcp_psc_endpoint_info: d.endpointInfo.gcpPscEndpointInfo },
1074
+ create_time: d.createTime
1075
+ }));
1076
+ const marshalGcpEndpointSchema = z.object({
1077
+ pscEndpointUri: z.string().optional(),
1078
+ targetServices: z.discriminatedUnion("$case", [z.object({
1079
+ $case: z.literal("serviceAttachment"),
1080
+ serviceAttachment: z.string()
1081
+ })]).optional()
1082
+ }).transform((d) => ({
1083
+ psc_endpoint_uri: d.pscEndpointUri,
1084
+ ...d.targetServices?.$case === "serviceAttachment" && { service_attachment: d.targetServices.serviceAttachment }
1085
+ }));
1086
+ const marshalGcpNetworkInfoSchema = z.object({
1087
+ networkProjectId: z.string().optional(),
1088
+ vpcId: z.string().optional(),
1089
+ subnetId: z.string().optional(),
1090
+ subnetRegion: z.string().optional(),
1091
+ podIpRangeName: z.string().optional(),
1092
+ serviceIpRangeName: z.string().optional()
1093
+ }).transform((d) => ({
1094
+ network_project_id: d.networkProjectId,
1095
+ vpc_id: d.vpcId,
1096
+ subnet_id: d.subnetId,
1097
+ subnet_region: d.subnetRegion,
1098
+ pod_ip_range_name: d.podIpRangeName,
1099
+ service_ip_range_name: d.serviceIpRangeName
1100
+ }));
1101
+ const marshalGcpPscEndpointInfoSchema = z.object({
1102
+ pscConnectionId: z.string().optional(),
1103
+ projectId: z.string().optional(),
1104
+ pscEndpoint: z.string().optional(),
1105
+ endpointRegion: z.string().optional(),
1106
+ serviceAttachmentId: z.string().optional()
1107
+ }).transform((d) => ({
1108
+ psc_connection_id: d.pscConnectionId,
1109
+ project_id: d.projectId,
1110
+ psc_endpoint: d.pscEndpoint,
1111
+ endpoint_region: d.endpointRegion,
1112
+ service_attachment_id: d.serviceAttachmentId
1113
+ }));
1114
+ const marshalGcpVpcEndpointInfoSchema = z.object({
1115
+ pscConnectionId: z.string().optional(),
1116
+ projectId: z.string().optional(),
1117
+ pscEndpointName: z.string().optional(),
1118
+ endpointRegion: z.string().optional(),
1119
+ serviceAttachmentId: z.string().optional()
1120
+ }).transform((d) => ({
1121
+ psc_connection_id: d.pscConnectionId,
1122
+ project_id: d.projectId,
1123
+ psc_endpoint_name: d.pscEndpointName,
1124
+ endpoint_region: d.endpointRegion,
1125
+ service_attachment_id: d.serviceAttachmentId
1126
+ }));
1127
+ const marshalIngressNetworkPolicySchema = z.object({
1128
+ publicAccess: z.lazy(() => marshalIngressNetworkPolicy_PublicAccessSchema).optional(),
1129
+ privateAccess: z.lazy(() => marshalIngressNetworkPolicy_PrivateAccessSchema).optional(),
1130
+ crossWorkspaceAccess: z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceAccessSchema).optional()
1131
+ }).transform((d) => ({
1132
+ public_access: d.publicAccess,
1133
+ private_access: d.privateAccess,
1134
+ cross_workspace_access: d.crossWorkspaceAccess
1135
+ }));
1136
+ const marshalIngressNetworkPolicy_AccountApiDestinationSchema = z.object({
1137
+ scopes: z.array(z.string()).optional(),
1138
+ scopeQualifier: z.string().optional()
1139
+ }).transform((d) => ({
1140
+ scopes: d.scopes,
1141
+ scope_qualifier: d.scopeQualifier
1142
+ }));
1143
+ const marshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1144
+ const marshalIngressNetworkPolicy_AccountUiDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1145
+ const marshalIngressNetworkPolicy_AppsRuntimeDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1146
+ const marshalIngressNetworkPolicy_AuthenticationSchema = z.object({
1147
+ identityType: z.string().optional(),
1148
+ identities: z.array(z.lazy(() => marshalIngressNetworkPolicy_AuthenticationIdentitySchema)).optional()
1149
+ }).transform((d) => ({
1150
+ identity_type: d.identityType,
1151
+ identities: d.identities
1152
+ }));
1153
+ const marshalIngressNetworkPolicy_AuthenticationIdentitySchema = z.object({
1154
+ principalType: z.string().optional(),
1155
+ principalId: z.bigint().optional()
1156
+ }).transform((d) => ({
1157
+ principal_type: d.principalType,
1158
+ principal_id: d.principalId
1159
+ }));
1160
+ const marshalIngressNetworkPolicy_CrossWorkspaceAccessSchema = z.object({
1161
+ restrictionMode: z.string().optional(),
1162
+ denyRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema)).optional(),
1163
+ allowRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema)).optional()
1164
+ }).transform((d) => ({
1165
+ restriction_mode: d.restrictionMode,
1166
+ deny_rules: d.denyRules,
1167
+ allow_rules: d.allowRules
1168
+ }));
1169
+ const marshalIngressNetworkPolicy_CrossWorkspaceIngressRuleSchema = z.object({
1170
+ origin: z.lazy(() => marshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema).optional(),
1171
+ destination: z.lazy(() => marshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
1172
+ authentication: z.lazy(() => marshalIngressNetworkPolicy_AuthenticationSchema).optional(),
1173
+ label: z.string().optional()
1174
+ }).transform((d) => ({
1175
+ origin: d.origin,
1176
+ destination: d.destination,
1177
+ authentication: d.authentication,
1178
+ label: d.label
1179
+ }));
1180
+ const marshalIngressNetworkPolicy_CrossWorkspaceRequestOriginSchema = z.object({ source: z.discriminatedUnion("$case", [z.object({
1181
+ $case: z.literal("allSourceWorkspaces"),
1182
+ allSourceWorkspaces: z.boolean()
1183
+ }), z.object({
1184
+ $case: z.literal("selectedWorkspaces"),
1185
+ selectedWorkspaces: z.lazy(() => marshalIngressNetworkPolicy_WorkspaceIdListSchema)
1186
+ })]).optional() }).transform((d) => ({
1187
+ ...d.source?.$case === "allSourceWorkspaces" && { all_source_workspaces: d.source.allSourceWorkspaces },
1188
+ ...d.source?.$case === "selectedWorkspaces" && { selected_workspaces: d.source.selectedWorkspaces }
1189
+ }));
1190
+ const marshalIngressNetworkPolicy_EndpointsSchema = z.object({ endpointIds: z.array(z.string()).optional() }).transform((d) => ({ endpoint_ids: d.endpointIds }));
1191
+ const marshalIngressNetworkPolicy_IpRangesSchema = z.object({ ipRanges: z.array(z.string()).optional() }).transform((d) => ({ ip_ranges: d.ipRanges }));
1192
+ const marshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1193
+ const marshalIngressNetworkPolicy_PrivateAccessSchema = z.object({
1194
+ restrictionMode: z.string().optional(),
1195
+ denyRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_PrivateIngressRuleSchema)).optional(),
1196
+ allowRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_PrivateIngressRuleSchema)).optional()
1197
+ }).transform((d) => ({
1198
+ restriction_mode: d.restrictionMode,
1199
+ deny_rules: d.denyRules,
1200
+ allow_rules: d.allowRules
1201
+ }));
1202
+ const marshalIngressNetworkPolicy_PrivateIngressRuleSchema = z.object({
1203
+ origin: z.lazy(() => marshalIngressNetworkPolicy_PrivateRequestOriginSchema).optional(),
1204
+ destination: z.lazy(() => marshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
1205
+ authentication: z.lazy(() => marshalIngressNetworkPolicy_AuthenticationSchema).optional(),
1206
+ label: z.string().optional()
1207
+ }).transform((d) => ({
1208
+ origin: d.origin,
1209
+ destination: d.destination,
1210
+ authentication: d.authentication,
1211
+ label: d.label
1212
+ }));
1213
+ const marshalIngressNetworkPolicy_PrivateRequestOriginSchema = z.object({ source: z.discriminatedUnion("$case", [
1214
+ z.object({
1215
+ $case: z.literal("endpoints"),
1216
+ endpoints: z.lazy(() => marshalIngressNetworkPolicy_EndpointsSchema)
1217
+ }),
1218
+ z.object({
1219
+ $case: z.literal("allRegisteredEndpoints"),
1220
+ allRegisteredEndpoints: z.boolean()
1221
+ }),
1222
+ z.object({
1223
+ $case: z.literal("azureWorkspacePrivateLink"),
1224
+ azureWorkspacePrivateLink: z.boolean()
1225
+ }),
1226
+ z.object({
1227
+ $case: z.literal("allPrivateAccess"),
1228
+ allPrivateAccess: z.boolean()
1229
+ })
1230
+ ]).optional() }).transform((d) => ({
1231
+ ...d.source?.$case === "endpoints" && { endpoints: d.source.endpoints },
1232
+ ...d.source?.$case === "allRegisteredEndpoints" && { all_registered_endpoints: d.source.allRegisteredEndpoints },
1233
+ ...d.source?.$case === "azureWorkspacePrivateLink" && { azure_workspace_private_link: d.source.azureWorkspacePrivateLink },
1234
+ ...d.source?.$case === "allPrivateAccess" && { all_private_access: d.source.allPrivateAccess }
1235
+ }));
1236
+ const marshalIngressNetworkPolicy_PublicAccessSchema = z.object({
1237
+ restrictionMode: z.string().optional(),
1238
+ denyRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_PublicIngressRuleSchema)).optional(),
1239
+ allowRules: z.array(z.lazy(() => marshalIngressNetworkPolicy_PublicIngressRuleSchema)).optional()
1240
+ }).transform((d) => ({
1241
+ restriction_mode: d.restrictionMode,
1242
+ deny_rules: d.denyRules,
1243
+ allow_rules: d.allowRules
1244
+ }));
1245
+ const marshalIngressNetworkPolicy_PublicIngressRuleSchema = z.object({
1246
+ origin: z.lazy(() => marshalIngressNetworkPolicy_PublicRequestOriginSchema).optional(),
1247
+ destination: z.lazy(() => marshalIngressNetworkPolicy_RequestDestinationSchema).optional(),
1248
+ authentication: z.lazy(() => marshalIngressNetworkPolicy_AuthenticationSchema).optional(),
1249
+ label: z.string().optional()
1250
+ }).transform((d) => ({
1251
+ origin: d.origin,
1252
+ destination: d.destination,
1253
+ authentication: d.authentication,
1254
+ label: d.label
1255
+ }));
1256
+ const marshalIngressNetworkPolicy_PublicRequestOriginSchema = z.object({ source: z.discriminatedUnion("$case", [
1257
+ z.object({
1258
+ $case: z.literal("allIpRanges"),
1259
+ allIpRanges: z.boolean()
1260
+ }),
1261
+ z.object({
1262
+ $case: z.literal("includedIpRanges"),
1263
+ includedIpRanges: z.lazy(() => marshalIngressNetworkPolicy_IpRangesSchema)
1264
+ }),
1265
+ z.object({
1266
+ $case: z.literal("excludedIpRanges"),
1267
+ excludedIpRanges: z.lazy(() => marshalIngressNetworkPolicy_IpRangesSchema)
1268
+ })
1269
+ ]).optional() }).transform((d) => ({
1270
+ ...d.source?.$case === "allIpRanges" && { all_ip_ranges: d.source.allIpRanges },
1271
+ ...d.source?.$case === "includedIpRanges" && { included_ip_ranges: d.source.includedIpRanges },
1272
+ ...d.source?.$case === "excludedIpRanges" && { excluded_ip_ranges: d.source.excludedIpRanges }
1273
+ }));
1274
+ const marshalIngressNetworkPolicy_RequestDestinationSchema = z.object({
1275
+ allDestinations: z.boolean().optional(),
1276
+ workspaceUi: z.lazy(() => marshalIngressNetworkPolicy_WorkspaceUiDestinationSchema).optional(),
1277
+ workspaceApi: z.lazy(() => marshalIngressNetworkPolicy_WorkspaceApiDestinationSchema).optional(),
1278
+ appsRuntime: z.lazy(() => marshalIngressNetworkPolicy_AppsRuntimeDestinationSchema).optional(),
1279
+ lakebaseRuntime: z.lazy(() => marshalIngressNetworkPolicy_LakebaseRuntimeDestinationSchema).optional(),
1280
+ accountUi: z.lazy(() => marshalIngressNetworkPolicy_AccountUiDestinationSchema).optional(),
1281
+ accountApi: z.lazy(() => marshalIngressNetworkPolicy_AccountApiDestinationSchema).optional(),
1282
+ accountDatabricksOne: z.lazy(() => marshalIngressNetworkPolicy_AccountDatabricksOneDestinationSchema).optional()
1283
+ }).transform((d) => ({
1284
+ all_destinations: d.allDestinations,
1285
+ workspace_ui: d.workspaceUi,
1286
+ workspace_api: d.workspaceApi,
1287
+ apps_runtime: d.appsRuntime,
1288
+ lakebase_runtime: d.lakebaseRuntime,
1289
+ account_ui: d.accountUi,
1290
+ account_api: d.accountApi,
1291
+ account_databricks_one: d.accountDatabricksOne
1292
+ }));
1293
+ const marshalIngressNetworkPolicy_WorkspaceApiDestinationSchema = z.object({
1294
+ scopes: z.array(z.string()).optional(),
1295
+ scopeQualifier: z.string().optional()
1296
+ }).transform((d) => ({
1297
+ scopes: d.scopes,
1298
+ scope_qualifier: d.scopeQualifier
1299
+ }));
1300
+ const marshalIngressNetworkPolicy_WorkspaceIdListSchema = z.object({ workspaceIds: z.array(z.bigint()).optional() }).transform((d) => ({ workspace_ids: d.workspaceIds }));
1301
+ const marshalIngressNetworkPolicy_WorkspaceUiDestinationSchema = z.object({ allDestinations: z.boolean().optional() }).transform((d) => ({ all_destinations: d.allDestinations }));
1302
+ const marshalNetworkConnectivityConfigAwsPrivateEndpointRuleSchema = z.object({
1303
+ ruleId: z.string().optional(),
1304
+ networkConnectivityConfigId: z.string().optional(),
1305
+ accountId: z.string().optional(),
1306
+ endpointService: z.string().optional(),
1307
+ domainNames: z.array(z.string()).optional(),
1308
+ resourceNames: z.array(z.string()).optional(),
1309
+ vpcEndpointId: z.string().optional(),
1310
+ connectionState: z.string().optional(),
1311
+ creationTime: z.bigint().optional(),
1312
+ updatedTime: z.bigint().optional(),
1313
+ deactivated: z.boolean().optional(),
1314
+ deactivatedAt: z.bigint().optional(),
1315
+ enabled: z.boolean().optional(),
1316
+ errorMessage: z.string().optional()
1317
+ }).transform((d) => ({
1318
+ rule_id: d.ruleId,
1319
+ network_connectivity_config_id: d.networkConnectivityConfigId,
1320
+ account_id: d.accountId,
1321
+ endpoint_service: d.endpointService,
1322
+ domain_names: d.domainNames,
1323
+ resource_names: d.resourceNames,
1324
+ vpc_endpoint_id: d.vpcEndpointId,
1325
+ connection_state: d.connectionState,
1326
+ creation_time: d.creationTime,
1327
+ updated_time: d.updatedTime,
1328
+ deactivated: d.deactivated,
1329
+ deactivated_at: d.deactivatedAt,
1330
+ enabled: d.enabled,
1331
+ error_message: d.errorMessage
1332
+ }));
1333
+ const marshalNetworkConnectivityConfigAzurePrivateEndpointRuleSchema = z.object({
1334
+ ruleId: z.string().optional(),
1335
+ networkConnectivityConfigId: z.string().optional(),
1336
+ resourceId: z.string().optional(),
1337
+ groupId: z.string().optional(),
1338
+ endpointName: z.string().optional(),
1339
+ connectionState: z.string().optional(),
1340
+ creationTime: z.bigint().optional(),
1341
+ updatedTime: z.bigint().optional(),
1342
+ deactivated: z.boolean().optional(),
1343
+ deactivatedAt: z.bigint().optional(),
1344
+ domainNames: z.array(z.string()).optional(),
1345
+ errorMessage: z.string().optional()
1346
+ }).transform((d) => ({
1347
+ rule_id: d.ruleId,
1348
+ network_connectivity_config_id: d.networkConnectivityConfigId,
1349
+ resource_id: d.resourceId,
1350
+ group_id: d.groupId,
1351
+ endpoint_name: d.endpointName,
1352
+ connection_state: d.connectionState,
1353
+ creation_time: d.creationTime,
1354
+ updated_time: d.updatedTime,
1355
+ deactivated: d.deactivated,
1356
+ deactivated_at: d.deactivatedAt,
1357
+ domain_names: d.domainNames,
1358
+ error_message: d.errorMessage
1359
+ }));
1360
+ const marshalNetworkConnectivityConfigEgressConfig_DefaultRuleSchema = z.object({
1361
+ azureServiceEndpointRule: z.lazy(() => marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema).optional(),
1362
+ awsStableIpRule: z.lazy(() => marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema).optional()
1363
+ }).transform((d) => ({
1364
+ azure_service_endpoint_rule: d.azureServiceEndpointRule,
1365
+ aws_stable_ip_rule: d.awsStableIpRule
1366
+ }));
1367
+ const marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AwsStableIpRuleSchema = z.object({ cidrBlocks: z.array(z.string()).optional() }).transform((d) => ({ cidr_blocks: d.cidrBlocks }));
1368
+ const marshalNetworkConnectivityConfigEgressConfig_DefaultRule_AzureServiceEndpointRuleSchema = z.object({
1369
+ targetRegion: z.string().optional(),
1370
+ targetServices: z.array(z.string()).optional(),
1371
+ subnets: z.array(z.string()).optional()
1372
+ }).transform((d) => ({
1373
+ target_region: d.targetRegion,
1374
+ target_services: d.targetServices,
1375
+ subnets: d.subnets
1376
+ }));
1377
+ const marshalNetworkVpcEndpointsSchema = z.object({
1378
+ restApi: z.array(z.string()).optional(),
1379
+ dataplaneRelay: z.array(z.string()).optional()
1380
+ }).transform((d) => ({
1381
+ rest_api: d.restApi,
1382
+ dataplane_relay: d.dataplaneRelay
1383
+ }));
1384
+ const marshalPrivateAccessSettingsSchema = z.object({
1385
+ privateAccessSettingsId: z.string().optional(),
1386
+ accountId: z.string().optional(),
1387
+ privateAccessSettingsName: z.string().optional(),
1388
+ region: z.string().optional(),
1389
+ publicAccessEnabled: z.boolean().optional(),
1390
+ privateAccessLevel: z.string().optional(),
1391
+ allowedVpcEndpointIds: z.array(z.string()).optional()
1392
+ }).transform((d) => ({
1393
+ private_access_settings_id: d.privateAccessSettingsId,
1394
+ account_id: d.accountId,
1395
+ private_access_settings_name: d.privateAccessSettingsName,
1396
+ region: d.region,
1397
+ public_access_enabled: d.publicAccessEnabled,
1398
+ private_access_level: d.privateAccessLevel,
1399
+ allowed_vpc_endpoint_ids: d.allowedVpcEndpointIds
1400
+ }));
1401
+ const marshalReplaceAccountIpAccessListRequestSchema = z.object({
1402
+ accountId: z.string().optional(),
1403
+ listId: z.string().optional(),
1404
+ label: z.string().optional(),
1405
+ listType: z.string().optional(),
1406
+ ipAddresses: z.array(z.string()).optional(),
1407
+ enabled: z.boolean().optional()
1408
+ }).transform((d) => ({
1409
+ account_id: d.accountId,
1410
+ list_id: d.listId,
1411
+ label: d.label,
1412
+ list_type: d.listType,
1413
+ ip_addresses: d.ipAddresses,
1414
+ enabled: d.enabled
1415
+ }));
1416
+ const marshalReplaceIpAccessListRequestSchema = z.object({
1417
+ listId: z.string().optional(),
1418
+ label: z.string().optional(),
1419
+ listType: z.string().optional(),
1420
+ ipAddresses: z.array(z.string()).optional(),
1421
+ enabled: z.boolean().optional()
1422
+ }).transform((d) => ({
1423
+ list_id: d.listId,
1424
+ label: d.label,
1425
+ list_type: d.listType,
1426
+ ip_addresses: d.ipAddresses,
1427
+ enabled: d.enabled
1428
+ }));
1429
+ const marshalUpdateAccountIpAccessListRequestSchema = z.object({
1430
+ accountId: z.string().optional(),
1431
+ listId: z.string().optional(),
1432
+ label: z.string().optional(),
1433
+ listType: z.string().optional(),
1434
+ ipAddresses: z.array(z.string()).optional(),
1435
+ enabled: z.boolean().optional()
1436
+ }).transform((d) => ({
1437
+ account_id: d.accountId,
1438
+ list_id: d.listId,
1439
+ label: d.label,
1440
+ list_type: d.listType,
1441
+ ip_addresses: d.ipAddresses,
1442
+ enabled: d.enabled
1443
+ }));
1444
+ const marshalUpdateIpAccessListRequestSchema = z.object({
1445
+ listId: z.string().optional(),
1446
+ label: z.string().optional(),
1447
+ listType: z.string().optional(),
1448
+ ipAddresses: z.array(z.string()).optional(),
1449
+ enabled: z.boolean().optional()
1450
+ }).transform((d) => ({
1451
+ list_id: d.listId,
1452
+ label: d.label,
1453
+ list_type: d.listType,
1454
+ ip_addresses: d.ipAddresses,
1455
+ enabled: d.enabled
1456
+ }));
1457
+ const marshalUpdatePrivateEndpointRuleSchema = z.object({
1458
+ ruleId: z.string().optional(),
1459
+ networkConnectivityConfigId: z.string().optional(),
1460
+ connectionState: z.string().optional(),
1461
+ domainNames: z.array(z.string()).optional(),
1462
+ creationTime: z.bigint().optional(),
1463
+ updatedTime: z.bigint().optional(),
1464
+ deactivated: z.boolean().optional(),
1465
+ deactivatedAt: z.bigint().optional(),
1466
+ errorMessage: z.string().optional(),
1467
+ resourceId: z.string().optional(),
1468
+ groupId: z.string().optional(),
1469
+ endpointName: z.string().optional(),
1470
+ accountId: z.string().optional(),
1471
+ endpointService: z.string().optional(),
1472
+ resourceNames: z.array(z.string()).optional(),
1473
+ vpcEndpointId: z.string().optional(),
1474
+ enabled: z.boolean().optional(),
1475
+ endpoint: z.discriminatedUnion("$case", [z.object({
1476
+ $case: z.literal("gcpEndpoint"),
1477
+ gcpEndpoint: z.lazy(() => marshalGcpEndpointSchema)
1478
+ })]).optional()
1479
+ }).transform((d) => ({
1480
+ rule_id: d.ruleId,
1481
+ network_connectivity_config_id: d.networkConnectivityConfigId,
1482
+ connection_state: d.connectionState,
1483
+ domain_names: d.domainNames,
1484
+ creation_time: d.creationTime,
1485
+ updated_time: d.updatedTime,
1486
+ deactivated: d.deactivated,
1487
+ deactivated_at: d.deactivatedAt,
1488
+ error_message: d.errorMessage,
1489
+ resource_id: d.resourceId,
1490
+ group_id: d.groupId,
1491
+ endpoint_name: d.endpointName,
1492
+ account_id: d.accountId,
1493
+ endpoint_service: d.endpointService,
1494
+ resource_names: d.resourceNames,
1495
+ vpc_endpoint_id: d.vpcEndpointId,
1496
+ enabled: d.enabled,
1497
+ ...d.endpoint?.$case === "gcpEndpoint" && { gcp_endpoint: d.endpoint.gcpEndpoint }
1498
+ }));
1499
+ const marshalWorkspaceNetworkOptionSchema = z.object({
1500
+ networkPolicyId: z.string().optional(),
1501
+ workspaceId: z.bigint().optional()
1502
+ }).transform((d) => ({
1503
+ network_policy_id: d.networkPolicyId,
1504
+ workspace_id: d.workspaceId
2397
1505
  }));
2398
1506
  const gcpEndpointFieldMaskSchema = {
2399
- pscEndpointUri: { wire: 'psc_endpoint_uri' },
2400
- serviceAttachment: { wire: 'service_attachment' },
1507
+ pscEndpointUri: { wire: "psc_endpoint_uri" },
1508
+ serviceAttachment: { wire: "service_attachment" }
2401
1509
  };
2402
1510
  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' },
1511
+ accountId: { wire: "account_id" },
1512
+ connectionState: { wire: "connection_state" },
1513
+ creationTime: { wire: "creation_time" },
1514
+ deactivated: { wire: "deactivated" },
1515
+ deactivatedAt: { wire: "deactivated_at" },
1516
+ domainNames: { wire: "domain_names" },
1517
+ enabled: { wire: "enabled" },
1518
+ endpointName: { wire: "endpoint_name" },
1519
+ endpointService: { wire: "endpoint_service" },
1520
+ errorMessage: { wire: "error_message" },
1521
+ gcpEndpoint: {
1522
+ wire: "gcp_endpoint",
1523
+ children: () => gcpEndpointFieldMaskSchema
1524
+ },
1525
+ groupId: { wire: "group_id" },
1526
+ networkConnectivityConfigId: { wire: "network_connectivity_config_id" },
1527
+ resourceId: { wire: "resource_id" },
1528
+ resourceNames: { wire: "resource_names" },
1529
+ ruleId: { wire: "rule_id" },
1530
+ updatedTime: { wire: "updated_time" },
1531
+ vpcEndpointId: { wire: "vpc_endpoint_id" }
2424
1532
  };
2425
- export function updatePrivateEndpointRuleFieldMask(...paths) {
2426
- return FieldMask.build(paths, updatePrivateEndpointRuleFieldMaskSchema);
1533
+ function updatePrivateEndpointRuleFieldMask(...paths) {
1534
+ return FieldMask.build(paths, updatePrivateEndpointRuleFieldMaskSchema);
2427
1535
  }
1536
+
1537
+ //#endregion
1538
+ 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, 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, 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
1539
  //# sourceMappingURL=model.js.map