@databricks/sdk-settings 0.0.0-dev → 0.1.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +203 -0
- package/dist/v2/client.d.ts +68 -0
- package/dist/v2/client.d.ts.map +1 -0
- package/dist/v2/client.js +346 -0
- package/dist/v2/client.js.map +1 -0
- package/dist/v2/index.d.ts +4 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.js +4 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/model.d.ts +442 -0
- package/dist/v2/model.d.ts.map +1 -0
- package/dist/v2/model.js +790 -0
- package/dist/v2/model.js.map +1 -0
- package/dist/v2/transport.d.ts +5 -0
- package/dist/v2/transport.d.ts.map +1 -0
- package/dist/v2/transport.js +57 -0
- package/dist/v2/transport.js.map +1 -0
- package/dist/v2/utils.d.ts +22 -0
- package/dist/v2/utils.d.ts.map +1 -0
- package/dist/v2/utils.js +113 -0
- package/dist/v2/utils.js.map +1 -0
- package/package.json +38 -4
- package/src/v2/client.ts +445 -0
- package/src/v2/index.ts +44 -0
- package/src/v2/model.ts +1300 -0
- package/src/v2/transport.ts +73 -0
- package/src/v2/utils.ts +156 -0
- package/README.md +0 -1
- package/index.js +0 -1
package/dist/v2/model.js
ADDED
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/**
|
|
4
|
+
* Preview phase for settings that are feature previews.
|
|
5
|
+
* For settings that are not feature previews, the preview_phase field is left unset.
|
|
6
|
+
* Mirrors only the customer-facing phases surfaced in the UI; internal-only phases
|
|
7
|
+
* (DISABLED, DEV, UNDER_MIGRATION, LAUNCHED, etc.) are not exposed here.
|
|
8
|
+
*/
|
|
9
|
+
export var PreviewPhase;
|
|
10
|
+
(function (PreviewPhase) {
|
|
11
|
+
/** Default value. Indicates the preview phase is unknown or the setting is not a feature preview. */
|
|
12
|
+
PreviewPhase["PREVIEW_PHASE_UNSPECIFIED"] = "PREVIEW_PHASE_UNSPECIFIED";
|
|
13
|
+
/** The feature is in private preview, available only to specifically enrolled customers. */
|
|
14
|
+
PreviewPhase["PRIVATE_PREVIEW"] = "PRIVATE_PREVIEW";
|
|
15
|
+
/**
|
|
16
|
+
* The feature is in public preview, available to all customers. Also used for gated public
|
|
17
|
+
* preview (available to customers who request access) since the distinction is internal.
|
|
18
|
+
*/
|
|
19
|
+
PreviewPhase["PUBLIC_PREVIEW"] = "PUBLIC_PREVIEW";
|
|
20
|
+
/** The feature is in beta. */
|
|
21
|
+
PreviewPhase["BETA"] = "BETA";
|
|
22
|
+
/** The feature is approaching general availability. */
|
|
23
|
+
PreviewPhase["GA_SOON"] = "GA_SOON";
|
|
24
|
+
/** The feature has reached general availability. */
|
|
25
|
+
PreviewPhase["GA"] = "GA";
|
|
26
|
+
})(PreviewPhase || (PreviewPhase = {}));
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
28
|
+
export var AibiDashboardEmbeddingAccessPolicy_AccessPolicyType;
|
|
29
|
+
(function (AibiDashboardEmbeddingAccessPolicy_AccessPolicyType) {
|
|
30
|
+
AibiDashboardEmbeddingAccessPolicy_AccessPolicyType["ACCESS_POLICY_TYPE_UNSPECIFIED"] = "ACCESS_POLICY_TYPE_UNSPECIFIED";
|
|
31
|
+
AibiDashboardEmbeddingAccessPolicy_AccessPolicyType["ALLOW_ALL_DOMAINS"] = "ALLOW_ALL_DOMAINS";
|
|
32
|
+
AibiDashboardEmbeddingAccessPolicy_AccessPolicyType["ALLOW_APPROVED_DOMAINS"] = "ALLOW_APPROVED_DOMAINS";
|
|
33
|
+
AibiDashboardEmbeddingAccessPolicy_AccessPolicyType["DENY_ALL_DOMAINS"] = "DENY_ALL_DOMAINS";
|
|
34
|
+
})(AibiDashboardEmbeddingAccessPolicy_AccessPolicyType || (AibiDashboardEmbeddingAccessPolicy_AccessPolicyType = {}));
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
36
|
+
export var ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek;
|
|
37
|
+
(function (ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek) {
|
|
38
|
+
ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek["DAY_OF_WEEK_UNSPECIFIED"] = "DAY_OF_WEEK_UNSPECIFIED";
|
|
39
|
+
ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek["MONDAY"] = "MONDAY";
|
|
40
|
+
ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek["TUESDAY"] = "TUESDAY";
|
|
41
|
+
ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek["WEDNESDAY"] = "WEDNESDAY";
|
|
42
|
+
ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek["THURSDAY"] = "THURSDAY";
|
|
43
|
+
ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek["FRIDAY"] = "FRIDAY";
|
|
44
|
+
ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek["SATURDAY"] = "SATURDAY";
|
|
45
|
+
ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek["SUNDAY"] = "SUNDAY";
|
|
46
|
+
})(ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek || (ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek = {}));
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
48
|
+
export var ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency;
|
|
49
|
+
(function (ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency) {
|
|
50
|
+
ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency["WEEK_DAY_FREQUENCY_UNSPECIFIED"] = "WEEK_DAY_FREQUENCY_UNSPECIFIED";
|
|
51
|
+
ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency["FIRST_OF_MONTH"] = "FIRST_OF_MONTH";
|
|
52
|
+
ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency["SECOND_OF_MONTH"] = "SECOND_OF_MONTH";
|
|
53
|
+
ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency["THIRD_OF_MONTH"] = "THIRD_OF_MONTH";
|
|
54
|
+
ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency["FOURTH_OF_MONTH"] = "FOURTH_OF_MONTH";
|
|
55
|
+
ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency["FIRST_AND_THIRD_OF_MONTH"] = "FIRST_AND_THIRD_OF_MONTH";
|
|
56
|
+
ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency["SECOND_AND_FOURTH_OF_MONTH"] = "SECOND_AND_FOURTH_OF_MONTH";
|
|
57
|
+
ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency["EVERY_WEEK"] = "EVERY_WEEK";
|
|
58
|
+
})(ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency || (ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency = {}));
|
|
59
|
+
/**
|
|
60
|
+
* ON: Grants all users in all workspaces access to the Personal Compute default policy, allowing all users to create single-machine compute resources.
|
|
61
|
+
* DELEGATE: Moves access control for the Personal Compute default policy to individual workspaces and requires a workspace’s users or groups to be added to the ACLs of that workspace’s Personal Compute default policy before they will be able to create compute resources through that policy.
|
|
62
|
+
*/
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
64
|
+
export var PersonalComputeMessage_PersonalComputeMessageEnum;
|
|
65
|
+
(function (PersonalComputeMessage_PersonalComputeMessageEnum) {
|
|
66
|
+
PersonalComputeMessage_PersonalComputeMessageEnum["PERSONAL_COMPUTE_MESSAGE_ENUM_UNSPECIFIED"] = "PERSONAL_COMPUTE_MESSAGE_ENUM_UNSPECIFIED";
|
|
67
|
+
PersonalComputeMessage_PersonalComputeMessageEnum["ON"] = "ON";
|
|
68
|
+
PersonalComputeMessage_PersonalComputeMessageEnum["DELEGATE"] = "DELEGATE";
|
|
69
|
+
})(PersonalComputeMessage_PersonalComputeMessageEnum || (PersonalComputeMessage_PersonalComputeMessageEnum = {}));
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
|
|
71
|
+
export var RestrictWorkspaceAdminsMessage_Status;
|
|
72
|
+
(function (RestrictWorkspaceAdminsMessage_Status) {
|
|
73
|
+
/** Default value for proto enum */
|
|
74
|
+
RestrictWorkspaceAdminsMessage_Status["STATUS_UNSPECIFIED"] = "STATUS_UNSPECIFIED";
|
|
75
|
+
/**
|
|
76
|
+
* Default value for existing workspaces
|
|
77
|
+
* Allows WS admins to create OBO tokens for all SPs in the workspace without explicit permissions.
|
|
78
|
+
*/
|
|
79
|
+
RestrictWorkspaceAdminsMessage_Status["ALLOW_ALL"] = "ALLOW_ALL";
|
|
80
|
+
/**
|
|
81
|
+
* Default value for new workspaces
|
|
82
|
+
* Restrict WS admins to create OBO tokens for SPs in the workspace unless corresponding permissions are provided
|
|
83
|
+
*/
|
|
84
|
+
RestrictWorkspaceAdminsMessage_Status["RESTRICT_TOKENS_AND_JOB_RUN_AS"] = "RESTRICT_TOKENS_AND_JOB_RUN_AS";
|
|
85
|
+
})(RestrictWorkspaceAdminsMessage_Status || (RestrictWorkspaceAdminsMessage_Status = {}));
|
|
86
|
+
export const unmarshalAibiDashboardEmbeddingAccessPolicySchema = z
|
|
87
|
+
.object({
|
|
88
|
+
access_policy_type: z
|
|
89
|
+
.enum(AibiDashboardEmbeddingAccessPolicy_AccessPolicyType)
|
|
90
|
+
.optional(),
|
|
91
|
+
})
|
|
92
|
+
.transform(d => ({
|
|
93
|
+
accessPolicyType: d.access_policy_type,
|
|
94
|
+
}));
|
|
95
|
+
export const unmarshalAibiDashboardEmbeddingApprovedDomainsSchema = z
|
|
96
|
+
.object({
|
|
97
|
+
approved_domains: z.array(z.string()).optional(),
|
|
98
|
+
})
|
|
99
|
+
.transform(d => ({
|
|
100
|
+
approvedDomains: d.approved_domains,
|
|
101
|
+
}));
|
|
102
|
+
export const unmarshalAllowedAppsUserApiScopesMessageSchema = z
|
|
103
|
+
.object({
|
|
104
|
+
allowed_scopes: z.array(z.string()).optional(),
|
|
105
|
+
})
|
|
106
|
+
.transform(d => ({
|
|
107
|
+
allowedScopes: d.allowed_scopes,
|
|
108
|
+
}));
|
|
109
|
+
export const unmarshalBooleanMessageSchema = z
|
|
110
|
+
.object({
|
|
111
|
+
value: z.boolean().optional(),
|
|
112
|
+
})
|
|
113
|
+
.transform(d => ({
|
|
114
|
+
value: d.value,
|
|
115
|
+
}));
|
|
116
|
+
export const unmarshalClusterAutoRestartMessageSchema = z
|
|
117
|
+
.object({
|
|
118
|
+
enabled: z.boolean().optional(),
|
|
119
|
+
can_toggle: z.boolean().optional(),
|
|
120
|
+
maintenance_window: z
|
|
121
|
+
.lazy(() => unmarshalClusterAutoRestartMessage_MaintenanceWindowSchema)
|
|
122
|
+
.optional(),
|
|
123
|
+
enablement_details: z
|
|
124
|
+
.lazy(() => unmarshalClusterAutoRestartMessage_EnablementDetailsSchema)
|
|
125
|
+
.optional(),
|
|
126
|
+
restart_even_if_no_updates_available: z.boolean().optional(),
|
|
127
|
+
})
|
|
128
|
+
.transform(d => ({
|
|
129
|
+
enabled: d.enabled,
|
|
130
|
+
canToggle: d.can_toggle,
|
|
131
|
+
maintenanceWindow: d.maintenance_window,
|
|
132
|
+
enablementDetails: d.enablement_details,
|
|
133
|
+
restartEvenIfNoUpdatesAvailable: d.restart_even_if_no_updates_available,
|
|
134
|
+
}));
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
136
|
+
export const unmarshalClusterAutoRestartMessage_EnablementDetailsSchema = z
|
|
137
|
+
.object({
|
|
138
|
+
unavailable_for_non_enterprise_tier: z.boolean().optional(),
|
|
139
|
+
unavailable_for_disabled_entitlement: z.boolean().optional(),
|
|
140
|
+
forced_for_compliance_mode: z.boolean().optional(),
|
|
141
|
+
})
|
|
142
|
+
.transform(d => ({
|
|
143
|
+
unavailableForNonEnterpriseTier: d.unavailable_for_non_enterprise_tier,
|
|
144
|
+
unavailableForDisabledEntitlement: d.unavailable_for_disabled_entitlement,
|
|
145
|
+
forcedForComplianceMode: d.forced_for_compliance_mode,
|
|
146
|
+
}));
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
148
|
+
export const unmarshalClusterAutoRestartMessage_MaintenanceWindowSchema = z
|
|
149
|
+
.object({
|
|
150
|
+
week_day_based_schedule: z
|
|
151
|
+
.lazy(() => unmarshalClusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleSchema)
|
|
152
|
+
.optional(),
|
|
153
|
+
})
|
|
154
|
+
.transform(d => ({
|
|
155
|
+
weekDayBasedSchedule: d.week_day_based_schedule,
|
|
156
|
+
}));
|
|
157
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
158
|
+
export const unmarshalClusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleSchema = z
|
|
159
|
+
.object({
|
|
160
|
+
frequency: z
|
|
161
|
+
.enum(ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency)
|
|
162
|
+
.optional(),
|
|
163
|
+
day_of_week: z
|
|
164
|
+
.enum(ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek)
|
|
165
|
+
.optional(),
|
|
166
|
+
window_start_time: z
|
|
167
|
+
.lazy(() => unmarshalClusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeSchema)
|
|
168
|
+
.optional(),
|
|
169
|
+
})
|
|
170
|
+
.transform(d => ({
|
|
171
|
+
frequency: d.frequency,
|
|
172
|
+
dayOfWeek: d.day_of_week,
|
|
173
|
+
windowStartTime: d.window_start_time,
|
|
174
|
+
}));
|
|
175
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
176
|
+
export const unmarshalClusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeSchema = z
|
|
177
|
+
.object({
|
|
178
|
+
hours: z.number().optional(),
|
|
179
|
+
minutes: z.number().optional(),
|
|
180
|
+
})
|
|
181
|
+
.transform(d => ({
|
|
182
|
+
hours: d.hours,
|
|
183
|
+
minutes: d.minutes,
|
|
184
|
+
}));
|
|
185
|
+
export const unmarshalIntegerMessageSchema = z
|
|
186
|
+
.object({
|
|
187
|
+
value: z.number().optional(),
|
|
188
|
+
})
|
|
189
|
+
.transform(d => ({
|
|
190
|
+
value: d.value,
|
|
191
|
+
}));
|
|
192
|
+
export const unmarshalListAccountSettingsMetadataResponseSchema = z
|
|
193
|
+
.object({
|
|
194
|
+
settings_metadata: z
|
|
195
|
+
.array(z.lazy(() => unmarshalSettingsMetadataSchema))
|
|
196
|
+
.optional(),
|
|
197
|
+
next_page_token: z.string().optional(),
|
|
198
|
+
})
|
|
199
|
+
.transform(d => ({
|
|
200
|
+
settingsMetadata: d.settings_metadata,
|
|
201
|
+
nextPageToken: d.next_page_token,
|
|
202
|
+
}));
|
|
203
|
+
export const unmarshalListAccountUserPreferencesMetadataResponseSchema = z
|
|
204
|
+
.object({
|
|
205
|
+
settings_metadata: z
|
|
206
|
+
.array(z.lazy(() => unmarshalSettingsMetadataSchema))
|
|
207
|
+
.optional(),
|
|
208
|
+
next_page_token: z.string().optional(),
|
|
209
|
+
})
|
|
210
|
+
.transform(d => ({
|
|
211
|
+
settingsMetadata: d.settings_metadata,
|
|
212
|
+
nextPageToken: d.next_page_token,
|
|
213
|
+
}));
|
|
214
|
+
export const unmarshalListWorkspaceSettingsMetadataResponseSchema = z
|
|
215
|
+
.object({
|
|
216
|
+
settings_metadata: z
|
|
217
|
+
.array(z.lazy(() => unmarshalSettingsMetadataSchema))
|
|
218
|
+
.optional(),
|
|
219
|
+
next_page_token: z.string().optional(),
|
|
220
|
+
})
|
|
221
|
+
.transform(d => ({
|
|
222
|
+
settingsMetadata: d.settings_metadata,
|
|
223
|
+
nextPageToken: d.next_page_token,
|
|
224
|
+
}));
|
|
225
|
+
export const unmarshalOperationalEmailCustomRecipientMessageSchema = z
|
|
226
|
+
.object({
|
|
227
|
+
email: z.string().optional(),
|
|
228
|
+
})
|
|
229
|
+
.transform(d => ({
|
|
230
|
+
email: d.email,
|
|
231
|
+
}));
|
|
232
|
+
export const unmarshalPersonalComputeMessageSchema = z
|
|
233
|
+
.object({
|
|
234
|
+
value: z
|
|
235
|
+
.enum(PersonalComputeMessage_PersonalComputeMessageEnum)
|
|
236
|
+
.optional(),
|
|
237
|
+
})
|
|
238
|
+
.transform(d => ({
|
|
239
|
+
value: d.value,
|
|
240
|
+
}));
|
|
241
|
+
export const unmarshalRestrictWorkspaceAdminsMessageSchema = z
|
|
242
|
+
.object({
|
|
243
|
+
status: z.enum(RestrictWorkspaceAdminsMessage_Status).optional(),
|
|
244
|
+
disable_gov_tag_creation: z.boolean().optional(),
|
|
245
|
+
})
|
|
246
|
+
.transform(d => ({
|
|
247
|
+
status: d.status,
|
|
248
|
+
disableGovTagCreation: d.disable_gov_tag_creation,
|
|
249
|
+
}));
|
|
250
|
+
export const unmarshalSettingSchema = z
|
|
251
|
+
.object({
|
|
252
|
+
name: z.string().optional(),
|
|
253
|
+
boolean_val: z.lazy(() => unmarshalBooleanMessageSchema).optional(),
|
|
254
|
+
string_val: z.lazy(() => unmarshalStringMessageSchema).optional(),
|
|
255
|
+
integer_val: z.lazy(() => unmarshalIntegerMessageSchema).optional(),
|
|
256
|
+
automatic_cluster_update_workspace: z
|
|
257
|
+
.lazy(() => unmarshalClusterAutoRestartMessageSchema)
|
|
258
|
+
.optional(),
|
|
259
|
+
aibi_dashboard_embedding_approved_domains: z
|
|
260
|
+
.lazy(() => unmarshalAibiDashboardEmbeddingApprovedDomainsSchema)
|
|
261
|
+
.optional(),
|
|
262
|
+
aibi_dashboard_embedding_access_policy: z
|
|
263
|
+
.lazy(() => unmarshalAibiDashboardEmbeddingAccessPolicySchema)
|
|
264
|
+
.optional(),
|
|
265
|
+
restrict_workspace_admins: z
|
|
266
|
+
.lazy(() => unmarshalRestrictWorkspaceAdminsMessageSchema)
|
|
267
|
+
.optional(),
|
|
268
|
+
personal_compute: z
|
|
269
|
+
.lazy(() => unmarshalPersonalComputeMessageSchema)
|
|
270
|
+
.optional(),
|
|
271
|
+
allowed_apps_user_api_scopes: z
|
|
272
|
+
.lazy(() => unmarshalAllowedAppsUserApiScopesMessageSchema)
|
|
273
|
+
.optional(),
|
|
274
|
+
operational_email_custom_recipient: z
|
|
275
|
+
.lazy(() => unmarshalOperationalEmailCustomRecipientMessageSchema)
|
|
276
|
+
.optional(),
|
|
277
|
+
effective_boolean_val: z
|
|
278
|
+
.lazy(() => unmarshalBooleanMessageSchema)
|
|
279
|
+
.optional(),
|
|
280
|
+
effective_string_val: z.lazy(() => unmarshalStringMessageSchema).optional(),
|
|
281
|
+
effective_integer_val: z
|
|
282
|
+
.lazy(() => unmarshalIntegerMessageSchema)
|
|
283
|
+
.optional(),
|
|
284
|
+
effective_automatic_cluster_update_workspace: z
|
|
285
|
+
.lazy(() => unmarshalClusterAutoRestartMessageSchema)
|
|
286
|
+
.optional(),
|
|
287
|
+
effective_aibi_dashboard_embedding_approved_domains: z
|
|
288
|
+
.lazy(() => unmarshalAibiDashboardEmbeddingApprovedDomainsSchema)
|
|
289
|
+
.optional(),
|
|
290
|
+
effective_aibi_dashboard_embedding_access_policy: z
|
|
291
|
+
.lazy(() => unmarshalAibiDashboardEmbeddingAccessPolicySchema)
|
|
292
|
+
.optional(),
|
|
293
|
+
effective_restrict_workspace_admins: z
|
|
294
|
+
.lazy(() => unmarshalRestrictWorkspaceAdminsMessageSchema)
|
|
295
|
+
.optional(),
|
|
296
|
+
effective_personal_compute: z
|
|
297
|
+
.lazy(() => unmarshalPersonalComputeMessageSchema)
|
|
298
|
+
.optional(),
|
|
299
|
+
effective_allowed_apps_user_api_scopes: z
|
|
300
|
+
.lazy(() => unmarshalAllowedAppsUserApiScopesMessageSchema)
|
|
301
|
+
.optional(),
|
|
302
|
+
effective_operational_email_custom_recipient: z
|
|
303
|
+
.lazy(() => unmarshalOperationalEmailCustomRecipientMessageSchema)
|
|
304
|
+
.optional(),
|
|
305
|
+
})
|
|
306
|
+
.transform(d => ({
|
|
307
|
+
name: d.name,
|
|
308
|
+
value: d.boolean_val !== undefined
|
|
309
|
+
? { $case: 'booleanVal', booleanVal: d.boolean_val }
|
|
310
|
+
: d.string_val !== undefined
|
|
311
|
+
? { $case: 'stringVal', stringVal: d.string_val }
|
|
312
|
+
: d.integer_val !== undefined
|
|
313
|
+
? { $case: 'integerVal', integerVal: d.integer_val }
|
|
314
|
+
: d.automatic_cluster_update_workspace !== undefined
|
|
315
|
+
? {
|
|
316
|
+
$case: 'automaticClusterUpdateWorkspace',
|
|
317
|
+
automaticClusterUpdateWorkspace: d.automatic_cluster_update_workspace,
|
|
318
|
+
}
|
|
319
|
+
: d.aibi_dashboard_embedding_approved_domains !== undefined
|
|
320
|
+
? {
|
|
321
|
+
$case: 'aibiDashboardEmbeddingApprovedDomains',
|
|
322
|
+
aibiDashboardEmbeddingApprovedDomains: d.aibi_dashboard_embedding_approved_domains,
|
|
323
|
+
}
|
|
324
|
+
: d.aibi_dashboard_embedding_access_policy !== undefined
|
|
325
|
+
? {
|
|
326
|
+
$case: 'aibiDashboardEmbeddingAccessPolicy',
|
|
327
|
+
aibiDashboardEmbeddingAccessPolicy: d.aibi_dashboard_embedding_access_policy,
|
|
328
|
+
}
|
|
329
|
+
: d.restrict_workspace_admins !== undefined
|
|
330
|
+
? {
|
|
331
|
+
$case: 'restrictWorkspaceAdmins',
|
|
332
|
+
restrictWorkspaceAdmins: d.restrict_workspace_admins,
|
|
333
|
+
}
|
|
334
|
+
: d.personal_compute !== undefined
|
|
335
|
+
? {
|
|
336
|
+
$case: 'personalCompute',
|
|
337
|
+
personalCompute: d.personal_compute,
|
|
338
|
+
}
|
|
339
|
+
: d.allowed_apps_user_api_scopes !== undefined
|
|
340
|
+
? {
|
|
341
|
+
$case: 'allowedAppsUserApiScopes',
|
|
342
|
+
allowedAppsUserApiScopes: d.allowed_apps_user_api_scopes,
|
|
343
|
+
}
|
|
344
|
+
: d.operational_email_custom_recipient !== undefined
|
|
345
|
+
? {
|
|
346
|
+
$case: 'operationalEmailCustomRecipient',
|
|
347
|
+
operationalEmailCustomRecipient: d.operational_email_custom_recipient,
|
|
348
|
+
}
|
|
349
|
+
: undefined,
|
|
350
|
+
effectiveValue: d.effective_boolean_val !== undefined
|
|
351
|
+
? {
|
|
352
|
+
$case: 'effectiveBooleanVal',
|
|
353
|
+
effectiveBooleanVal: d.effective_boolean_val,
|
|
354
|
+
}
|
|
355
|
+
: d.effective_string_val !== undefined
|
|
356
|
+
? {
|
|
357
|
+
$case: 'effectiveStringVal',
|
|
358
|
+
effectiveStringVal: d.effective_string_val,
|
|
359
|
+
}
|
|
360
|
+
: d.effective_integer_val !== undefined
|
|
361
|
+
? {
|
|
362
|
+
$case: 'effectiveIntegerVal',
|
|
363
|
+
effectiveIntegerVal: d.effective_integer_val,
|
|
364
|
+
}
|
|
365
|
+
: d.effective_automatic_cluster_update_workspace !== undefined
|
|
366
|
+
? {
|
|
367
|
+
$case: 'effectiveAutomaticClusterUpdateWorkspace',
|
|
368
|
+
effectiveAutomaticClusterUpdateWorkspace: d.effective_automatic_cluster_update_workspace,
|
|
369
|
+
}
|
|
370
|
+
: d.effective_aibi_dashboard_embedding_approved_domains !==
|
|
371
|
+
undefined
|
|
372
|
+
? {
|
|
373
|
+
$case: 'effectiveAibiDashboardEmbeddingApprovedDomains',
|
|
374
|
+
effectiveAibiDashboardEmbeddingApprovedDomains: d.effective_aibi_dashboard_embedding_approved_domains,
|
|
375
|
+
}
|
|
376
|
+
: d.effective_aibi_dashboard_embedding_access_policy !==
|
|
377
|
+
undefined
|
|
378
|
+
? {
|
|
379
|
+
$case: 'effectiveAibiDashboardEmbeddingAccessPolicy',
|
|
380
|
+
effectiveAibiDashboardEmbeddingAccessPolicy: d.effective_aibi_dashboard_embedding_access_policy,
|
|
381
|
+
}
|
|
382
|
+
: d.effective_restrict_workspace_admins !== undefined
|
|
383
|
+
? {
|
|
384
|
+
$case: 'effectiveRestrictWorkspaceAdmins',
|
|
385
|
+
effectiveRestrictWorkspaceAdmins: d.effective_restrict_workspace_admins,
|
|
386
|
+
}
|
|
387
|
+
: d.effective_personal_compute !== undefined
|
|
388
|
+
? {
|
|
389
|
+
$case: 'effectivePersonalCompute',
|
|
390
|
+
effectivePersonalCompute: d.effective_personal_compute,
|
|
391
|
+
}
|
|
392
|
+
: d.effective_allowed_apps_user_api_scopes !== undefined
|
|
393
|
+
? {
|
|
394
|
+
$case: 'effectiveAllowedAppsUserApiScopes',
|
|
395
|
+
effectiveAllowedAppsUserApiScopes: d.effective_allowed_apps_user_api_scopes,
|
|
396
|
+
}
|
|
397
|
+
: d.effective_operational_email_custom_recipient !==
|
|
398
|
+
undefined
|
|
399
|
+
? {
|
|
400
|
+
$case: 'effectiveOperationalEmailCustomRecipient',
|
|
401
|
+
effectiveOperationalEmailCustomRecipient: d.effective_operational_email_custom_recipient,
|
|
402
|
+
}
|
|
403
|
+
: undefined,
|
|
404
|
+
}));
|
|
405
|
+
export const unmarshalSettingsMetadataSchema = z
|
|
406
|
+
.object({
|
|
407
|
+
name: z.string().optional(),
|
|
408
|
+
description: z.string().optional(),
|
|
409
|
+
type: z.string().optional(),
|
|
410
|
+
docs_link: z.string().optional(),
|
|
411
|
+
preview_phase: z.enum(PreviewPhase).optional(),
|
|
412
|
+
display_name: z.string().optional(),
|
|
413
|
+
})
|
|
414
|
+
.transform(d => ({
|
|
415
|
+
name: d.name,
|
|
416
|
+
description: d.description,
|
|
417
|
+
type: d.type,
|
|
418
|
+
docsLink: d.docs_link,
|
|
419
|
+
previewPhase: d.preview_phase,
|
|
420
|
+
displayName: d.display_name,
|
|
421
|
+
}));
|
|
422
|
+
export const unmarshalStringMessageSchema = z
|
|
423
|
+
.object({
|
|
424
|
+
value: z.string().optional(),
|
|
425
|
+
})
|
|
426
|
+
.transform(d => ({
|
|
427
|
+
value: d.value,
|
|
428
|
+
}));
|
|
429
|
+
export const unmarshalUserPreferenceSchema = z
|
|
430
|
+
.object({
|
|
431
|
+
name: z.string().optional(),
|
|
432
|
+
user_id: z.string().optional(),
|
|
433
|
+
boolean_val: z.lazy(() => unmarshalBooleanMessageSchema).optional(),
|
|
434
|
+
string_val: z.lazy(() => unmarshalStringMessageSchema).optional(),
|
|
435
|
+
effective_boolean_val: z
|
|
436
|
+
.lazy(() => unmarshalBooleanMessageSchema)
|
|
437
|
+
.optional(),
|
|
438
|
+
effective_string_val: z.lazy(() => unmarshalStringMessageSchema).optional(),
|
|
439
|
+
})
|
|
440
|
+
.transform(d => ({
|
|
441
|
+
name: d.name,
|
|
442
|
+
userId: d.user_id,
|
|
443
|
+
value: d.boolean_val !== undefined
|
|
444
|
+
? { $case: 'booleanVal', booleanVal: d.boolean_val }
|
|
445
|
+
: d.string_val !== undefined
|
|
446
|
+
? { $case: 'stringVal', stringVal: d.string_val }
|
|
447
|
+
: undefined,
|
|
448
|
+
effectiveValue: d.effective_boolean_val !== undefined
|
|
449
|
+
? {
|
|
450
|
+
$case: 'effectiveBooleanVal',
|
|
451
|
+
effectiveBooleanVal: d.effective_boolean_val,
|
|
452
|
+
}
|
|
453
|
+
: d.effective_string_val !== undefined
|
|
454
|
+
? {
|
|
455
|
+
$case: 'effectiveStringVal',
|
|
456
|
+
effectiveStringVal: d.effective_string_val,
|
|
457
|
+
}
|
|
458
|
+
: undefined,
|
|
459
|
+
}));
|
|
460
|
+
export const marshalAibiDashboardEmbeddingAccessPolicySchema = z
|
|
461
|
+
.object({
|
|
462
|
+
accessPolicyType: z
|
|
463
|
+
.enum(AibiDashboardEmbeddingAccessPolicy_AccessPolicyType)
|
|
464
|
+
.optional(),
|
|
465
|
+
})
|
|
466
|
+
.transform(d => ({
|
|
467
|
+
access_policy_type: d.accessPolicyType,
|
|
468
|
+
}));
|
|
469
|
+
export const marshalAibiDashboardEmbeddingApprovedDomainsSchema = z
|
|
470
|
+
.object({
|
|
471
|
+
approvedDomains: z.array(z.string()).optional(),
|
|
472
|
+
})
|
|
473
|
+
.transform(d => ({
|
|
474
|
+
approved_domains: d.approvedDomains,
|
|
475
|
+
}));
|
|
476
|
+
export const marshalAllowedAppsUserApiScopesMessageSchema = z
|
|
477
|
+
.object({
|
|
478
|
+
allowedScopes: z.array(z.string()).optional(),
|
|
479
|
+
})
|
|
480
|
+
.transform(d => ({
|
|
481
|
+
allowed_scopes: d.allowedScopes,
|
|
482
|
+
}));
|
|
483
|
+
export const marshalBooleanMessageSchema = z
|
|
484
|
+
.object({
|
|
485
|
+
value: z.boolean().optional(),
|
|
486
|
+
})
|
|
487
|
+
.transform(d => ({
|
|
488
|
+
value: d.value,
|
|
489
|
+
}));
|
|
490
|
+
export const marshalClusterAutoRestartMessageSchema = z
|
|
491
|
+
.object({
|
|
492
|
+
enabled: z.boolean().optional(),
|
|
493
|
+
canToggle: z.boolean().optional(),
|
|
494
|
+
maintenanceWindow: z
|
|
495
|
+
.lazy(() => marshalClusterAutoRestartMessage_MaintenanceWindowSchema)
|
|
496
|
+
.optional(),
|
|
497
|
+
enablementDetails: z
|
|
498
|
+
.lazy(() => marshalClusterAutoRestartMessage_EnablementDetailsSchema)
|
|
499
|
+
.optional(),
|
|
500
|
+
restartEvenIfNoUpdatesAvailable: z.boolean().optional(),
|
|
501
|
+
})
|
|
502
|
+
.transform(d => ({
|
|
503
|
+
enabled: d.enabled,
|
|
504
|
+
can_toggle: d.canToggle,
|
|
505
|
+
maintenance_window: d.maintenanceWindow,
|
|
506
|
+
enablement_details: d.enablementDetails,
|
|
507
|
+
restart_even_if_no_updates_available: d.restartEvenIfNoUpdatesAvailable,
|
|
508
|
+
}));
|
|
509
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
510
|
+
export const marshalClusterAutoRestartMessage_EnablementDetailsSchema = z
|
|
511
|
+
.object({
|
|
512
|
+
unavailableForNonEnterpriseTier: z.boolean().optional(),
|
|
513
|
+
unavailableForDisabledEntitlement: z.boolean().optional(),
|
|
514
|
+
forcedForComplianceMode: z.boolean().optional(),
|
|
515
|
+
})
|
|
516
|
+
.transform(d => ({
|
|
517
|
+
unavailable_for_non_enterprise_tier: d.unavailableForNonEnterpriseTier,
|
|
518
|
+
unavailable_for_disabled_entitlement: d.unavailableForDisabledEntitlement,
|
|
519
|
+
forced_for_compliance_mode: d.forcedForComplianceMode,
|
|
520
|
+
}));
|
|
521
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
522
|
+
export const marshalClusterAutoRestartMessage_MaintenanceWindowSchema = z
|
|
523
|
+
.object({
|
|
524
|
+
weekDayBasedSchedule: z
|
|
525
|
+
.lazy(() => marshalClusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleSchema)
|
|
526
|
+
.optional(),
|
|
527
|
+
})
|
|
528
|
+
.transform(d => ({
|
|
529
|
+
week_day_based_schedule: d.weekDayBasedSchedule,
|
|
530
|
+
}));
|
|
531
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
532
|
+
export const marshalClusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleSchema = z
|
|
533
|
+
.object({
|
|
534
|
+
frequency: z
|
|
535
|
+
.enum(ClusterAutoRestartMessage_MaintenanceWindow_WeekDayFrequency)
|
|
536
|
+
.optional(),
|
|
537
|
+
dayOfWeek: z
|
|
538
|
+
.enum(ClusterAutoRestartMessage_MaintenanceWindow_DayOfWeek)
|
|
539
|
+
.optional(),
|
|
540
|
+
windowStartTime: z
|
|
541
|
+
.lazy(() => marshalClusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeSchema)
|
|
542
|
+
.optional(),
|
|
543
|
+
})
|
|
544
|
+
.transform(d => ({
|
|
545
|
+
frequency: d.frequency,
|
|
546
|
+
day_of_week: d.dayOfWeek,
|
|
547
|
+
window_start_time: d.windowStartTime,
|
|
548
|
+
}));
|
|
549
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
550
|
+
export const marshalClusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeSchema = z
|
|
551
|
+
.object({
|
|
552
|
+
hours: z.number().optional(),
|
|
553
|
+
minutes: z.number().optional(),
|
|
554
|
+
})
|
|
555
|
+
.transform(d => ({
|
|
556
|
+
hours: d.hours,
|
|
557
|
+
minutes: d.minutes,
|
|
558
|
+
}));
|
|
559
|
+
export const marshalIntegerMessageSchema = z
|
|
560
|
+
.object({
|
|
561
|
+
value: z.number().optional(),
|
|
562
|
+
})
|
|
563
|
+
.transform(d => ({
|
|
564
|
+
value: d.value,
|
|
565
|
+
}));
|
|
566
|
+
export const marshalOperationalEmailCustomRecipientMessageSchema = z
|
|
567
|
+
.object({
|
|
568
|
+
email: z.string().optional(),
|
|
569
|
+
})
|
|
570
|
+
.transform(d => ({
|
|
571
|
+
email: d.email,
|
|
572
|
+
}));
|
|
573
|
+
export const marshalPersonalComputeMessageSchema = z
|
|
574
|
+
.object({
|
|
575
|
+
value: z.enum(PersonalComputeMessage_PersonalComputeMessageEnum).optional(),
|
|
576
|
+
})
|
|
577
|
+
.transform(d => ({
|
|
578
|
+
value: d.value,
|
|
579
|
+
}));
|
|
580
|
+
export const marshalRestrictWorkspaceAdminsMessageSchema = z
|
|
581
|
+
.object({
|
|
582
|
+
status: z.enum(RestrictWorkspaceAdminsMessage_Status).optional(),
|
|
583
|
+
disableGovTagCreation: z.boolean().optional(),
|
|
584
|
+
})
|
|
585
|
+
.transform(d => ({
|
|
586
|
+
status: d.status,
|
|
587
|
+
disable_gov_tag_creation: d.disableGovTagCreation,
|
|
588
|
+
}));
|
|
589
|
+
export const marshalSettingSchema = z
|
|
590
|
+
.object({
|
|
591
|
+
name: z.string().optional(),
|
|
592
|
+
value: z
|
|
593
|
+
.discriminatedUnion('$case', [
|
|
594
|
+
z.object({
|
|
595
|
+
$case: z.literal('booleanVal'),
|
|
596
|
+
booleanVal: z.lazy(() => marshalBooleanMessageSchema),
|
|
597
|
+
}),
|
|
598
|
+
z.object({
|
|
599
|
+
$case: z.literal('stringVal'),
|
|
600
|
+
stringVal: z.lazy(() => marshalStringMessageSchema),
|
|
601
|
+
}),
|
|
602
|
+
z.object({
|
|
603
|
+
$case: z.literal('integerVal'),
|
|
604
|
+
integerVal: z.lazy(() => marshalIntegerMessageSchema),
|
|
605
|
+
}),
|
|
606
|
+
z.object({
|
|
607
|
+
$case: z.literal('automaticClusterUpdateWorkspace'),
|
|
608
|
+
automaticClusterUpdateWorkspace: z.lazy(() => marshalClusterAutoRestartMessageSchema),
|
|
609
|
+
}),
|
|
610
|
+
z.object({
|
|
611
|
+
$case: z.literal('aibiDashboardEmbeddingApprovedDomains'),
|
|
612
|
+
aibiDashboardEmbeddingApprovedDomains: z.lazy(() => marshalAibiDashboardEmbeddingApprovedDomainsSchema),
|
|
613
|
+
}),
|
|
614
|
+
z.object({
|
|
615
|
+
$case: z.literal('aibiDashboardEmbeddingAccessPolicy'),
|
|
616
|
+
aibiDashboardEmbeddingAccessPolicy: z.lazy(() => marshalAibiDashboardEmbeddingAccessPolicySchema),
|
|
617
|
+
}),
|
|
618
|
+
z.object({
|
|
619
|
+
$case: z.literal('restrictWorkspaceAdmins'),
|
|
620
|
+
restrictWorkspaceAdmins: z.lazy(() => marshalRestrictWorkspaceAdminsMessageSchema),
|
|
621
|
+
}),
|
|
622
|
+
z.object({
|
|
623
|
+
$case: z.literal('personalCompute'),
|
|
624
|
+
personalCompute: z.lazy(() => marshalPersonalComputeMessageSchema),
|
|
625
|
+
}),
|
|
626
|
+
z.object({
|
|
627
|
+
$case: z.literal('allowedAppsUserApiScopes'),
|
|
628
|
+
allowedAppsUserApiScopes: z.lazy(() => marshalAllowedAppsUserApiScopesMessageSchema),
|
|
629
|
+
}),
|
|
630
|
+
z.object({
|
|
631
|
+
$case: z.literal('operationalEmailCustomRecipient'),
|
|
632
|
+
operationalEmailCustomRecipient: z.lazy(() => marshalOperationalEmailCustomRecipientMessageSchema),
|
|
633
|
+
}),
|
|
634
|
+
])
|
|
635
|
+
.optional(),
|
|
636
|
+
effectiveValue: z
|
|
637
|
+
.discriminatedUnion('$case', [
|
|
638
|
+
z.object({
|
|
639
|
+
$case: z.literal('effectiveBooleanVal'),
|
|
640
|
+
effectiveBooleanVal: z.lazy(() => marshalBooleanMessageSchema),
|
|
641
|
+
}),
|
|
642
|
+
z.object({
|
|
643
|
+
$case: z.literal('effectiveStringVal'),
|
|
644
|
+
effectiveStringVal: z.lazy(() => marshalStringMessageSchema),
|
|
645
|
+
}),
|
|
646
|
+
z.object({
|
|
647
|
+
$case: z.literal('effectiveIntegerVal'),
|
|
648
|
+
effectiveIntegerVal: z.lazy(() => marshalIntegerMessageSchema),
|
|
649
|
+
}),
|
|
650
|
+
z.object({
|
|
651
|
+
$case: z.literal('effectiveAutomaticClusterUpdateWorkspace'),
|
|
652
|
+
effectiveAutomaticClusterUpdateWorkspace: z.lazy(() => marshalClusterAutoRestartMessageSchema),
|
|
653
|
+
}),
|
|
654
|
+
z.object({
|
|
655
|
+
$case: z.literal('effectiveAibiDashboardEmbeddingApprovedDomains'),
|
|
656
|
+
effectiveAibiDashboardEmbeddingApprovedDomains: z.lazy(() => marshalAibiDashboardEmbeddingApprovedDomainsSchema),
|
|
657
|
+
}),
|
|
658
|
+
z.object({
|
|
659
|
+
$case: z.literal('effectiveAibiDashboardEmbeddingAccessPolicy'),
|
|
660
|
+
effectiveAibiDashboardEmbeddingAccessPolicy: z.lazy(() => marshalAibiDashboardEmbeddingAccessPolicySchema),
|
|
661
|
+
}),
|
|
662
|
+
z.object({
|
|
663
|
+
$case: z.literal('effectiveRestrictWorkspaceAdmins'),
|
|
664
|
+
effectiveRestrictWorkspaceAdmins: z.lazy(() => marshalRestrictWorkspaceAdminsMessageSchema),
|
|
665
|
+
}),
|
|
666
|
+
z.object({
|
|
667
|
+
$case: z.literal('effectivePersonalCompute'),
|
|
668
|
+
effectivePersonalCompute: z.lazy(() => marshalPersonalComputeMessageSchema),
|
|
669
|
+
}),
|
|
670
|
+
z.object({
|
|
671
|
+
$case: z.literal('effectiveAllowedAppsUserApiScopes'),
|
|
672
|
+
effectiveAllowedAppsUserApiScopes: z.lazy(() => marshalAllowedAppsUserApiScopesMessageSchema),
|
|
673
|
+
}),
|
|
674
|
+
z.object({
|
|
675
|
+
$case: z.literal('effectiveOperationalEmailCustomRecipient'),
|
|
676
|
+
effectiveOperationalEmailCustomRecipient: z.lazy(() => marshalOperationalEmailCustomRecipientMessageSchema),
|
|
677
|
+
}),
|
|
678
|
+
])
|
|
679
|
+
.optional(),
|
|
680
|
+
})
|
|
681
|
+
.transform(d => ({
|
|
682
|
+
name: d.name,
|
|
683
|
+
...(d.value?.$case === 'booleanVal' && { boolean_val: d.value.booleanVal }),
|
|
684
|
+
...(d.value?.$case === 'stringVal' && { string_val: d.value.stringVal }),
|
|
685
|
+
...(d.value?.$case === 'integerVal' && { integer_val: d.value.integerVal }),
|
|
686
|
+
...(d.value?.$case === 'automaticClusterUpdateWorkspace' && {
|
|
687
|
+
automatic_cluster_update_workspace: d.value.automaticClusterUpdateWorkspace,
|
|
688
|
+
}),
|
|
689
|
+
...(d.value?.$case === 'aibiDashboardEmbeddingApprovedDomains' && {
|
|
690
|
+
aibi_dashboard_embedding_approved_domains: d.value.aibiDashboardEmbeddingApprovedDomains,
|
|
691
|
+
}),
|
|
692
|
+
...(d.value?.$case === 'aibiDashboardEmbeddingAccessPolicy' && {
|
|
693
|
+
aibi_dashboard_embedding_access_policy: d.value.aibiDashboardEmbeddingAccessPolicy,
|
|
694
|
+
}),
|
|
695
|
+
...(d.value?.$case === 'restrictWorkspaceAdmins' && {
|
|
696
|
+
restrict_workspace_admins: d.value.restrictWorkspaceAdmins,
|
|
697
|
+
}),
|
|
698
|
+
...(d.value?.$case === 'personalCompute' && {
|
|
699
|
+
personal_compute: d.value.personalCompute,
|
|
700
|
+
}),
|
|
701
|
+
...(d.value?.$case === 'allowedAppsUserApiScopes' && {
|
|
702
|
+
allowed_apps_user_api_scopes: d.value.allowedAppsUserApiScopes,
|
|
703
|
+
}),
|
|
704
|
+
...(d.value?.$case === 'operationalEmailCustomRecipient' && {
|
|
705
|
+
operational_email_custom_recipient: d.value.operationalEmailCustomRecipient,
|
|
706
|
+
}),
|
|
707
|
+
...(d.effectiveValue?.$case === 'effectiveBooleanVal' && {
|
|
708
|
+
effective_boolean_val: d.effectiveValue.effectiveBooleanVal,
|
|
709
|
+
}),
|
|
710
|
+
...(d.effectiveValue?.$case === 'effectiveStringVal' && {
|
|
711
|
+
effective_string_val: d.effectiveValue.effectiveStringVal,
|
|
712
|
+
}),
|
|
713
|
+
...(d.effectiveValue?.$case === 'effectiveIntegerVal' && {
|
|
714
|
+
effective_integer_val: d.effectiveValue.effectiveIntegerVal,
|
|
715
|
+
}),
|
|
716
|
+
...(d.effectiveValue?.$case ===
|
|
717
|
+
'effectiveAutomaticClusterUpdateWorkspace' && {
|
|
718
|
+
effective_automatic_cluster_update_workspace: d.effectiveValue.effectiveAutomaticClusterUpdateWorkspace,
|
|
719
|
+
}),
|
|
720
|
+
...(d.effectiveValue?.$case ===
|
|
721
|
+
'effectiveAibiDashboardEmbeddingApprovedDomains' && {
|
|
722
|
+
effective_aibi_dashboard_embedding_approved_domains: d.effectiveValue.effectiveAibiDashboardEmbeddingApprovedDomains,
|
|
723
|
+
}),
|
|
724
|
+
...(d.effectiveValue?.$case ===
|
|
725
|
+
'effectiveAibiDashboardEmbeddingAccessPolicy' && {
|
|
726
|
+
effective_aibi_dashboard_embedding_access_policy: d.effectiveValue.effectiveAibiDashboardEmbeddingAccessPolicy,
|
|
727
|
+
}),
|
|
728
|
+
...(d.effectiveValue?.$case === 'effectiveRestrictWorkspaceAdmins' && {
|
|
729
|
+
effective_restrict_workspace_admins: d.effectiveValue.effectiveRestrictWorkspaceAdmins,
|
|
730
|
+
}),
|
|
731
|
+
...(d.effectiveValue?.$case === 'effectivePersonalCompute' && {
|
|
732
|
+
effective_personal_compute: d.effectiveValue.effectivePersonalCompute,
|
|
733
|
+
}),
|
|
734
|
+
...(d.effectiveValue?.$case === 'effectiveAllowedAppsUserApiScopes' && {
|
|
735
|
+
effective_allowed_apps_user_api_scopes: d.effectiveValue.effectiveAllowedAppsUserApiScopes,
|
|
736
|
+
}),
|
|
737
|
+
...(d.effectiveValue?.$case ===
|
|
738
|
+
'effectiveOperationalEmailCustomRecipient' && {
|
|
739
|
+
effective_operational_email_custom_recipient: d.effectiveValue.effectiveOperationalEmailCustomRecipient,
|
|
740
|
+
}),
|
|
741
|
+
}));
|
|
742
|
+
export const marshalStringMessageSchema = z
|
|
743
|
+
.object({
|
|
744
|
+
value: z.string().optional(),
|
|
745
|
+
})
|
|
746
|
+
.transform(d => ({
|
|
747
|
+
value: d.value,
|
|
748
|
+
}));
|
|
749
|
+
export const marshalUserPreferenceSchema = z
|
|
750
|
+
.object({
|
|
751
|
+
name: z.string().optional(),
|
|
752
|
+
userId: z.string().optional(),
|
|
753
|
+
value: z
|
|
754
|
+
.discriminatedUnion('$case', [
|
|
755
|
+
z.object({
|
|
756
|
+
$case: z.literal('booleanVal'),
|
|
757
|
+
booleanVal: z.lazy(() => marshalBooleanMessageSchema),
|
|
758
|
+
}),
|
|
759
|
+
z.object({
|
|
760
|
+
$case: z.literal('stringVal'),
|
|
761
|
+
stringVal: z.lazy(() => marshalStringMessageSchema),
|
|
762
|
+
}),
|
|
763
|
+
])
|
|
764
|
+
.optional(),
|
|
765
|
+
effectiveValue: z
|
|
766
|
+
.discriminatedUnion('$case', [
|
|
767
|
+
z.object({
|
|
768
|
+
$case: z.literal('effectiveBooleanVal'),
|
|
769
|
+
effectiveBooleanVal: z.lazy(() => marshalBooleanMessageSchema),
|
|
770
|
+
}),
|
|
771
|
+
z.object({
|
|
772
|
+
$case: z.literal('effectiveStringVal'),
|
|
773
|
+
effectiveStringVal: z.lazy(() => marshalStringMessageSchema),
|
|
774
|
+
}),
|
|
775
|
+
])
|
|
776
|
+
.optional(),
|
|
777
|
+
})
|
|
778
|
+
.transform(d => ({
|
|
779
|
+
name: d.name,
|
|
780
|
+
user_id: d.userId,
|
|
781
|
+
...(d.value?.$case === 'booleanVal' && { boolean_val: d.value.booleanVal }),
|
|
782
|
+
...(d.value?.$case === 'stringVal' && { string_val: d.value.stringVal }),
|
|
783
|
+
...(d.effectiveValue?.$case === 'effectiveBooleanVal' && {
|
|
784
|
+
effective_boolean_val: d.effectiveValue.effectiveBooleanVal,
|
|
785
|
+
}),
|
|
786
|
+
...(d.effectiveValue?.$case === 'effectiveStringVal' && {
|
|
787
|
+
effective_string_val: d.effectiveValue.effectiveStringVal,
|
|
788
|
+
}),
|
|
789
|
+
}));
|
|
790
|
+
//# sourceMappingURL=model.js.map
|