From 9662ed8687549fc04fb0dd2588bb8d3c5e59853b Mon Sep 17 00:00:00 2001 From: Parth Bansal Date: Wed, 22 Apr 2026 12:41:53 +0000 Subject: [PATCH 1/4] update --- packages/core/src/wkt/fieldmask.ts | 137 ++++++++-------- packages/core/src/wkt/index.ts | 2 +- packages/core/tests/wkt/fieldmask.test.ts | 187 ++++++++++------------ 3 files changed, 158 insertions(+), 168 deletions(-) diff --git a/packages/core/src/wkt/fieldmask.ts b/packages/core/src/wkt/fieldmask.ts index 9e00d450..da272ae4 100644 --- a/packages/core/src/wkt/fieldmask.ts +++ b/packages/core/src/wkt/fieldmask.ts @@ -1,49 +1,7 @@ -// True if any property of T is callable, indicating a class instance (e.g. -// Temporal.Instant, Date) rather than a plain data interface. -type HasMethods = true extends { - [K in keyof T]-?: NonNullable extends (...args: never[]) => unknown - ? true - : never; -}[keyof T] - ? true - : false; - -/** - * Utility type that derives all valid dot-separated field paths from a - * TypeScript interface. Provides compile-time path validation for - * {@link FieldMask}. - * - * Recursion stops at arrays, index signatures (Record/Map), and class - * instances with methods (e.g. Temporal.Instant, Date). These are treated - * as leaf nodes. - * - * @example - * ```ts - * interface Cluster { - * name: string; - * config: {numWorkers: number; scaling: {min: number}}; - * } - * // "name" | "config" | "config.numWorkers" | "config.scaling" | "config.scaling.min" - * type ClusterPaths = FieldPaths; - * ``` - */ -export type FieldPaths = { - [K in keyof T & string]: NonNullable extends unknown[] - ? `${Prefix}${K}` // Array field — leaf, do not recurse. - : NonNullable extends Record - ? string extends keyof NonNullable - ? `${Prefix}${K}` // Index signature (Record/Map) — leaf, do not recurse. - : HasMethods> extends true - ? `${Prefix}${K}` // Class instance with methods — leaf, do not recurse. - : `${Prefix}${K}` | FieldPaths, `${Prefix}${K}.`> - : `${Prefix}${K}`; -}[keyof T & string]; - -// Remove duplicates and paths subsumed by a parent (e.g. "config" subsumes -// "config.numWorkers"). -function normalize

(paths: P[]): P[] { +// Remove duplicates and paths subsumed by a parent (e.g. "config" subsumes "config.numWorkers"). +function normalize(paths: string[]): string[] { const unique = [...new Set(paths)].sort(); - const result: P[] = []; + const result: string[] = []; for (const path of unique) { const isSubsumed = result.some(existing => path.startsWith(existing + '.')); if (!isSubsumed) { @@ -54,33 +12,78 @@ function normalize

(paths: P[]): P[] { } /** - * A type-safe field mask implementing google.protobuf.FieldMask semantics. - * Provides compile-time path validation via {@link FieldPaths}. Paths are - * always normalized: duplicates and paths subsumed by a parent are removed. - * - * @example - * ```ts - * const mask = FieldMask.of>( - * 'displayName', - * 'config.numWorkers' - * ); - * ``` + * One field entry in a {@link FieldMaskSchema}: its wire-format name and, for message-typed fields, a lazy reference to the nested message's schema. Array, map, enum, and scalar fields omit `children`. */ -export class FieldMask { - /** The list of field paths in this mask. */ - readonly paths: TPath[]; +export interface FieldMaskSchemaField { + readonly wire: string; + readonly children?: () => FieldMaskSchema; +} - private constructor(paths: TPath[]) { - this.paths = normalize(paths); +/** + * Structural description of one message's FieldMask-reachable fields. Maps each typescript field name to its wire-format name and, for message-typed fields, a lazy `() => FieldMaskSchema` reference that lets recursive and mutually-recursive messages describe themselves. + */ +export type FieldMaskSchema = Readonly>; + +// Walk a dot-separated typescript field name path against a schema, returning the equivalent wire-format path. Returns `undefined` when any segment fails: a name that isn't a field of the current message, or a non-terminal segment that doesn't reference another message. +function walkFieldMaskPath( + schema: FieldMaskSchema, + path: string +): string | undefined { + const segments = path.split('.'); + const wireSegments: string[] = []; + let current: FieldMaskSchema = schema; + for (let i = 0; i < segments.length; i++) { + const seg = segments[i]; + // Existence check before lookup: `current[seg]` is typed as FieldMaskSchemaField without noUncheckedIndexedAccess, so an undefined check downstream would be flagged "unnecessary". + if (!(seg in current)) return undefined; + const field = current[seg]; + wireSegments.push(field.wire); + if (i < segments.length - 1) { + if (field.children === undefined) return undefined; + current = field.children(); + } } + return wireSegments.join('.'); +} + +/** + * A field mask implementing google.protobuf.FieldMask semantics. + */ +export class FieldMask { + // Phantom marker: keeps `FieldMask` and `FieldMask` compile-time distinct under TypeScript's otherwise-structural typing. Never set at runtime. + declare private readonly _tag: T; - /** Create a field mask from one or more paths. */ - static of

(...paths: P[]): FieldMask

{ - return new FieldMask(paths); + // Stored post-translation, normalized wire-format paths. + private readonly paths: string[]; + + private constructor(paths: string[]) { + this.paths = paths; + } + + /** + * Build a FieldMask from typescript field name paths against the target message's schema. Validates every path by walking each segment through the schema and throws Error when any segment fails. + * + * Reserved for generated per-message factories; user code should call the factory (e.g. `alertFieldMask(...)`), which supplies the schema before delegating here. + * + * @internal + */ + static build(paths: string[], schema: FieldMaskSchema): FieldMask { + const normalized = normalize(paths); + const wire: string[] = []; + for (const p of normalized) { + const w = walkFieldMaskPath(schema, p); + if (w === undefined) { + throw new Error(`Unknown field path "${p}"`); + } + wire.push(w); + } + return new FieldMask(wire); } - /** Return a new mask with additional paths appended. */ - append(...paths: TPath[]): FieldMask { - return new FieldMask([...this.paths, ...paths]); + /** + * Serialize the mask to the wire-format string. + */ + toString(): string { + return this.paths.join(','); } } diff --git a/packages/core/src/wkt/index.ts b/packages/core/src/wkt/index.ts index 8d41d967..5d71382a 100644 --- a/packages/core/src/wkt/index.ts +++ b/packages/core/src/wkt/index.ts @@ -1,3 +1,3 @@ export {FieldMask} from './fieldmask'; -export type {FieldPaths} from './fieldmask'; +export type {FieldMaskSchema, FieldMaskSchemaField} from './fieldmask'; export type {JsonValue, JsonObject} from './value'; diff --git a/packages/core/tests/wkt/fieldmask.test.ts b/packages/core/tests/wkt/fieldmask.test.ts index 3e93698f..0dba976b 100644 --- a/packages/core/tests/wkt/fieldmask.test.ts +++ b/packages/core/tests/wkt/fieldmask.test.ts @@ -1,133 +1,120 @@ import {describe, it, expect} from 'vitest'; import {FieldMask} from '../../src/wkt'; -import type {FieldPaths} from '../../src/wkt'; +import type {FieldMaskSchema} from '../../src/wkt'; -// Simulates a class instance with methods (e.g. Temporal.Instant). -interface ClassLike { - epochMilliseconds: number; - toString(): string; -} +// Alert-like non-cyclic schema with nested Condition + Operand, used to drive FieldMask through its `@internal` build entry point. +const operandSchema: FieldMaskSchema = { + column: {wire: 'column'}, + value: {wire: 'value'}, +}; +const conditionSchema: FieldMaskSchema = { + op: {wire: 'op'}, + operand: {wire: 'operand', children: () => operandSchema}, +}; +const alertSchema: FieldMaskSchema = { + displayName: {wire: 'display_name'}, + condition: {wire: 'condition', children: () => conditionSchema}, +}; -// Test interface for FieldPaths derivation. -interface Cluster { - name: string; - displayName: string; - state: string; - config: { - numWorkers: number; - scaling: { - minReplicas: number; - maxReplicas: number; - }; - }; - tags: string[]; - labels: Record; - createTime?: ClassLike; -} +// Self-referential schema used to verify cycle-safe construction. +const nodeSchema: FieldMaskSchema = { + label: {wire: 'label'}, + child: {wire: 'child', children: () => nodeSchema}, +}; -// Verify FieldPaths derives correct paths at compile time. -type ClusterPaths = FieldPaths; -const _checkPaths: ClusterPaths[] = [ - 'name', - 'displayName', - 'state', - 'config', - 'config.numWorkers', - 'config.scaling', - 'config.scaling.minReplicas', - 'config.scaling.maxReplicas', - 'tags', - 'labels', - 'createTime', // Leaf — ClassLike has methods, so no recursion. -]; -// Suppress unused variable warning. -void _checkPaths; - -// Verify that ClassLike properties are NOT included as paths. -// If FieldPaths recursed into ClassLike, "createTime.epochMilliseconds" would -// be a valid path. This assignment must fail at compile time. -// @ts-expect-error - ClassLike is a leaf; its properties are not valid paths. -const _badPath: ClusterPaths = 'createTime.epochMilliseconds'; -void _badPath; - -describe('FieldMask', () => { - describe('of', () => { - const testCases: {name: string; input: string[]; want: string[]}[] = [ - {name: 'single path', input: ['name'], want: ['name']}, +describe('FieldMask.build', () => { + describe('valid paths translate and serialize', () => { + const cases: { + name: string; + schema: FieldMaskSchema; + input: string[]; + want: string; + }[] = [ { - name: 'multiple paths', - input: ['displayName', 'name'], - want: ['displayName', 'name'], + name: 'flat path', + schema: alertSchema, + input: ['displayName'], + want: 'display_name', }, { - name: 'deduplicates paths', - input: ['name', 'name', 'state'], - want: ['name', 'state'], + name: 'nested path', + schema: alertSchema, + input: ['condition.op'], + want: 'condition.op', }, { - name: 'removes paths subsumed by a parent', - input: ['config.numWorkers', 'config', 'name'], - want: ['config', 'name'], + name: 'deeply nested path', + schema: alertSchema, + input: ['condition.operand.column'], + want: 'condition.operand.column', }, { - name: 'removes deeply subsumed paths', - input: ['config.scaling.minReplicas', 'config.scaling', 'config'], - want: ['config'], + name: 'multiple paths joined in sorted order', + schema: alertSchema, + input: ['displayName', 'condition.op'], + want: 'condition.op,display_name', }, { - name: 'does not subsume paths sharing a prefix without a dot boundary', - input: ['foo', 'foobar'], - want: ['foo', 'foobar'], + name: 'duplicates collapse before translation', + schema: alertSchema, + input: ['displayName', 'displayName'], + want: 'display_name', + }, + { + name: 'children subsumed by a parent are dropped', + schema: alertSchema, + input: ['condition.op', 'condition'], + want: 'condition', + }, + { + name: 'empty input serializes to empty string', + schema: alertSchema, + input: [], + want: '', + }, + { + name: 'arbitrary depth through a self-cycle', + schema: nodeSchema, + input: ['child.child.child.label'], + want: 'child.child.child.label', }, - {name: 'empty mask', input: [], want: []}, ]; - it.each(testCases)('$name', ({input, want}) => { - const mask = FieldMask.of(...input); - expect(mask.paths).toStrictEqual(want); + it.each(cases)('$name', ({schema, input, want}) => { + const mask = FieldMask.build(input, schema); + expect(mask.toString()).toBe(want); }); }); - describe('append', () => { - const testCases: { + describe('invalid paths throw', () => { + const cases: { name: string; - initial: string[]; - append: string[]; - want: string[]; + schema: FieldMaskSchema; + input: string[]; + msg: string; }[] = [ { - name: 'adds new paths', - initial: ['name'], - append: ['state'], - want: ['name', 'state'], + name: 'unknown top-level field', + schema: alertSchema, + input: ['bogus'], + msg: 'Unknown field path "bogus"', }, { - name: 'deduplicates when appending existing paths', - initial: ['name', 'state'], - append: ['name'], - want: ['name', 'state'], + name: 'unknown nested field', + schema: alertSchema, + input: ['condition.bogus'], + msg: 'Unknown field path "condition.bogus"', }, { - name: 'subsumes child when parent is appended', - initial: ['config.numWorkers'], - append: ['config'], - want: ['config'], + name: 'descent past a scalar leaf', + schema: alertSchema, + input: ['displayName.nope'], + msg: 'Unknown field path "displayName.nope"', }, ]; - it.each(testCases)('$name', ({initial, append, want}) => { - const mask = FieldMask.of(...initial).append(...append); - expect(mask.paths).toStrictEqual(want); - }); - }); - - describe('type safety with FieldPaths', () => { - it('works with derived FieldPaths type', () => { - const mask = FieldMask.of>( - 'displayName', - 'config.numWorkers' - ); - expect(mask.paths).toStrictEqual(['config.numWorkers', 'displayName']); + it.each(cases)('$name', ({schema, input, msg}) => { + expect(() => FieldMask.build(input, schema)).toThrowError(msg); }); }); }); From b49f0f673265f605667d95501e6beaea9630647d Mon Sep 17 00:00:00 2001 From: Parth Bansal Date: Wed, 22 Apr 2026 13:42:16 +0000 Subject: [PATCH 2/4] update --- packages/abacpolicies/src/v1/model.ts | 249 +++ packages/accountaccesscontrol/src/v1/model.ts | 104 ++ .../accountaccesscontrolproxy/src/v1/model.ts | 104 ++ packages/alerts/src/v1/model.ts | 253 +++ packages/alerts/src/v2/model.ts | 234 +++ packages/artifactallowlists/src/v1/model.ts | 62 + .../billableusagedownload/src/v1/model.ts | 31 + packages/catalogs/src/v1/model.ts | 398 ++++ packages/clusterpolicies/src/v2/model.ts | 187 ++ packages/connections/src/v1/model.ts | 354 ++++ packages/credentials/src/v1/model.ts | 966 ++++++++++ packages/dataclassification/src/v1/model.ts | 107 ++ packages/dataquality/src/v1/model.ts | 461 +++++ packages/entitytagassignments/src/v1/model.ts | 117 ++ packages/environments/src/v1/model.ts | 243 +++ packages/externallocations/src/v1/model.ts | 299 +++ packages/features/src/v1/model.ts | 878 +++++++++ packages/featurestore/src/v1/model.ts | 161 ++ packages/files/src/v2/model.ts | 231 +++ packages/functions/src/v1/model.ts | 375 ++++ packages/genie/src/v1/model.ts | 1159 ++++++++++++ packages/globalinitscripts/src/v2/model.ts | 148 ++ packages/grants/src/v1/model.ts | 222 +++ packages/iam/src/v2/model.ts | 1300 +++++++++++++ packages/instancepools/src/v2/model.ts | 528 ++++++ packages/instanceprofiles/src/v2/model.ts | 126 ++ packages/materializedfeatures/src/v1/model.ts | 175 ++ packages/metastores/src/v1/model.ts | 330 ++++ .../notificationdestinations/src/v1/model.ts | 223 +++ .../oauthcustomappintegration/src/v1/model.ts | 357 ++++ packages/oauthpublishedapp/src/v1/model.ts | 52 + packages/permissions/src/v1/model.ts | 147 ++ packages/policyfamilies/src/v2/model.ts | 59 + packages/postgres/src/v1/model.ts | 1640 +++++++++++++++++ packages/qualitymonitor/src/v2/model.ts | 262 +++ packages/qualitymonitors/src/v1/model.ts | 396 ++++ packages/queries/src/v1/model.ts | 380 ++++ packages/queryhistory/src/v1/model.ts | 229 +++ packages/registeredmodels/src/v1/model.ts | 484 +++++ packages/resourcequotas/src/v1/model.ts | 65 + packages/rfa/src/v1/model.ts | 157 ++ packages/schemas/src/v1/model.ts | 268 +++ packages/sdk/src/model.ts | 200 ++ packages/secrets/src/v1/model.ts | 299 +++ .../serviceprincipalsecrets/src/v1/model.ts | 116 ++ .../src/v1/model.ts | 116 ++ packages/settings/src/v2/model.ts | 479 +++++ packages/statementexecution/src/v1/model.ts | 245 ++- packages/systemschemas/src/v1/model.ts | 102 + packages/tables/src/v1/model.ts | 782 ++++++++ packages/tagassignments/src/v1/model.ts | 108 ++ packages/tagpolicies/src/v1/model.ts | 155 ++ packages/tokenmanagement/src/v1/model.ts | 142 ++ packages/tokens/src/v1/model.ts | 122 ++ packages/volumes/src/v1/model.ts | 181 ++ packages/warehouses/src/v1/model.ts | 586 ++++++ packages/workspaceassignment/src/v1/model.ts | 160 ++ packages/workspacebindings/src/v1/model.ts | 138 ++ packages/workspaceconf/src/v1/model.ts | 26 + 59 files changed, 18477 insertions(+), 1 deletion(-) diff --git a/packages/abacpolicies/src/v1/model.ts b/packages/abacpolicies/src/v1/model.ts index 14109f40..03179d51 100644 --- a/packages/abacpolicies/src/v1/model.ts +++ b/packages/abacpolicies/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum PolicyType { @@ -603,3 +605,250 @@ export const marshalTagValueExtractionSchema: z.ZodType = z .transform(d => ({ tag_key: d.tagKey, })); + +const columnMaskOptionsFieldMaskSchema: FieldMaskSchema = { + functionName: {wire: 'function_name'}, + onColumn: {wire: 'on_column'}, + using: {wire: 'using'}, +}; + +export function columnMaskOptionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + columnMaskOptionsFieldMaskSchema + ); +} + +const columnTagValueExtractionFieldMaskSchema: FieldMaskSchema = { + columnAlias: {wire: 'column_alias'}, + tagKey: {wire: 'tag_key'}, +}; + +export function columnTagValueExtractionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + columnTagValueExtractionFieldMaskSchema + ); +} + +const createPolicyFieldMaskSchema: FieldMaskSchema = { + policyInfo: {wire: 'policy_info', children: () => policyInfoFieldMaskSchema}, +}; + +export function createPolicyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createPolicyFieldMaskSchema); +} + +const deletePolicyFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + onSecurableFullname: {wire: 'on_securable_fullname'}, + onSecurableType: {wire: 'on_securable_type'}, +}; + +export function deletePolicyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deletePolicyFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deletePolicy_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deletePolicy_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deletePolicy_ResponseFieldMaskSchema + ); +} + +const denyOptionsFieldMaskSchema: FieldMaskSchema = { + privileges: {wire: 'privileges'}, +}; + +export function denyOptionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, denyOptionsFieldMaskSchema); +} + +const functionArgumentFieldMaskSchema: FieldMaskSchema = { + alias: {wire: 'alias'}, + constant: {wire: 'constant'}, + metadataExtraction: { + wire: 'metadata_extraction', + children: () => metadataExtractionExpressionFieldMaskSchema, + }, +}; + +export function functionArgumentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + functionArgumentFieldMaskSchema + ); +} + +const getPolicyFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + onSecurableFullname: {wire: 'on_securable_fullname'}, + onSecurableType: {wire: 'on_securable_type'}, +}; + +export function getPolicyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getPolicyFieldMaskSchema); +} + +const grantOptionsFieldMaskSchema: FieldMaskSchema = { + privileges: {wire: 'privileges'}, +}; + +export function grantOptionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, grantOptionsFieldMaskSchema); +} + +const listPoliciesFieldMaskSchema: FieldMaskSchema = { + includeInherited: {wire: 'include_inherited'}, + maxResults: {wire: 'max_results'}, + onSecurableFullname: {wire: 'on_securable_fullname'}, + onSecurableType: {wire: 'on_securable_type'}, + pageToken: {wire: 'page_token'}, +}; + +export function listPoliciesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listPoliciesFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listPolicies_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + policies: {wire: 'policies'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listPolicies_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPolicies_ResponseFieldMaskSchema + ); +} + +const matchColumnFieldMaskSchema: FieldMaskSchema = { + alias: {wire: 'alias'}, + condition: {wire: 'condition'}, +}; + +export function matchColumnFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, matchColumnFieldMaskSchema); +} + +const metadataExtractionExpressionFieldMaskSchema: FieldMaskSchema = { + columnTagValue: { + wire: 'column_tag_value', + children: () => columnTagValueExtractionFieldMaskSchema, + }, + tagValue: { + wire: 'tag_value', + children: () => tagValueExtractionFieldMaskSchema, + }, +}; + +export function metadataExtractionExpressionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + metadataExtractionExpressionFieldMaskSchema + ); +} + +const policyInfoFieldMaskSchema: FieldMaskSchema = { + columnMask: { + wire: 'column_mask', + children: () => columnMaskOptionsFieldMaskSchema, + }, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + deny: {wire: 'deny', children: () => denyOptionsFieldMaskSchema}, + exceptPrincipals: {wire: 'except_principals'}, + forSecurableType: {wire: 'for_securable_type'}, + grant: {wire: 'grant', children: () => grantOptionsFieldMaskSchema}, + id: {wire: 'id'}, + matchColumns: {wire: 'match_columns'}, + name: {wire: 'name'}, + onSecurableFullname: {wire: 'on_securable_fullname'}, + onSecurableType: {wire: 'on_securable_type'}, + policyType: {wire: 'policy_type'}, + rowFilter: { + wire: 'row_filter', + children: () => rowFilterOptionsFieldMaskSchema, + }, + toPrincipals: {wire: 'to_principals'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + useSessionIdentity: {wire: 'use_session_identity'}, + whenCondition: {wire: 'when_condition'}, +}; + +export function policyInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, policyInfoFieldMaskSchema); +} + +const rowFilterOptionsFieldMaskSchema: FieldMaskSchema = { + functionName: {wire: 'function_name'}, + using: {wire: 'using'}, +}; + +export function rowFilterOptionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + rowFilterOptionsFieldMaskSchema + ); +} + +const tagValueExtractionFieldMaskSchema: FieldMaskSchema = { + tagKey: {wire: 'tag_key'}, +}; + +export function tagValueExtractionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + tagValueExtractionFieldMaskSchema + ); +} + +const updatePolicyFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + onSecurableFullname: {wire: 'on_securable_fullname'}, + onSecurableType: {wire: 'on_securable_type'}, + policyInfo: {wire: 'policy_info', children: () => policyInfoFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updatePolicyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, updatePolicyFieldMaskSchema); +} diff --git a/packages/accountaccesscontrol/src/v1/model.ts b/packages/accountaccesscontrol/src/v1/model.ts index b2bf51e7..ec3879f3 100644 --- a/packages/accountaccesscontrol/src/v1/model.ts +++ b/packages/accountaccesscontrol/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface GetAssignableRolesForResourceRequest { @@ -236,3 +238,105 @@ export const marshalUpdateRuleSetRequestSchema: z.ZodType = z name: d.name, rule_set: d.ruleSet, })); + +const getAssignableRolesForResourceRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + resource: {wire: 'resource'}, +}; + +export function getAssignableRolesForResourceRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getAssignableRolesForResourceRequestFieldMaskSchema + ); +} + +const getAssignableRolesForResourceResponseFieldMaskSchema: FieldMaskSchema = { + roles: {wire: 'roles'}, +}; + +export function getAssignableRolesForResourceResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getAssignableRolesForResourceResponseFieldMaskSchema + ); +} + +const getRuleSetRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + etag: {wire: 'etag'}, + name: {wire: 'name'}, +}; + +export function getRuleSetRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getRuleSetRequestFieldMaskSchema + ); +} + +const grantRuleFieldMaskSchema: FieldMaskSchema = { + principals: {wire: 'principals'}, + role: {wire: 'role'}, +}; + +export function grantRuleFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, grantRuleFieldMaskSchema); +} + +const roleFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function roleFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, roleFieldMaskSchema); +} + +const ruleSetFieldMaskSchema: FieldMaskSchema = { + etag: {wire: 'etag'}, + grantRules: {wire: 'grant_rules'}, + name: {wire: 'name'}, +}; + +export function ruleSetFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, ruleSetFieldMaskSchema); +} + +const ruleSetUpdateRequestFieldMaskSchema: FieldMaskSchema = { + etag: {wire: 'etag'}, + grantRules: {wire: 'grant_rules'}, + name: {wire: 'name'}, +}; + +export function ruleSetUpdateRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + ruleSetUpdateRequestFieldMaskSchema + ); +} + +const updateRuleSetRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + name: {wire: 'name'}, + ruleSet: { + wire: 'rule_set', + children: () => ruleSetUpdateRequestFieldMaskSchema, + }, +}; + +export function updateRuleSetRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateRuleSetRequestFieldMaskSchema + ); +} diff --git a/packages/accountaccesscontrolproxy/src/v1/model.ts b/packages/accountaccesscontrolproxy/src/v1/model.ts index b2bf51e7..ec3879f3 100644 --- a/packages/accountaccesscontrolproxy/src/v1/model.ts +++ b/packages/accountaccesscontrolproxy/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface GetAssignableRolesForResourceRequest { @@ -236,3 +238,105 @@ export const marshalUpdateRuleSetRequestSchema: z.ZodType = z name: d.name, rule_set: d.ruleSet, })); + +const getAssignableRolesForResourceRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + resource: {wire: 'resource'}, +}; + +export function getAssignableRolesForResourceRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getAssignableRolesForResourceRequestFieldMaskSchema + ); +} + +const getAssignableRolesForResourceResponseFieldMaskSchema: FieldMaskSchema = { + roles: {wire: 'roles'}, +}; + +export function getAssignableRolesForResourceResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getAssignableRolesForResourceResponseFieldMaskSchema + ); +} + +const getRuleSetRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + etag: {wire: 'etag'}, + name: {wire: 'name'}, +}; + +export function getRuleSetRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getRuleSetRequestFieldMaskSchema + ); +} + +const grantRuleFieldMaskSchema: FieldMaskSchema = { + principals: {wire: 'principals'}, + role: {wire: 'role'}, +}; + +export function grantRuleFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, grantRuleFieldMaskSchema); +} + +const roleFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function roleFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, roleFieldMaskSchema); +} + +const ruleSetFieldMaskSchema: FieldMaskSchema = { + etag: {wire: 'etag'}, + grantRules: {wire: 'grant_rules'}, + name: {wire: 'name'}, +}; + +export function ruleSetFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, ruleSetFieldMaskSchema); +} + +const ruleSetUpdateRequestFieldMaskSchema: FieldMaskSchema = { + etag: {wire: 'etag'}, + grantRules: {wire: 'grant_rules'}, + name: {wire: 'name'}, +}; + +export function ruleSetUpdateRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + ruleSetUpdateRequestFieldMaskSchema + ); +} + +const updateRuleSetRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + name: {wire: 'name'}, + ruleSet: { + wire: 'rule_set', + children: () => ruleSetUpdateRequestFieldMaskSchema, + }, +}; + +export function updateRuleSetRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateRuleSetRequestFieldMaskSchema + ); +} diff --git a/packages/alerts/src/v1/model.ts b/packages/alerts/src/v1/model.ts index 95df949a..683e67fd 100644 --- a/packages/alerts/src/v1/model.ts +++ b/packages/alerts/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum AlertOperator { @@ -751,3 +753,254 @@ export const marshalUpdateAlertRequestAlertSchema: z.ZodType = z update_time: d.updateTime, notify_on_ok: d.notifyOnOk, })); + +const alertFieldMaskSchema: FieldMaskSchema = { + condition: {wire: 'condition', children: () => alertConditionFieldMaskSchema}, + createTime: {wire: 'create_time'}, + customBody: {wire: 'custom_body'}, + customSubject: {wire: 'custom_subject'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, + lifecycleState: {wire: 'lifecycle_state'}, + notifyOnOk: {wire: 'notify_on_ok'}, + ownerUserName: {wire: 'owner_user_name'}, + parentPath: {wire: 'parent_path'}, + queryId: {wire: 'query_id'}, + secondsToRetrigger: {wire: 'seconds_to_retrigger'}, + state: {wire: 'state'}, + triggerTime: {wire: 'trigger_time'}, + updateTime: {wire: 'update_time'}, +}; + +export function alertFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, alertFieldMaskSchema); +} + +const alertConditionFieldMaskSchema: FieldMaskSchema = { + emptyResultState: {wire: 'empty_result_state'}, + op: {wire: 'op'}, + operand: {wire: 'operand', children: () => alertOperandFieldMaskSchema}, + threshold: {wire: 'threshold', children: () => alertOperandFieldMaskSchema}, +}; + +export function alertConditionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, alertConditionFieldMaskSchema); +} + +const alertOperandFieldMaskSchema: FieldMaskSchema = { + column: {wire: 'column', children: () => alertOperandColumnFieldMaskSchema}, + value: {wire: 'value', children: () => alertOperandValueFieldMaskSchema}, +}; + +export function alertOperandFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, alertOperandFieldMaskSchema); +} + +const alertOperandColumnFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function alertOperandColumnFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + alertOperandColumnFieldMaskSchema + ); +} + +const alertOperandValueFieldMaskSchema: FieldMaskSchema = { + boolValue: {wire: 'bool_value'}, + doubleValue: {wire: 'double_value'}, + stringValue: {wire: 'string_value'}, +}; + +export function alertOperandValueFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + alertOperandValueFieldMaskSchema + ); +} + +const createAlertRequestFieldMaskSchema: FieldMaskSchema = { + alert: { + wire: 'alert', + children: () => createAlertRequestAlertFieldMaskSchema, + }, + autoResolveDisplayName: {wire: 'auto_resolve_display_name'}, +}; + +export function createAlertRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createAlertRequestFieldMaskSchema + ); +} + +const createAlertRequestAlertFieldMaskSchema: FieldMaskSchema = { + condition: {wire: 'condition', children: () => alertConditionFieldMaskSchema}, + createTime: {wire: 'create_time'}, + customBody: {wire: 'custom_body'}, + customSubject: {wire: 'custom_subject'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, + lifecycleState: {wire: 'lifecycle_state'}, + notifyOnOk: {wire: 'notify_on_ok'}, + ownerUserName: {wire: 'owner_user_name'}, + parentPath: {wire: 'parent_path'}, + queryId: {wire: 'query_id'}, + secondsToRetrigger: {wire: 'seconds_to_retrigger'}, + state: {wire: 'state'}, + triggerTime: {wire: 'trigger_time'}, + updateTime: {wire: 'update_time'}, +}; + +export function createAlertRequestAlertFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createAlertRequestAlertFieldMaskSchema + ); +} + +const emptyFieldMaskSchema: FieldMaskSchema = {}; + +export function emptyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, emptyFieldMaskSchema); +} + +const getAlertRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function getAlertRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getAlertRequestFieldMaskSchema + ); +} + +const listAlertsRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listAlertsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAlertsRequestFieldMaskSchema + ); +} + +const listAlertsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + results: {wire: 'results'}, +}; + +export function listAlertsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAlertsResponseFieldMaskSchema + ); +} + +const listAlertsResponseAlertFieldMaskSchema: FieldMaskSchema = { + condition: {wire: 'condition', children: () => alertConditionFieldMaskSchema}, + createTime: {wire: 'create_time'}, + customBody: {wire: 'custom_body'}, + customSubject: {wire: 'custom_subject'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, + lifecycleState: {wire: 'lifecycle_state'}, + notifyOnOk: {wire: 'notify_on_ok'}, + ownerUserName: {wire: 'owner_user_name'}, + parentPath: {wire: 'parent_path'}, + queryId: {wire: 'query_id'}, + secondsToRetrigger: {wire: 'seconds_to_retrigger'}, + state: {wire: 'state'}, + triggerTime: {wire: 'trigger_time'}, + updateTime: {wire: 'update_time'}, +}; + +export function listAlertsResponseAlertFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAlertsResponseAlertFieldMaskSchema + ); +} + +const trashAlertRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function trashAlertRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + trashAlertRequestFieldMaskSchema + ); +} + +const updateAlertRequestFieldMaskSchema: FieldMaskSchema = { + alert: { + wire: 'alert', + children: () => updateAlertRequestAlertFieldMaskSchema, + }, + autoResolveDisplayName: {wire: 'auto_resolve_display_name'}, + id: {wire: 'id'}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateAlertRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateAlertRequestFieldMaskSchema + ); +} + +const updateAlertRequestAlertFieldMaskSchema: FieldMaskSchema = { + condition: {wire: 'condition', children: () => alertConditionFieldMaskSchema}, + createTime: {wire: 'create_time'}, + customBody: {wire: 'custom_body'}, + customSubject: {wire: 'custom_subject'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, + lifecycleState: {wire: 'lifecycle_state'}, + notifyOnOk: {wire: 'notify_on_ok'}, + ownerUserName: {wire: 'owner_user_name'}, + parentPath: {wire: 'parent_path'}, + queryId: {wire: 'query_id'}, + secondsToRetrigger: {wire: 'seconds_to_retrigger'}, + state: {wire: 'state'}, + triggerTime: {wire: 'trigger_time'}, + updateTime: {wire: 'update_time'}, +}; + +export function updateAlertRequestAlertFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateAlertRequestAlertFieldMaskSchema + ); +} diff --git a/packages/alerts/src/v2/model.ts b/packages/alerts/src/v2/model.ts index eb1974db..9310f438 100644 --- a/packages/alerts/src/v2/model.ts +++ b/packages/alerts/src/v2/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum Aggregation { @@ -539,3 +541,235 @@ export const marshalListAlertsResponseSchema: z.ZodType = z alerts: d.alerts, next_page_token: d.nextPageToken, })); + +const alertFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + customDescription: {wire: 'custom_description'}, + customSummary: {wire: 'custom_summary'}, + displayName: {wire: 'display_name'}, + effectiveParentPath: {wire: 'effective_parent_path'}, + effectiveRunAs: { + wire: 'effective_run_as', + children: () => alertRunAsFieldMaskSchema, + }, + evaluation: { + wire: 'evaluation', + children: () => alertEvaluationFieldMaskSchema, + }, + id: {wire: 'id'}, + lifecycleState: {wire: 'lifecycle_state'}, + ownerUserName: {wire: 'owner_user_name'}, + parentPath: {wire: 'parent_path'}, + queryText: {wire: 'query_text'}, + runAs: {wire: 'run_as', children: () => alertRunAsFieldMaskSchema}, + runAsUserName: {wire: 'run_as_user_name'}, + schedule: {wire: 'schedule', children: () => cronScheduleFieldMaskSchema}, + updateTime: {wire: 'update_time'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function alertFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, alertFieldMaskSchema); +} + +const alertEvaluationFieldMaskSchema: FieldMaskSchema = { + comparisonOperator: {wire: 'comparison_operator'}, + emptyResultState: {wire: 'empty_result_state'}, + lastEvaluatedAt: {wire: 'last_evaluated_at'}, + notification: { + wire: 'notification', + children: () => alertNotificationFieldMaskSchema, + }, + source: {wire: 'source', children: () => alertOperandColumnFieldMaskSchema}, + state: {wire: 'state'}, + threshold: {wire: 'threshold', children: () => alertOperandFieldMaskSchema}, +}; + +export function alertEvaluationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + alertEvaluationFieldMaskSchema + ); +} + +const alertNotificationFieldMaskSchema: FieldMaskSchema = { + notifyOnOk: {wire: 'notify_on_ok'}, + retriggerSeconds: {wire: 'retrigger_seconds'}, + subscriptions: {wire: 'subscriptions'}, +}; + +export function alertNotificationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + alertNotificationFieldMaskSchema + ); +} + +const alertOperandFieldMaskSchema: FieldMaskSchema = { + column: {wire: 'column', children: () => alertOperandColumnFieldMaskSchema}, + value: {wire: 'value', children: () => alertOperandValueFieldMaskSchema}, +}; + +export function alertOperandFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, alertOperandFieldMaskSchema); +} + +const alertOperandColumnFieldMaskSchema: FieldMaskSchema = { + aggregation: {wire: 'aggregation'}, + display: {wire: 'display'}, + name: {wire: 'name'}, +}; + +export function alertOperandColumnFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + alertOperandColumnFieldMaskSchema + ); +} + +const alertOperandValueFieldMaskSchema: FieldMaskSchema = { + boolValue: {wire: 'bool_value'}, + doubleValue: {wire: 'double_value'}, + stringValue: {wire: 'string_value'}, +}; + +export function alertOperandValueFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + alertOperandValueFieldMaskSchema + ); +} + +const alertRunAsFieldMaskSchema: FieldMaskSchema = { + servicePrincipalName: {wire: 'service_principal_name'}, + userName: {wire: 'user_name'}, +}; + +export function alertRunAsFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, alertRunAsFieldMaskSchema); +} + +const alertSubscriptionFieldMaskSchema: FieldMaskSchema = { + destinationId: {wire: 'destination_id'}, + userEmail: {wire: 'user_email'}, +}; + +export function alertSubscriptionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + alertSubscriptionFieldMaskSchema + ); +} + +const createAlertRequestFieldMaskSchema: FieldMaskSchema = { + alert: {wire: 'alert', children: () => alertFieldMaskSchema}, +}; + +export function createAlertRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createAlertRequestFieldMaskSchema + ); +} + +const cronScheduleFieldMaskSchema: FieldMaskSchema = { + effectivePauseStatus: {wire: 'effective_pause_status'}, + pauseStatus: {wire: 'pause_status'}, + quartzCronSchedule: {wire: 'quartz_cron_schedule'}, + timezoneId: {wire: 'timezone_id'}, +}; + +export function cronScheduleFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, cronScheduleFieldMaskSchema); +} + +const emptyFieldMaskSchema: FieldMaskSchema = {}; + +export function emptyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, emptyFieldMaskSchema); +} + +const getAlertRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function getAlertRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getAlertRequestFieldMaskSchema + ); +} + +const listAlertsRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listAlertsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAlertsRequestFieldMaskSchema + ); +} + +const listAlertsResponseFieldMaskSchema: FieldMaskSchema = { + alerts: {wire: 'alerts'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listAlertsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAlertsResponseFieldMaskSchema + ); +} + +const trashAlertRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, + purge: {wire: 'purge'}, +}; + +export function trashAlertRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + trashAlertRequestFieldMaskSchema + ); +} + +const updateAlertRequestFieldMaskSchema: FieldMaskSchema = { + alert: {wire: 'alert', children: () => alertFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateAlertRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateAlertRequestFieldMaskSchema + ); +} diff --git a/packages/artifactallowlists/src/v1/model.ts b/packages/artifactallowlists/src/v1/model.ts index 738ed015..60443d19 100644 --- a/packages/artifactallowlists/src/v1/model.ts +++ b/packages/artifactallowlists/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The artifact type */ @@ -143,3 +145,63 @@ export const marshalSetArtifactAllowlistSchema: z.ZodType = z created_by: d.createdBy, created_at: d.createdAt, })); + +const artifactAllowlistInfoFieldMaskSchema: FieldMaskSchema = { + artifactMatchers: {wire: 'artifact_matchers'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + metastoreId: {wire: 'metastore_id'}, +}; + +export function artifactAllowlistInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + artifactAllowlistInfoFieldMaskSchema + ); +} + +const artifactMatcherFieldMaskSchema: FieldMaskSchema = { + artifact: {wire: 'artifact'}, + matchType: {wire: 'match_type'}, +}; + +export function artifactMatcherFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + artifactMatcherFieldMaskSchema + ); +} + +const getArtifactAllowlistFieldMaskSchema: FieldMaskSchema = { + artifactType: {wire: 'artifact_type'}, +}; + +export function getArtifactAllowlistFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getArtifactAllowlistFieldMaskSchema + ); +} + +const setArtifactAllowlistFieldMaskSchema: FieldMaskSchema = { + artifactMatchers: {wire: 'artifact_matchers'}, + artifactType: {wire: 'artifact_type'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + metastoreId: {wire: 'metastore_id'}, +}; + +export function setArtifactAllowlistFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + setArtifactAllowlistFieldMaskSchema + ); +} diff --git a/packages/billableusagedownload/src/v1/model.ts b/packages/billableusagedownload/src/v1/model.ts index 9c6ac4ae..7941a16c 100644 --- a/packages/billableusagedownload/src/v1/model.ts +++ b/packages/billableusagedownload/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface DownloadRequest { @@ -48,3 +50,32 @@ export const marshalDownloadResponseSchema: z.ZodType = z .transform(d => ({ content: d.content, })); + +const downloadRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + endMonth: {wire: 'end_month'}, + personalData: {wire: 'personal_data'}, + startMonth: {wire: 'start_month'}, +}; + +export function downloadRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + downloadRequestFieldMaskSchema + ); +} + +const downloadResponseFieldMaskSchema: FieldMaskSchema = { + content: {wire: 'content'}, +}; + +export function downloadResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + downloadResponseFieldMaskSchema + ); +} diff --git a/packages/catalogs/src/v1/model.ts b/packages/catalogs/src/v1/model.ts index bfcedc77..46d03aeb 100644 --- a/packages/catalogs/src/v1/model.ts +++ b/packages/catalogs/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum CatalogIsolationMode { @@ -942,3 +944,399 @@ export const marshalUpdateCatalogSchema: z.ZodType = z properties: d.properties, options: d.options, })); + +const azureEncryptionSettingsFieldMaskSchema: FieldMaskSchema = { + azureCmkAccessConnectorId: {wire: 'azure_cmk_access_connector_id'}, + azureCmkManagedIdentityId: {wire: 'azure_cmk_managed_identity_id'}, + azureTenantId: {wire: 'azure_tenant_id'}, +}; + +export function azureEncryptionSettingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + azureEncryptionSettingsFieldMaskSchema + ); +} + +const catalogInfoFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + catalogType: {wire: 'catalog_type'}, + comment: {wire: 'comment'}, + connectionName: {wire: 'connection_name'}, + conversionInfo: { + wire: 'conversion_info', + children: () => conversionInfoFieldMaskSchema, + }, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + drReplicationInfo: { + wire: 'dr_replication_info', + children: () => drReplicationInfoFieldMaskSchema, + }, + effectivePredictiveOptimizationFlag: { + wire: 'effective_predictive_optimization_flag', + children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, + }, + enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, + fullName: {wire: 'full_name'}, + isolationMode: {wire: 'isolation_mode'}, + managedEncryptionSettings: { + wire: 'managed_encryption_settings', + children: () => encryptionSettingsFieldMaskSchema, + }, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + options: {wire: 'options'}, + owner: {wire: 'owner'}, + properties: {wire: 'properties'}, + providerName: {wire: 'provider_name'}, + provisioningInfo: { + wire: 'provisioning_info', + children: () => provisioningInfoFieldMaskSchema, + }, + securableType: {wire: 'securable_type'}, + shareName: {wire: 'share_name'}, + storageLocation: {wire: 'storage_location'}, + storageRoot: {wire: 'storage_root'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function catalogInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, catalogInfoFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const catalogInfo_OptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function catalogInfo_OptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + catalogInfo_OptionsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const catalogInfo_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function catalogInfo_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + catalogInfo_PropertiesEntryFieldMaskSchema + ); +} + +const conversionInfoFieldMaskSchema: FieldMaskSchema = { + state: {wire: 'state'}, +}; + +export function conversionInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, conversionInfoFieldMaskSchema); +} + +const createCatalogFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + catalogType: {wire: 'catalog_type'}, + comment: {wire: 'comment'}, + connectionName: {wire: 'connection_name'}, + conversionInfo: { + wire: 'conversion_info', + children: () => conversionInfoFieldMaskSchema, + }, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + drReplicationInfo: { + wire: 'dr_replication_info', + children: () => drReplicationInfoFieldMaskSchema, + }, + effectivePredictiveOptimizationFlag: { + wire: 'effective_predictive_optimization_flag', + children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, + }, + enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, + fullName: {wire: 'full_name'}, + isolationMode: {wire: 'isolation_mode'}, + managedEncryptionSettings: { + wire: 'managed_encryption_settings', + children: () => encryptionSettingsFieldMaskSchema, + }, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + options: {wire: 'options'}, + owner: {wire: 'owner'}, + properties: {wire: 'properties'}, + providerName: {wire: 'provider_name'}, + provisioningInfo: { + wire: 'provisioning_info', + children: () => provisioningInfoFieldMaskSchema, + }, + securableType: {wire: 'securable_type'}, + shareName: {wire: 'share_name'}, + storageLocation: {wire: 'storage_location'}, + storageRoot: {wire: 'storage_root'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function createCatalogFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createCatalogFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createCatalog_OptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createCatalog_OptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createCatalog_OptionsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createCatalog_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createCatalog_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createCatalog_PropertiesEntryFieldMaskSchema + ); +} + +const deleteCatalogFieldMaskSchema: FieldMaskSchema = { + force: {wire: 'force'}, + nameArg: {wire: 'name_arg'}, +}; + +export function deleteCatalogFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deleteCatalogFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteCatalog_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteCatalog_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteCatalog_ResponseFieldMaskSchema + ); +} + +const drReplicationInfoFieldMaskSchema: FieldMaskSchema = { + lastFailoverTimeMs: {wire: 'last_failover_time_ms'}, + replicatedEntities: {wire: 'replicated_entities'}, + status: {wire: 'status'}, +}; + +export function drReplicationInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + drReplicationInfoFieldMaskSchema + ); +} + +const effectivePredictiveOptimizationFlagFieldMaskSchema: FieldMaskSchema = { + inheritedFromName: {wire: 'inherited_from_name'}, + inheritedFromType: {wire: 'inherited_from_type'}, + value: {wire: 'value'}, +}; + +export function effectivePredictiveOptimizationFlagFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + effectivePredictiveOptimizationFlagFieldMaskSchema + ); +} + +const encryptionSettingsFieldMaskSchema: FieldMaskSchema = { + azureEncryptionSettings: { + wire: 'azure_encryption_settings', + children: () => azureEncryptionSettingsFieldMaskSchema, + }, + azureKeyVaultKeyId: {wire: 'azure_key_vault_key_id'}, + customerManagedKeyId: {wire: 'customer_managed_key_id'}, +}; + +export function encryptionSettingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + encryptionSettingsFieldMaskSchema + ); +} + +const getCatalogFieldMaskSchema: FieldMaskSchema = { + includeBrowse: {wire: 'include_browse'}, + nameArg: {wire: 'name_arg'}, +}; + +export function getCatalogFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getCatalogFieldMaskSchema); +} + +const listCatalogsFieldMaskSchema: FieldMaskSchema = { + includeBrowse: {wire: 'include_browse'}, + includeUnbound: {wire: 'include_unbound'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listCatalogsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listCatalogsFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listCatalogs_ResponseFieldMaskSchema: FieldMaskSchema = { + catalogs: {wire: 'catalogs'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listCatalogs_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listCatalogs_ResponseFieldMaskSchema + ); +} + +const provisioningInfoFieldMaskSchema: FieldMaskSchema = { + state: {wire: 'state'}, +}; + +export function provisioningInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + provisioningInfoFieldMaskSchema + ); +} + +const updateCatalogFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + catalogType: {wire: 'catalog_type'}, + comment: {wire: 'comment'}, + connectionName: {wire: 'connection_name'}, + conversionInfo: { + wire: 'conversion_info', + children: () => conversionInfoFieldMaskSchema, + }, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + drReplicationInfo: { + wire: 'dr_replication_info', + children: () => drReplicationInfoFieldMaskSchema, + }, + effectivePredictiveOptimizationFlag: { + wire: 'effective_predictive_optimization_flag', + children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, + }, + enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, + fullName: {wire: 'full_name'}, + isolationMode: {wire: 'isolation_mode'}, + managedEncryptionSettings: { + wire: 'managed_encryption_settings', + children: () => encryptionSettingsFieldMaskSchema, + }, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + nameArg: {wire: 'name_arg'}, + newName: {wire: 'new_name'}, + options: {wire: 'options'}, + owner: {wire: 'owner'}, + properties: {wire: 'properties'}, + providerName: {wire: 'provider_name'}, + provisioningInfo: { + wire: 'provisioning_info', + children: () => provisioningInfoFieldMaskSchema, + }, + securableType: {wire: 'securable_type'}, + shareName: {wire: 'share_name'}, + storageLocation: {wire: 'storage_location'}, + storageRoot: {wire: 'storage_root'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function updateCatalogFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, updateCatalogFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateCatalog_OptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateCatalog_OptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateCatalog_OptionsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateCatalog_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateCatalog_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateCatalog_PropertiesEntryFieldMaskSchema + ); +} diff --git a/packages/clusterpolicies/src/v2/model.ts b/packages/clusterpolicies/src/v2/model.ts index 75499ce5..437f2900 100644 --- a/packages/clusterpolicies/src/v2/model.ts +++ b/packages/clusterpolicies/src/v2/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ListOrder { @@ -556,3 +558,188 @@ export const marshalRCranLibrarySchema: z.ZodType = z package: d.package, repo: d.repo, })); + +const createPolicyFieldMaskSchema: FieldMaskSchema = { + definition: {wire: 'definition'}, + description: {wire: 'description'}, + libraries: {wire: 'libraries'}, + maxClustersPerUser: {wire: 'max_clusters_per_user'}, + name: {wire: 'name'}, + policyFamilyDefinitionOverrides: {wire: 'policy_family_definition_overrides'}, + policyFamilyId: {wire: 'policy_family_id'}, +}; + +export function createPolicyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createPolicyFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createPolicy_ResponseFieldMaskSchema: FieldMaskSchema = { + policyId: {wire: 'policy_id'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createPolicy_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createPolicy_ResponseFieldMaskSchema + ); +} + +const deletePolicyFieldMaskSchema: FieldMaskSchema = { + policyId: {wire: 'policy_id'}, +}; + +export function deletePolicyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deletePolicyFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deletePolicy_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deletePolicy_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deletePolicy_ResponseFieldMaskSchema + ); +} + +const editPolicyFieldMaskSchema: FieldMaskSchema = { + definition: {wire: 'definition'}, + description: {wire: 'description'}, + libraries: {wire: 'libraries'}, + maxClustersPerUser: {wire: 'max_clusters_per_user'}, + name: {wire: 'name'}, + policyFamilyDefinitionOverrides: {wire: 'policy_family_definition_overrides'}, + policyFamilyId: {wire: 'policy_family_id'}, + policyId: {wire: 'policy_id'}, +}; + +export function editPolicyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, editPolicyFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const editPolicy_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function editPolicy_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + editPolicy_ResponseFieldMaskSchema + ); +} + +const getPolicyFieldMaskSchema: FieldMaskSchema = { + policyId: {wire: 'policy_id'}, +}; + +export function getPolicyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getPolicyFieldMaskSchema); +} + +const libraryFieldMaskSchema: FieldMaskSchema = { + cran: {wire: 'cran', children: () => rCranLibraryFieldMaskSchema}, + egg: {wire: 'egg'}, + jar: {wire: 'jar'}, + maven: {wire: 'maven', children: () => mavenLibraryFieldMaskSchema}, + pypi: {wire: 'pypi', children: () => pythonPyPiLibraryFieldMaskSchema}, + requirements: {wire: 'requirements'}, + whl: {wire: 'whl'}, +}; + +export function libraryFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, libraryFieldMaskSchema); +} + +const listPoliciesFieldMaskSchema: FieldMaskSchema = { + sortColumn: {wire: 'sort_column'}, + sortOrder: {wire: 'sort_order'}, +}; + +export function listPoliciesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listPoliciesFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listPolicies_ResponseFieldMaskSchema: FieldMaskSchema = { + policies: {wire: 'policies'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listPolicies_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPolicies_ResponseFieldMaskSchema + ); +} + +const mavenLibraryFieldMaskSchema: FieldMaskSchema = { + coordinates: {wire: 'coordinates'}, + exclusions: {wire: 'exclusions'}, + repo: {wire: 'repo'}, +}; + +export function mavenLibraryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, mavenLibraryFieldMaskSchema); +} + +const policyFieldMaskSchema: FieldMaskSchema = { + createdAtTimestamp: {wire: 'created_at_timestamp'}, + creatorUserName: {wire: 'creator_user_name'}, + definition: {wire: 'definition'}, + description: {wire: 'description'}, + isDefault: {wire: 'is_default'}, + libraries: {wire: 'libraries'}, + maxClustersPerUser: {wire: 'max_clusters_per_user'}, + name: {wire: 'name'}, + policyFamilyDefinitionOverrides: {wire: 'policy_family_definition_overrides'}, + policyFamilyId: {wire: 'policy_family_id'}, + policyId: {wire: 'policy_id'}, +}; + +export function policyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, policyFieldMaskSchema); +} + +const pythonPyPiLibraryFieldMaskSchema: FieldMaskSchema = { + package: {wire: 'package'}, + repo: {wire: 'repo'}, +}; + +export function pythonPyPiLibraryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + pythonPyPiLibraryFieldMaskSchema + ); +} + +const rCranLibraryFieldMaskSchema: FieldMaskSchema = { + package: {wire: 'package'}, + repo: {wire: 'repo'}, +}; + +export function rCranLibraryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, rCranLibraryFieldMaskSchema); +} diff --git a/packages/connections/src/v1/model.ts b/packages/connections/src/v1/model.ts index 00258ce6..cee14c20 100644 --- a/packages/connections/src/v1/model.ts +++ b/packages/connections/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Next Id: 77 */ @@ -698,3 +700,355 @@ export const marshalUpdateConnectionSchema: z.ZodType = z secrets: d.secrets, properties: d.properties, })); + +const connectionInfoFieldMaskSchema: FieldMaskSchema = { + comment: {wire: 'comment'}, + connectionId: {wire: 'connection_id'}, + connectionType: {wire: 'connection_type'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + credentialType: {wire: 'credential_type'}, + environmentSettings: { + wire: 'environment_settings', + children: () => environmentSettingsFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + options: {wire: 'options'}, + owner: {wire: 'owner'}, + properties: {wire: 'properties'}, + provisioningInfo: { + wire: 'provisioning_info', + children: () => provisioningInfoFieldMaskSchema, + }, + readOnly: {wire: 'read_only'}, + secrets: {wire: 'secrets'}, + securableType: {wire: 'securable_type'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + url: {wire: 'url'}, +}; + +export function connectionInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, connectionInfoFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const connectionInfo_OptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function connectionInfo_OptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + connectionInfo_OptionsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const connectionInfo_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function connectionInfo_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + connectionInfo_PropertiesEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const connectionInfo_SecretsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function connectionInfo_SecretsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + connectionInfo_SecretsEntryFieldMaskSchema + ); +} + +const createConnectionFieldMaskSchema: FieldMaskSchema = { + comment: {wire: 'comment'}, + connectionId: {wire: 'connection_id'}, + connectionType: {wire: 'connection_type'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + credentialType: {wire: 'credential_type'}, + environmentSettings: { + wire: 'environment_settings', + children: () => environmentSettingsFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + options: {wire: 'options'}, + owner: {wire: 'owner'}, + parent: {wire: 'parent'}, + properties: {wire: 'properties'}, + provisioningInfo: { + wire: 'provisioning_info', + children: () => provisioningInfoFieldMaskSchema, + }, + readOnly: {wire: 'read_only'}, + secrets: {wire: 'secrets'}, + securableType: {wire: 'securable_type'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + url: {wire: 'url'}, +}; + +export function createConnectionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createConnectionFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createConnection_OptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createConnection_OptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createConnection_OptionsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createConnection_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createConnection_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createConnection_PropertiesEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createConnection_SecretsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createConnection_SecretsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createConnection_SecretsEntryFieldMaskSchema + ); +} + +const deleteConnectionFieldMaskSchema: FieldMaskSchema = { + nameArg: {wire: 'name_arg'}, +}; + +export function deleteConnectionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteConnectionFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteConnection_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteConnection_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteConnection_ResponseFieldMaskSchema + ); +} + +const environmentSettingsFieldMaskSchema: FieldMaskSchema = { + environmentVersion: {wire: 'environment_version'}, + javaDependencies: {wire: 'java_dependencies'}, +}; + +export function environmentSettingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + environmentSettingsFieldMaskSchema + ); +} + +const getConnectionFieldMaskSchema: FieldMaskSchema = { + nameArg: {wire: 'name_arg'}, +}; + +export function getConnectionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, getConnectionFieldMaskSchema); +} + +const listConnectionsFieldMaskSchema: FieldMaskSchema = { + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, + parent: {wire: 'parent'}, +}; + +export function listConnectionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listConnectionsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listConnections_ResponseFieldMaskSchema: FieldMaskSchema = { + connections: {wire: 'connections'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listConnections_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listConnections_ResponseFieldMaskSchema + ); +} + +const provisioningInfoFieldMaskSchema: FieldMaskSchema = { + state: {wire: 'state'}, +}; + +export function provisioningInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + provisioningInfoFieldMaskSchema + ); +} + +const updateConnectionFieldMaskSchema: FieldMaskSchema = { + comment: {wire: 'comment'}, + connectionId: {wire: 'connection_id'}, + connectionType: {wire: 'connection_type'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + credentialType: {wire: 'credential_type'}, + environmentSettings: { + wire: 'environment_settings', + children: () => environmentSettingsFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + nameArg: {wire: 'name_arg'}, + newName: {wire: 'new_name'}, + options: {wire: 'options'}, + owner: {wire: 'owner'}, + properties: {wire: 'properties'}, + provisioningInfo: { + wire: 'provisioning_info', + children: () => provisioningInfoFieldMaskSchema, + }, + readOnly: {wire: 'read_only'}, + secrets: {wire: 'secrets'}, + securableType: {wire: 'securable_type'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + url: {wire: 'url'}, +}; + +export function updateConnectionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateConnectionFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateConnection_OptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateConnection_OptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateConnection_OptionsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateConnection_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateConnection_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateConnection_PropertiesEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateConnection_SecretsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateConnection_SecretsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateConnection_SecretsEntryFieldMaskSchema + ); +} diff --git a/packages/credentials/src/v1/model.ts b/packages/credentials/src/v1/model.ts index 0309c1a0..676d15b9 100644 --- a/packages/credentials/src/v1/model.ts +++ b/packages/credentials/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum IsolationMode { @@ -2508,3 +2510,967 @@ export const marshalValidateStorageCredential_ValidationResultSchema: z.ZodType result: d.result, message: d.message, })); + +const awsCredentialsFieldMaskSchema: FieldMaskSchema = { + accessKeyId: {wire: 'access_key_id'}, + accessPoint: {wire: 'access_point'}, + secretAccessKey: {wire: 'secret_access_key'}, + sessionToken: {wire: 'session_token'}, +}; + +export function awsCredentialsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, awsCredentialsFieldMaskSchema); +} + +const awsIamRoleFieldMaskSchema: FieldMaskSchema = { + externalId: {wire: 'external_id'}, + roleArn: {wire: 'role_arn'}, + unityCatalogIamArn: {wire: 'unity_catalog_iam_arn'}, +}; + +export function awsIamRoleFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, awsIamRoleFieldMaskSchema); +} + +const azureActiveDirectoryTokenFieldMaskSchema: FieldMaskSchema = { + aadToken: {wire: 'aad_token'}, +}; + +export function azureActiveDirectoryTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + azureActiveDirectoryTokenFieldMaskSchema + ); +} + +const azureManagedIdentityFieldMaskSchema: FieldMaskSchema = { + accessConnectorId: {wire: 'access_connector_id'}, + credentialId: {wire: 'credential_id'}, + managedIdentityId: {wire: 'managed_identity_id'}, +}; + +export function azureManagedIdentityFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + azureManagedIdentityFieldMaskSchema + ); +} + +const azureServicePrincipalFieldMaskSchema: FieldMaskSchema = { + applicationId: {wire: 'application_id'}, + clientSecret: {wire: 'client_secret'}, + directoryId: {wire: 'directory_id'}, +}; + +export function azureServicePrincipalFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + azureServicePrincipalFieldMaskSchema + ); +} + +const azureUserDelegationSasFieldMaskSchema: FieldMaskSchema = { + sasToken: {wire: 'sas_token'}, +}; + +export function azureUserDelegationSasFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + azureUserDelegationSasFieldMaskSchema + ); +} + +const cloudflareApiTokenFieldMaskSchema: FieldMaskSchema = { + accessKeyId: {wire: 'access_key_id'}, + accountId: {wire: 'account_id'}, + secretAccessKey: {wire: 'secret_access_key'}, +}; + +export function cloudflareApiTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + cloudflareApiTokenFieldMaskSchema + ); +} + +const createCredentialFieldMaskSchema: FieldMaskSchema = { + awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, + azureManagedIdentity: { + wire: 'azure_managed_identity', + children: () => azureManagedIdentityFieldMaskSchema, + }, + azureServicePrincipal: { + wire: 'azure_service_principal', + children: () => azureServicePrincipalFieldMaskSchema, + }, + cloudflareApiToken: { + wire: 'cloudflare_api_token', + children: () => cloudflareApiTokenFieldMaskSchema, + }, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + databricksGcpServiceAccount: { + wire: 'databricks_gcp_service_account', + children: () => databricksGcpServiceAccountFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + gcpServiceAccountKey: { + wire: 'gcp_service_account_key', + children: () => gcpServiceAccountKeyFieldMaskSchema, + }, + id: {wire: 'id'}, + isolationMode: {wire: 'isolation_mode'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + readOnly: {wire: 'read_only'}, + skipValidation: {wire: 'skip_validation'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + usedForManagedStorage: {wire: 'used_for_managed_storage'}, +}; + +export function createCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createCredentialFieldMaskSchema + ); +} + +const createStorageCredentialFieldMaskSchema: FieldMaskSchema = { + awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, + azureManagedIdentity: { + wire: 'azure_managed_identity', + children: () => azureManagedIdentityFieldMaskSchema, + }, + azureServicePrincipal: { + wire: 'azure_service_principal', + children: () => azureServicePrincipalFieldMaskSchema, + }, + cloudflareApiToken: { + wire: 'cloudflare_api_token', + children: () => cloudflareApiTokenFieldMaskSchema, + }, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + databricksGcpServiceAccount: { + wire: 'databricks_gcp_service_account', + children: () => databricksGcpServiceAccountFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + gcpServiceAccountKey: { + wire: 'gcp_service_account_key', + children: () => gcpServiceAccountKeyFieldMaskSchema, + }, + id: {wire: 'id'}, + isolationMode: {wire: 'isolation_mode'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + readOnly: {wire: 'read_only'}, + skipValidation: {wire: 'skip_validation'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + usedForManagedStorage: {wire: 'used_for_managed_storage'}, +}; + +export function createStorageCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createStorageCredentialFieldMaskSchema + ); +} + +const credentialInfoFieldMaskSchema: FieldMaskSchema = { + awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, + azureManagedIdentity: { + wire: 'azure_managed_identity', + children: () => azureManagedIdentityFieldMaskSchema, + }, + azureServicePrincipal: { + wire: 'azure_service_principal', + children: () => azureServicePrincipalFieldMaskSchema, + }, + cloudflareApiToken: { + wire: 'cloudflare_api_token', + children: () => cloudflareApiTokenFieldMaskSchema, + }, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + databricksGcpServiceAccount: { + wire: 'databricks_gcp_service_account', + children: () => databricksGcpServiceAccountFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + gcpServiceAccountKey: { + wire: 'gcp_service_account_key', + children: () => gcpServiceAccountKeyFieldMaskSchema, + }, + id: {wire: 'id'}, + isolationMode: {wire: 'isolation_mode'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + readOnly: {wire: 'read_only'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + usedForManagedStorage: {wire: 'used_for_managed_storage'}, +}; + +export function credentialInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, credentialInfoFieldMaskSchema); +} + +const databricksGcpServiceAccountFieldMaskSchema: FieldMaskSchema = { + credentialId: {wire: 'credential_id'}, + email: {wire: 'email'}, + privateKeyId: {wire: 'private_key_id'}, +}; + +export function databricksGcpServiceAccountFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + databricksGcpServiceAccountFieldMaskSchema + ); +} + +const deleteCredentialFieldMaskSchema: FieldMaskSchema = { + force: {wire: 'force'}, + nameArg: {wire: 'name_arg'}, +}; + +export function deleteCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteCredentialFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteCredential_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteCredential_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteCredential_ResponseFieldMaskSchema + ); +} + +const deleteStorageCredentialFieldMaskSchema: FieldMaskSchema = { + force: {wire: 'force'}, + nameArg: {wire: 'name_arg'}, +}; + +export function deleteStorageCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteStorageCredentialFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteStorageCredential_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteStorageCredential_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteStorageCredential_ResponseFieldMaskSchema + ); +} + +const gcpOauthTokenFieldMaskSchema: FieldMaskSchema = { + oauthToken: {wire: 'oauth_token'}, +}; + +export function gcpOauthTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, gcpOauthTokenFieldMaskSchema); +} + +const gcpServiceAccountKeyFieldMaskSchema: FieldMaskSchema = { + email: {wire: 'email'}, + privateKey: {wire: 'private_key'}, + privateKeyId: {wire: 'private_key_id'}, +}; + +export function gcpServiceAccountKeyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + gcpServiceAccountKeyFieldMaskSchema + ); +} + +const generateTemporaryPathCredentialFieldMaskSchema: FieldMaskSchema = { + dryRun: {wire: 'dry_run'}, + operation: {wire: 'operation'}, + url: {wire: 'url'}, +}; + +export function generateTemporaryPathCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateTemporaryPathCredentialFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const generateTemporaryPathCredential_ResponseFieldMaskSchema: FieldMaskSchema = + { + awsTempCredentials: { + wire: 'aws_temp_credentials', + children: () => awsCredentialsFieldMaskSchema, + }, + azureAad: { + wire: 'azure_aad', + children: () => azureActiveDirectoryTokenFieldMaskSchema, + }, + azureUserDelegationSas: { + wire: 'azure_user_delegation_sas', + children: () => azureUserDelegationSasFieldMaskSchema, + }, + expirationTime: {wire: 'expiration_time'}, + gcpOauthToken: { + wire: 'gcp_oauth_token', + children: () => gcpOauthTokenFieldMaskSchema, + }, + r2TempCredentials: { + wire: 'r2_temp_credentials', + children: () => r2CredentialsFieldMaskSchema, + }, + ucEncryptedToken: { + wire: 'uc_encrypted_token', + children: () => ucEncryptedTokenFieldMaskSchema, + }, + url: {wire: 'url'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function generateTemporaryPathCredential_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateTemporaryPathCredential_ResponseFieldMaskSchema + ); +} + +const generateTemporaryServiceCredentialFieldMaskSchema: FieldMaskSchema = { + azureOptions: { + wire: 'azure_options', + children: () => + generateTemporaryServiceCredential_AzureOptionsFieldMaskSchema, + }, + credentialName: {wire: 'credential_name'}, + gcpOptions: { + wire: 'gcp_options', + children: () => + generateTemporaryServiceCredential_GcpOptionsFieldMaskSchema, + }, +}; + +export function generateTemporaryServiceCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateTemporaryServiceCredentialFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const generateTemporaryServiceCredential_AzureOptionsFieldMaskSchema: FieldMaskSchema = + { + resources: {wire: 'resources'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function generateTemporaryServiceCredential_AzureOptionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateTemporaryServiceCredential_AzureOptionsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const generateTemporaryServiceCredential_GcpOptionsFieldMaskSchema: FieldMaskSchema = + { + scopes: {wire: 'scopes'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function generateTemporaryServiceCredential_GcpOptionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateTemporaryServiceCredential_GcpOptionsFieldMaskSchema + ); +} + +const generateTemporaryTableCredentialFieldMaskSchema: FieldMaskSchema = { + operation: {wire: 'operation'}, + tableId: {wire: 'table_id'}, +}; + +export function generateTemporaryTableCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateTemporaryTableCredentialFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const generateTemporaryTableCredential_ResponseFieldMaskSchema: FieldMaskSchema = + { + awsTempCredentials: { + wire: 'aws_temp_credentials', + children: () => awsCredentialsFieldMaskSchema, + }, + azureAad: { + wire: 'azure_aad', + children: () => azureActiveDirectoryTokenFieldMaskSchema, + }, + azureUserDelegationSas: { + wire: 'azure_user_delegation_sas', + children: () => azureUserDelegationSasFieldMaskSchema, + }, + expirationTime: {wire: 'expiration_time'}, + gcpOauthToken: { + wire: 'gcp_oauth_token', + children: () => gcpOauthTokenFieldMaskSchema, + }, + r2TempCredentials: { + wire: 'r2_temp_credentials', + children: () => r2CredentialsFieldMaskSchema, + }, + ucEncryptedToken: { + wire: 'uc_encrypted_token', + children: () => ucEncryptedTokenFieldMaskSchema, + }, + url: {wire: 'url'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function generateTemporaryTableCredential_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateTemporaryTableCredential_ResponseFieldMaskSchema + ); +} + +const generateTemporaryVolumeCredentialFieldMaskSchema: FieldMaskSchema = { + operation: {wire: 'operation'}, + volumeId: {wire: 'volume_id'}, +}; + +export function generateTemporaryVolumeCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateTemporaryVolumeCredentialFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const generateTemporaryVolumeCredential_ResponseFieldMaskSchema: FieldMaskSchema = + { + awsTempCredentials: { + wire: 'aws_temp_credentials', + children: () => awsCredentialsFieldMaskSchema, + }, + azureAad: { + wire: 'azure_aad', + children: () => azureActiveDirectoryTokenFieldMaskSchema, + }, + azureUserDelegationSas: { + wire: 'azure_user_delegation_sas', + children: () => azureUserDelegationSasFieldMaskSchema, + }, + expirationTime: {wire: 'expiration_time'}, + gcpOauthToken: { + wire: 'gcp_oauth_token', + children: () => gcpOauthTokenFieldMaskSchema, + }, + r2TempCredentials: { + wire: 'r2_temp_credentials', + children: () => r2CredentialsFieldMaskSchema, + }, + ucEncryptedToken: { + wire: 'uc_encrypted_token', + children: () => ucEncryptedTokenFieldMaskSchema, + }, + url: {wire: 'url'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function generateTemporaryVolumeCredential_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateTemporaryVolumeCredential_ResponseFieldMaskSchema + ); +} + +const getCredentialFieldMaskSchema: FieldMaskSchema = { + nameArg: {wire: 'name_arg'}, +}; + +export function getCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, getCredentialFieldMaskSchema); +} + +const getStorageCredentialFieldMaskSchema: FieldMaskSchema = { + nameArg: {wire: 'name_arg'}, +}; + +export function getStorageCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getStorageCredentialFieldMaskSchema + ); +} + +const listCredentialsFieldMaskSchema: FieldMaskSchema = { + includeUnbound: {wire: 'include_unbound'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listCredentialsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listCredentialsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listCredentials_ResponseFieldMaskSchema: FieldMaskSchema = { + credentials: {wire: 'credentials'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listCredentials_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listCredentials_ResponseFieldMaskSchema + ); +} + +const listStorageCredentialsFieldMaskSchema: FieldMaskSchema = { + includeUnbound: {wire: 'include_unbound'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listStorageCredentialsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listStorageCredentialsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listStorageCredentials_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + storageCredentials: {wire: 'storage_credentials'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listStorageCredentials_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listStorageCredentials_ResponseFieldMaskSchema + ); +} + +const r2CredentialsFieldMaskSchema: FieldMaskSchema = { + accessKeyId: {wire: 'access_key_id'}, + secretAccessKey: {wire: 'secret_access_key'}, + sessionToken: {wire: 'session_token'}, +}; + +export function r2CredentialsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, r2CredentialsFieldMaskSchema); +} + +const storageCredentialInfoFieldMaskSchema: FieldMaskSchema = { + awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, + azureManagedIdentity: { + wire: 'azure_managed_identity', + children: () => azureManagedIdentityFieldMaskSchema, + }, + azureServicePrincipal: { + wire: 'azure_service_principal', + children: () => azureServicePrincipalFieldMaskSchema, + }, + cloudflareApiToken: { + wire: 'cloudflare_api_token', + children: () => cloudflareApiTokenFieldMaskSchema, + }, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + databricksGcpServiceAccount: { + wire: 'databricks_gcp_service_account', + children: () => databricksGcpServiceAccountFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + gcpServiceAccountKey: { + wire: 'gcp_service_account_key', + children: () => gcpServiceAccountKeyFieldMaskSchema, + }, + id: {wire: 'id'}, + isolationMode: {wire: 'isolation_mode'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + readOnly: {wire: 'read_only'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + usedForManagedStorage: {wire: 'used_for_managed_storage'}, +}; + +export function storageCredentialInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + storageCredentialInfoFieldMaskSchema + ); +} + +const temporaryCredentialsFieldMaskSchema: FieldMaskSchema = { + awsTempCredentials: { + wire: 'aws_temp_credentials', + children: () => awsCredentialsFieldMaskSchema, + }, + azureAad: { + wire: 'azure_aad', + children: () => azureActiveDirectoryTokenFieldMaskSchema, + }, + azureUserDelegationSas: { + wire: 'azure_user_delegation_sas', + children: () => azureUserDelegationSasFieldMaskSchema, + }, + expirationTime: {wire: 'expiration_time'}, + gcpOauthToken: { + wire: 'gcp_oauth_token', + children: () => gcpOauthTokenFieldMaskSchema, + }, + r2TempCredentials: { + wire: 'r2_temp_credentials', + children: () => r2CredentialsFieldMaskSchema, + }, + ucEncryptedToken: { + wire: 'uc_encrypted_token', + children: () => ucEncryptedTokenFieldMaskSchema, + }, + url: {wire: 'url'}, +}; + +export function temporaryCredentialsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + temporaryCredentialsFieldMaskSchema + ); +} + +const ucEncryptedTokenFieldMaskSchema: FieldMaskSchema = { + encryptedPayload: {wire: 'encrypted_payload'}, +}; + +export function ucEncryptedTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + ucEncryptedTokenFieldMaskSchema + ); +} + +const updateCredentialFieldMaskSchema: FieldMaskSchema = { + awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, + azureManagedIdentity: { + wire: 'azure_managed_identity', + children: () => azureManagedIdentityFieldMaskSchema, + }, + azureServicePrincipal: { + wire: 'azure_service_principal', + children: () => azureServicePrincipalFieldMaskSchema, + }, + cloudflareApiToken: { + wire: 'cloudflare_api_token', + children: () => cloudflareApiTokenFieldMaskSchema, + }, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + databricksGcpServiceAccount: { + wire: 'databricks_gcp_service_account', + children: () => databricksGcpServiceAccountFieldMaskSchema, + }, + force: {wire: 'force'}, + fullName: {wire: 'full_name'}, + gcpServiceAccountKey: { + wire: 'gcp_service_account_key', + children: () => gcpServiceAccountKeyFieldMaskSchema, + }, + id: {wire: 'id'}, + isolationMode: {wire: 'isolation_mode'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + nameArg: {wire: 'name_arg'}, + newName: {wire: 'new_name'}, + owner: {wire: 'owner'}, + readOnly: {wire: 'read_only'}, + skipValidation: {wire: 'skip_validation'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + usedForManagedStorage: {wire: 'used_for_managed_storage'}, +}; + +export function updateCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateCredentialFieldMaskSchema + ); +} + +const updateStorageCredentialFieldMaskSchema: FieldMaskSchema = { + awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, + azureManagedIdentity: { + wire: 'azure_managed_identity', + children: () => azureManagedIdentityFieldMaskSchema, + }, + azureServicePrincipal: { + wire: 'azure_service_principal', + children: () => azureServicePrincipalFieldMaskSchema, + }, + cloudflareApiToken: { + wire: 'cloudflare_api_token', + children: () => cloudflareApiTokenFieldMaskSchema, + }, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + databricksGcpServiceAccount: { + wire: 'databricks_gcp_service_account', + children: () => databricksGcpServiceAccountFieldMaskSchema, + }, + force: {wire: 'force'}, + fullName: {wire: 'full_name'}, + gcpServiceAccountKey: { + wire: 'gcp_service_account_key', + children: () => gcpServiceAccountKeyFieldMaskSchema, + }, + id: {wire: 'id'}, + isolationMode: {wire: 'isolation_mode'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + nameArg: {wire: 'name_arg'}, + newName: {wire: 'new_name'}, + owner: {wire: 'owner'}, + readOnly: {wire: 'read_only'}, + skipValidation: {wire: 'skip_validation'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + usedForManagedStorage: {wire: 'used_for_managed_storage'}, +}; + +export function updateStorageCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateStorageCredentialFieldMaskSchema + ); +} + +const validateCredentialFieldMaskSchema: FieldMaskSchema = { + awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, + azureManagedIdentity: { + wire: 'azure_managed_identity', + children: () => azureManagedIdentityFieldMaskSchema, + }, + credentialName: {wire: 'credential_name'}, + databricksGcpServiceAccount: { + wire: 'databricks_gcp_service_account', + children: () => databricksGcpServiceAccountFieldMaskSchema, + }, + externalLocationName: {wire: 'external_location_name'}, + readOnly: {wire: 'read_only'}, + url: {wire: 'url'}, +}; + +export function validateCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + validateCredentialFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const validateCredential_ResponseFieldMaskSchema: FieldMaskSchema = { + isDir: {wire: 'isDir'}, + results: {wire: 'results'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function validateCredential_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + validateCredential_ResponseFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const validateCredential_ValidationResultFieldMaskSchema: FieldMaskSchema = { + message: {wire: 'message'}, + result: {wire: 'result'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function validateCredential_ValidationResultFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + validateCredential_ValidationResultFieldMaskSchema + ); +} + +const validateStorageCredentialFieldMaskSchema: FieldMaskSchema = { + awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, + azureManagedIdentity: { + wire: 'azure_managed_identity', + children: () => azureManagedIdentityFieldMaskSchema, + }, + azureServicePrincipal: { + wire: 'azure_service_principal', + children: () => azureServicePrincipalFieldMaskSchema, + }, + cloudflareApiToken: { + wire: 'cloudflare_api_token', + children: () => cloudflareApiTokenFieldMaskSchema, + }, + databricksGcpServiceAccount: { + wire: 'databricks_gcp_service_account', + children: () => databricksGcpServiceAccountFieldMaskSchema, + }, + externalLocationName: {wire: 'external_location_name'}, + readOnly: {wire: 'read_only'}, + storageCredentialName: {wire: 'storage_credential_name'}, + url: {wire: 'url'}, +}; + +export function validateStorageCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + validateStorageCredentialFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const validateStorageCredential_ResponseFieldMaskSchema: FieldMaskSchema = { + isDir: {wire: 'isDir'}, + results: {wire: 'results'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function validateStorageCredential_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + validateStorageCredential_ResponseFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const validateStorageCredential_ValidationResultFieldMaskSchema: FieldMaskSchema = + { + message: {wire: 'message'}, + operation: {wire: 'operation'}, + result: {wire: 'result'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function validateStorageCredential_ValidationResultFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + validateStorageCredential_ValidationResultFieldMaskSchema + ); +} diff --git a/packages/dataclassification/src/v1/model.ts b/packages/dataclassification/src/v1/model.ts index 4edc639d..7670e7f2 100644 --- a/packages/dataclassification/src/v1/model.ts +++ b/packages/dataclassification/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Auto-tagging mode. */ @@ -173,3 +175,108 @@ export const marshalCatalogConfig_SchemaNamesSchema: z.ZodType = z .transform(d => ({ names: d.names, })); + +const autoTaggingConfigFieldMaskSchema: FieldMaskSchema = { + autoTaggingMode: {wire: 'auto_tagging_mode'}, + classificationTag: {wire: 'classification_tag'}, +}; + +export function autoTaggingConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + autoTaggingConfigFieldMaskSchema + ); +} + +const catalogConfigFieldMaskSchema: FieldMaskSchema = { + autoTagConfigs: {wire: 'auto_tag_configs'}, + effectiveAutoTagConfigs: {wire: 'effective_auto_tag_configs'}, + includedSchemas: { + wire: 'included_schemas', + children: () => catalogConfig_SchemaNamesFieldMaskSchema, + }, + name: {wire: 'name'}, +}; + +export function catalogConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, catalogConfigFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const catalogConfig_SchemaNamesFieldMaskSchema: FieldMaskSchema = { + names: {wire: 'names'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function catalogConfig_SchemaNamesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + catalogConfig_SchemaNamesFieldMaskSchema + ); +} + +const createCatalogConfigRequestFieldMaskSchema: FieldMaskSchema = { + catalogConfig: { + wire: 'catalog_config', + children: () => catalogConfigFieldMaskSchema, + }, + parent: {wire: 'parent'}, +}; + +export function createCatalogConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createCatalogConfigRequestFieldMaskSchema + ); +} + +const deleteCatalogConfigRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteCatalogConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteCatalogConfigRequestFieldMaskSchema + ); +} + +const getCatalogConfigRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getCatalogConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getCatalogConfigRequestFieldMaskSchema + ); +} + +const updateCatalogConfigRequestFieldMaskSchema: FieldMaskSchema = { + catalogConfig: { + wire: 'catalog_config', + children: () => catalogConfigFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateCatalogConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateCatalogConfigRequestFieldMaskSchema + ); +} diff --git a/packages/dataquality/src/v1/model.ts b/packages/dataquality/src/v1/model.ts index f2b0ff22..733b32b5 100644 --- a/packages/dataquality/src/v1/model.ts +++ b/packages/dataquality/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The granularity for aggregating data into time windows based on their timestamp. */ @@ -1107,3 +1109,462 @@ export const marshalValidityCheckConfigurationSchema: z.ZodType = z range_validity_check: d.rangeValidityCheck, uniqueness_validity_check: d.uniquenessValidityCheck, })); + +const anomalyDetectionConfigFieldMaskSchema: FieldMaskSchema = { + anomalyDetectionWorkflowId: {wire: 'anomaly_detection_workflow_id'}, + excludedTableFullNames: {wire: 'excluded_table_full_names'}, + jobType: {wire: 'job_type'}, + publishHealthIndicator: {wire: 'publish_health_indicator'}, + validityCheckConfigurations: {wire: 'validity_check_configurations'}, +}; + +export function anomalyDetectionConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + anomalyDetectionConfigFieldMaskSchema + ); +} + +const cancelRefreshRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, + refreshId: {wire: 'refresh_id'}, +}; + +export function cancelRefreshRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + cancelRefreshRequestFieldMaskSchema + ); +} + +const cancelRefreshResponseFieldMaskSchema: FieldMaskSchema = { + refresh: {wire: 'refresh', children: () => refreshFieldMaskSchema}, +}; + +export function cancelRefreshResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + cancelRefreshResponseFieldMaskSchema + ); +} + +const createMonitorRequestFieldMaskSchema: FieldMaskSchema = { + monitor: {wire: 'monitor', children: () => monitorFieldMaskSchema}, +}; + +export function createMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createMonitorRequestFieldMaskSchema + ); +} + +const createRefreshRequestFieldMaskSchema: FieldMaskSchema = { + refresh: {wire: 'refresh', children: () => refreshFieldMaskSchema}, +}; + +export function createRefreshRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createRefreshRequestFieldMaskSchema + ); +} + +const cronScheduleFieldMaskSchema: FieldMaskSchema = { + pauseStatus: {wire: 'pause_status'}, + quartzCronExpression: {wire: 'quartz_cron_expression'}, + timezoneId: {wire: 'timezone_id'}, +}; + +export function cronScheduleFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, cronScheduleFieldMaskSchema); +} + +const dataProfilingConfigFieldMaskSchema: FieldMaskSchema = { + assetsDir: {wire: 'assets_dir'}, + baselineTableName: {wire: 'baseline_table_name'}, + customMetrics: {wire: 'custom_metrics'}, + dashboardId: {wire: 'dashboard_id'}, + driftMetricsTableName: {wire: 'drift_metrics_table_name'}, + effectiveWarehouseId: {wire: 'effective_warehouse_id'}, + inferenceLog: { + wire: 'inference_log', + children: () => inferenceLogConfigFieldMaskSchema, + }, + latestMonitorFailureMessage: {wire: 'latest_monitor_failure_message'}, + monitorVersion: {wire: 'monitor_version'}, + monitoredTableName: {wire: 'monitored_table_name'}, + notificationSettings: { + wire: 'notification_settings', + children: () => notificationSettingsFieldMaskSchema, + }, + outputSchemaId: {wire: 'output_schema_id'}, + profileMetricsTableName: {wire: 'profile_metrics_table_name'}, + schedule: {wire: 'schedule', children: () => cronScheduleFieldMaskSchema}, + skipBuiltinDashboard: {wire: 'skip_builtin_dashboard'}, + slicingExprs: {wire: 'slicing_exprs'}, + snapshot: {wire: 'snapshot', children: () => snapshotConfigFieldMaskSchema}, + status: {wire: 'status'}, + timeSeries: { + wire: 'time_series', + children: () => timeSeriesConfigFieldMaskSchema, + }, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function dataProfilingConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + dataProfilingConfigFieldMaskSchema + ); +} + +const dataProfilingCustomMetricFieldMaskSchema: FieldMaskSchema = { + definition: {wire: 'definition'}, + inputColumns: {wire: 'input_columns'}, + name: {wire: 'name'}, + outputDataType: {wire: 'output_data_type'}, + type: {wire: 'type'}, +}; + +export function dataProfilingCustomMetricFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + dataProfilingCustomMetricFieldMaskSchema + ); +} + +const deleteMonitorRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, +}; + +export function deleteMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteMonitorRequestFieldMaskSchema + ); +} + +const deleteRefreshRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, + refreshId: {wire: 'refresh_id'}, +}; + +export function deleteRefreshRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteRefreshRequestFieldMaskSchema + ); +} + +const getMonitorRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, +}; + +export function getMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getMonitorRequestFieldMaskSchema + ); +} + +const getRefreshRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, + refreshId: {wire: 'refresh_id'}, +}; + +export function getRefreshRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getRefreshRequestFieldMaskSchema + ); +} + +const inferenceLogConfigFieldMaskSchema: FieldMaskSchema = { + granularities: {wire: 'granularities'}, + labelColumn: {wire: 'label_column'}, + modelIdColumn: {wire: 'model_id_column'}, + predictionColumn: {wire: 'prediction_column'}, + predictionProbabilityColumn: {wire: 'prediction_probability_column'}, + problemType: {wire: 'problem_type'}, + timestampColumn: {wire: 'timestamp_column'}, +}; + +export function inferenceLogConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + inferenceLogConfigFieldMaskSchema + ); +} + +const listMonitorRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listMonitorRequestFieldMaskSchema + ); +} + +const listMonitorResponseFieldMaskSchema: FieldMaskSchema = { + monitors: {wire: 'monitors'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listMonitorResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listMonitorResponseFieldMaskSchema + ); +} + +const listRefreshRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listRefreshRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listRefreshRequestFieldMaskSchema + ); +} + +const listRefreshResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + refreshes: {wire: 'refreshes'}, +}; + +export function listRefreshResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listRefreshResponseFieldMaskSchema + ); +} + +const monitorFieldMaskSchema: FieldMaskSchema = { + anomalyDetectionConfig: { + wire: 'anomaly_detection_config', + children: () => anomalyDetectionConfigFieldMaskSchema, + }, + dataProfilingConfig: { + wire: 'data_profiling_config', + children: () => dataProfilingConfigFieldMaskSchema, + }, + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, +}; + +export function monitorFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, monitorFieldMaskSchema); +} + +const notificationDestinationFieldMaskSchema: FieldMaskSchema = { + emailAddresses: {wire: 'email_addresses'}, +}; + +export function notificationDestinationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + notificationDestinationFieldMaskSchema + ); +} + +const notificationSettingsFieldMaskSchema: FieldMaskSchema = { + onFailure: { + wire: 'on_failure', + children: () => notificationDestinationFieldMaskSchema, + }, +}; + +export function notificationSettingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + notificationSettingsFieldMaskSchema + ); +} + +const percentNullValidityCheckFieldMaskSchema: FieldMaskSchema = { + columnNames: {wire: 'column_names'}, + upperBound: {wire: 'upper_bound'}, +}; + +export function percentNullValidityCheckFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + percentNullValidityCheckFieldMaskSchema + ); +} + +const rangeValidityCheckFieldMaskSchema: FieldMaskSchema = { + columnNames: {wire: 'column_names'}, + lowerBound: {wire: 'lower_bound'}, + upperBound: {wire: 'upper_bound'}, +}; + +export function rangeValidityCheckFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + rangeValidityCheckFieldMaskSchema + ); +} + +const refreshFieldMaskSchema: FieldMaskSchema = { + endTimeMs: {wire: 'end_time_ms'}, + message: {wire: 'message'}, + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, + refreshId: {wire: 'refresh_id'}, + startTimeMs: {wire: 'start_time_ms'}, + state: {wire: 'state'}, + trigger: {wire: 'trigger'}, +}; + +export function refreshFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, refreshFieldMaskSchema); +} + +const snapshotConfigFieldMaskSchema: FieldMaskSchema = {}; + +export function snapshotConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, snapshotConfigFieldMaskSchema); +} + +const timeSeriesConfigFieldMaskSchema: FieldMaskSchema = { + granularities: {wire: 'granularities'}, + timestampColumn: {wire: 'timestamp_column'}, +}; + +export function timeSeriesConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + timeSeriesConfigFieldMaskSchema + ); +} + +const uniquenessValidityCheckFieldMaskSchema: FieldMaskSchema = { + columnNames: {wire: 'column_names'}, +}; + +export function uniquenessValidityCheckFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + uniquenessValidityCheckFieldMaskSchema + ); +} + +const updateMonitorRequestFieldMaskSchema: FieldMaskSchema = { + monitor: {wire: 'monitor', children: () => monitorFieldMaskSchema}, + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateMonitorRequestFieldMaskSchema + ); +} + +const updateRefreshRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, + refresh: {wire: 'refresh', children: () => refreshFieldMaskSchema}, + refreshId: {wire: 'refresh_id'}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateRefreshRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateRefreshRequestFieldMaskSchema + ); +} + +const validityCheckConfigurationFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + percentNullValidityCheck: { + wire: 'percent_null_validity_check', + children: () => percentNullValidityCheckFieldMaskSchema, + }, + rangeValidityCheck: { + wire: 'range_validity_check', + children: () => rangeValidityCheckFieldMaskSchema, + }, + uniquenessValidityCheck: { + wire: 'uniqueness_validity_check', + children: () => uniquenessValidityCheckFieldMaskSchema, + }, +}; + +export function validityCheckConfigurationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + validityCheckConfigurationFieldMaskSchema + ); +} diff --git a/packages/entitytagassignments/src/v1/model.ts b/packages/entitytagassignments/src/v1/model.ts index 3eee37f2..7aa25051 100644 --- a/packages/entitytagassignments/src/v1/model.ts +++ b/packages/entitytagassignments/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Enum representing the source type of a tag assignment */ @@ -160,3 +162,118 @@ export const marshalListEntityTagAssignmentsResponseSchema: z.ZodType = z tag_assignments: d.tagAssignments, next_page_token: d.nextPageToken, })); + +const createEntityTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { + tagAssignment: { + wire: 'tag_assignment', + children: () => entityTagAssignmentFieldMaskSchema, + }, +}; + +export function createEntityTagAssignmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createEntityTagAssignmentRequestFieldMaskSchema + ); +} + +const deleteEntityTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { + entityName: {wire: 'entity_name'}, + entityType: {wire: 'entity_type'}, + tagKey: {wire: 'tag_key'}, +}; + +export function deleteEntityTagAssignmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteEntityTagAssignmentRequestFieldMaskSchema + ); +} + +const entityTagAssignmentFieldMaskSchema: FieldMaskSchema = { + entityName: {wire: 'entity_name'}, + entityType: {wire: 'entity_type'}, + inherited: {wire: 'inherited'}, + sourceType: {wire: 'source_type'}, + tagKey: {wire: 'tag_key'}, + tagValue: {wire: 'tag_value'}, + updateTime: {wire: 'update_time'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function entityTagAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + entityTagAssignmentFieldMaskSchema + ); +} + +const getEntityTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { + entityName: {wire: 'entity_name'}, + entityType: {wire: 'entity_type'}, + includeInherited: {wire: 'include_inherited'}, + tagKey: {wire: 'tag_key'}, +}; + +export function getEntityTagAssignmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getEntityTagAssignmentRequestFieldMaskSchema + ); +} + +const listEntityTagAssignmentsRequestFieldMaskSchema: FieldMaskSchema = { + entityName: {wire: 'entity_name'}, + entityType: {wire: 'entity_type'}, + includeInherited: {wire: 'include_inherited'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listEntityTagAssignmentsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listEntityTagAssignmentsRequestFieldMaskSchema + ); +} + +const listEntityTagAssignmentsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + tagAssignments: {wire: 'tag_assignments'}, +}; + +export function listEntityTagAssignmentsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listEntityTagAssignmentsResponseFieldMaskSchema + ); +} + +const updateEntityTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { + tagAssignment: { + wire: 'tag_assignment', + children: () => entityTagAssignmentFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateEntityTagAssignmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateEntityTagAssignmentRequestFieldMaskSchema + ); +} diff --git a/packages/environments/src/v1/model.ts b/packages/environments/src/v1/model.ts index 71c09f1c..d8480334 100644 --- a/packages/environments/src/v1/model.ts +++ b/packages/environments/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** If changed, also update estore/namespaces/defaultbaseenvironments/latest.proto */ @@ -964,3 +966,244 @@ export const marshalWorkspaceBaseEnvironmentSchema: z.ZodType = z export const marshalWorkspaceBaseEnvironmentOperationMetadataSchema: z.ZodType = z.object({}); + +const createWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { + requestId: {wire: 'request_id'}, + workspaceBaseEnvironment: { + wire: 'workspace_base_environment', + children: () => workspaceBaseEnvironmentFieldMaskSchema, + }, + workspaceBaseEnvironmentId: {wire: 'workspace_base_environment_id'}, +}; + +export function createWorkspaceBaseEnvironmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createWorkspaceBaseEnvironmentRequestFieldMaskSchema + ); +} + +const databricksServiceExceptionWithDetailsProtoFieldMaskSchema: FieldMaskSchema = + { + details: {wire: 'details'}, + errorCode: {wire: 'error_code'}, + message: {wire: 'message'}, + stackTrace: {wire: 'stack_trace'}, + }; + +export function databricksServiceExceptionWithDetailsProtoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + databricksServiceExceptionWithDetailsProtoFieldMaskSchema + ); +} + +const defaultWorkspaceBaseEnvironmentFieldMaskSchema: FieldMaskSchema = { + cpuWorkspaceBaseEnvironment: {wire: 'cpu_workspace_base_environment'}, + gpuWorkspaceBaseEnvironment: {wire: 'gpu_workspace_base_environment'}, + name: {wire: 'name'}, +}; + +export function defaultWorkspaceBaseEnvironmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + defaultWorkspaceBaseEnvironmentFieldMaskSchema + ); +} + +const deleteWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteWorkspaceBaseEnvironmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteWorkspaceBaseEnvironmentRequestFieldMaskSchema + ); +} + +const getDefaultWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = + { + name: {wire: 'name'}, + }; + +export function getDefaultWorkspaceBaseEnvironmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getDefaultWorkspaceBaseEnvironmentRequestFieldMaskSchema + ); +} + +const getOperationRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getOperationRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getOperationRequestFieldMaskSchema + ); +} + +const getWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getWorkspaceBaseEnvironmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceBaseEnvironmentRequestFieldMaskSchema + ); +} + +const listWorkspaceBaseEnvironmentsRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listWorkspaceBaseEnvironmentsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceBaseEnvironmentsRequestFieldMaskSchema + ); +} + +const listWorkspaceBaseEnvironmentsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + workspaceBaseEnvironments: {wire: 'workspace_base_environments'}, +}; + +export function listWorkspaceBaseEnvironmentsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceBaseEnvironmentsResponseFieldMaskSchema + ); +} + +const operationFieldMaskSchema: FieldMaskSchema = { + done: {wire: 'done'}, + error: { + wire: 'error', + children: () => databricksServiceExceptionWithDetailsProtoFieldMaskSchema, + }, + metadata: {wire: 'metadata'}, + name: {wire: 'name'}, + response: {wire: 'response'}, +}; + +export function operationFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, operationFieldMaskSchema); +} + +const refreshWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function refreshWorkspaceBaseEnvironmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + refreshWorkspaceBaseEnvironmentRequestFieldMaskSchema + ); +} + +const updateDefaultWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = + { + defaultWorkspaceBaseEnvironment: { + wire: 'default_workspace_base_environment', + children: () => defaultWorkspaceBaseEnvironmentFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, + }; + +export function updateDefaultWorkspaceBaseEnvironmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateDefaultWorkspaceBaseEnvironmentRequestFieldMaskSchema + ); +} + +const updateWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + workspaceBaseEnvironment: { + wire: 'workspace_base_environment', + children: () => workspaceBaseEnvironmentFieldMaskSchema, + }, +}; + +export function updateWorkspaceBaseEnvironmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateWorkspaceBaseEnvironmentRequestFieldMaskSchema + ); +} + +const workspaceBaseEnvironmentFieldMaskSchema: FieldMaskSchema = { + baseEnvironmentProvider: {wire: 'base_environment_provider'}, + baseEnvironmentType: {wire: 'base_environment_type'}, + createTime: {wire: 'create_time'}, + creatorUserId: {wire: 'creator_user_id'}, + displayName: {wire: 'display_name'}, + filepath: {wire: 'filepath'}, + isDefault: {wire: 'is_default'}, + lastUpdatedUserId: {wire: 'last_updated_user_id'}, + message: {wire: 'message'}, + name: {wire: 'name'}, + status: {wire: 'status'}, + updateTime: {wire: 'update_time'}, +}; + +export function workspaceBaseEnvironmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + workspaceBaseEnvironmentFieldMaskSchema + ); +} + +const workspaceBaseEnvironmentCacheFieldMaskSchema: FieldMaskSchema = {}; + +export function workspaceBaseEnvironmentCacheFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + workspaceBaseEnvironmentCacheFieldMaskSchema + ); +} + +const workspaceBaseEnvironmentOperationMetadataFieldMaskSchema: FieldMaskSchema = + {}; + +export function workspaceBaseEnvironmentOperationMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + workspaceBaseEnvironmentOperationMetadataFieldMaskSchema + ); +} diff --git a/packages/externallocations/src/v1/model.ts b/packages/externallocations/src/v1/model.ts index 31bf7488..ae3fb78d 100644 --- a/packages/externallocations/src/v1/model.ts +++ b/packages/externallocations/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum IsolationMode { @@ -785,3 +787,300 @@ export const marshalUpdateExternalLocationSchema: z.ZodType = z effective_enable_file_events: d.effectiveEnableFileEvents, effective_file_event_queue: d.effectiveFileEventQueue, })); + +const awsSqsQueueFieldMaskSchema: FieldMaskSchema = { + managedResourceId: {wire: 'managed_resource_id'}, + queueUrl: {wire: 'queue_url'}, +}; + +export function awsSqsQueueFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, awsSqsQueueFieldMaskSchema); +} + +const azureQueueStorageFieldMaskSchema: FieldMaskSchema = { + managedResourceId: {wire: 'managed_resource_id'}, + queueUrl: {wire: 'queue_url'}, + resourceGroup: {wire: 'resource_group'}, + subscriptionId: {wire: 'subscription_id'}, +}; + +export function azureQueueStorageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + azureQueueStorageFieldMaskSchema + ); +} + +const createExternalLocationFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + credentialId: {wire: 'credential_id'}, + credentialName: {wire: 'credential_name'}, + effectiveEnableFileEvents: {wire: 'effective_enable_file_events'}, + effectiveFileEventQueue: { + wire: 'effective_file_event_queue', + children: () => fileEventQueueFieldMaskSchema, + }, + enableFileEvents: {wire: 'enable_file_events'}, + encryptionDetails: { + wire: 'encryption_details', + children: () => encryptionDetailsFieldMaskSchema, + }, + fallback: {wire: 'fallback'}, + fileEventQueue: { + wire: 'file_event_queue', + children: () => fileEventQueueFieldMaskSchema, + }, + isolationMode: {wire: 'isolation_mode'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + readOnly: {wire: 'read_only'}, + skipValidation: {wire: 'skip_validation'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + url: {wire: 'url'}, +}; + +export function createExternalLocationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createExternalLocationFieldMaskSchema + ); +} + +const deleteExternalLocationFieldMaskSchema: FieldMaskSchema = { + force: {wire: 'force'}, + nameArg: {wire: 'name_arg'}, +}; + +export function deleteExternalLocationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteExternalLocationFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteExternalLocation_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteExternalLocation_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteExternalLocation_ResponseFieldMaskSchema + ); +} + +const encryptionDetailsFieldMaskSchema: FieldMaskSchema = { + sseEncryptionDetails: { + wire: 'sse_encryption_details', + children: () => sseEncryptionDetailsFieldMaskSchema, + }, +}; + +export function encryptionDetailsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + encryptionDetailsFieldMaskSchema + ); +} + +const externalLocationInfoFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + credentialId: {wire: 'credential_id'}, + credentialName: {wire: 'credential_name'}, + effectiveEnableFileEvents: {wire: 'effective_enable_file_events'}, + effectiveFileEventQueue: { + wire: 'effective_file_event_queue', + children: () => fileEventQueueFieldMaskSchema, + }, + enableFileEvents: {wire: 'enable_file_events'}, + encryptionDetails: { + wire: 'encryption_details', + children: () => encryptionDetailsFieldMaskSchema, + }, + fallback: {wire: 'fallback'}, + fileEventQueue: { + wire: 'file_event_queue', + children: () => fileEventQueueFieldMaskSchema, + }, + isolationMode: {wire: 'isolation_mode'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + readOnly: {wire: 'read_only'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + url: {wire: 'url'}, +}; + +export function externalLocationInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + externalLocationInfoFieldMaskSchema + ); +} + +const fileEventQueueFieldMaskSchema: FieldMaskSchema = { + managedAqs: { + wire: 'managed_aqs', + children: () => azureQueueStorageFieldMaskSchema, + }, + managedPubsub: { + wire: 'managed_pubsub', + children: () => gcpPubsubFieldMaskSchema, + }, + managedSqs: {wire: 'managed_sqs', children: () => awsSqsQueueFieldMaskSchema}, + providedAqs: { + wire: 'provided_aqs', + children: () => azureQueueStorageFieldMaskSchema, + }, + providedPubsub: { + wire: 'provided_pubsub', + children: () => gcpPubsubFieldMaskSchema, + }, + providedSqs: { + wire: 'provided_sqs', + children: () => awsSqsQueueFieldMaskSchema, + }, +}; + +export function fileEventQueueFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, fileEventQueueFieldMaskSchema); +} + +const gcpPubsubFieldMaskSchema: FieldMaskSchema = { + managedResourceId: {wire: 'managed_resource_id'}, + subscriptionName: {wire: 'subscription_name'}, +}; + +export function gcpPubsubFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, gcpPubsubFieldMaskSchema); +} + +const getExternalLocationFieldMaskSchema: FieldMaskSchema = { + includeBrowse: {wire: 'include_browse'}, + nameArg: {wire: 'name_arg'}, +}; + +export function getExternalLocationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getExternalLocationFieldMaskSchema + ); +} + +const listExternalLocationsFieldMaskSchema: FieldMaskSchema = { + includeBrowse: {wire: 'include_browse'}, + includeUnbound: {wire: 'include_unbound'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listExternalLocationsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listExternalLocationsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listExternalLocations_ResponseFieldMaskSchema: FieldMaskSchema = { + externalLocations: {wire: 'external_locations'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listExternalLocations_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listExternalLocations_ResponseFieldMaskSchema + ); +} + +const sseEncryptionDetailsFieldMaskSchema: FieldMaskSchema = { + algorithm: {wire: 'algorithm'}, + awsKmsKeyArn: {wire: 'aws_kms_key_arn'}, +}; + +export function sseEncryptionDetailsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + sseEncryptionDetailsFieldMaskSchema + ); +} + +const updateExternalLocationFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + credentialId: {wire: 'credential_id'}, + credentialName: {wire: 'credential_name'}, + effectiveEnableFileEvents: {wire: 'effective_enable_file_events'}, + effectiveFileEventQueue: { + wire: 'effective_file_event_queue', + children: () => fileEventQueueFieldMaskSchema, + }, + enableFileEvents: {wire: 'enable_file_events'}, + encryptionDetails: { + wire: 'encryption_details', + children: () => encryptionDetailsFieldMaskSchema, + }, + fallback: {wire: 'fallback'}, + fileEventQueue: { + wire: 'file_event_queue', + children: () => fileEventQueueFieldMaskSchema, + }, + force: {wire: 'force'}, + isolationMode: {wire: 'isolation_mode'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + nameArg: {wire: 'name_arg'}, + newName: {wire: 'new_name'}, + owner: {wire: 'owner'}, + readOnly: {wire: 'read_only'}, + skipValidation: {wire: 'skip_validation'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + url: {wire: 'url'}, +}; + +export function updateExternalLocationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateExternalLocationFieldMaskSchema + ); +} diff --git a/packages/features/src/v1/model.ts b/packages/features/src/v1/model.ts index 1fe62f64..6cb3c10f 100644 --- a/packages/features/src/v1/model.ts +++ b/packages/features/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** @@ -1786,3 +1788,879 @@ export const marshalVarSampFunctionSchema: z.ZodType = z .transform(d => ({ input: d.input, })); + +const aggregationFunctionFieldMaskSchema: FieldMaskSchema = { + approxCountDistinct: { + wire: 'approx_count_distinct', + children: () => approxCountDistinctFunctionFieldMaskSchema, + }, + approxPercentile: { + wire: 'approx_percentile', + children: () => approxPercentileFunctionFieldMaskSchema, + }, + avg: {wire: 'avg', children: () => avgFunctionFieldMaskSchema}, + countFunction: { + wire: 'count_function', + children: () => countFunctionFieldMaskSchema, + }, + first: {wire: 'first', children: () => firstFunctionFieldMaskSchema}, + last: {wire: 'last', children: () => lastFunctionFieldMaskSchema}, + max: {wire: 'max', children: () => maxFunctionFieldMaskSchema}, + min: {wire: 'min', children: () => minFunctionFieldMaskSchema}, + stddevPop: { + wire: 'stddev_pop', + children: () => stddevPopFunctionFieldMaskSchema, + }, + stddevSamp: { + wire: 'stddev_samp', + children: () => stddevSampFunctionFieldMaskSchema, + }, + sum: {wire: 'sum', children: () => sumFunctionFieldMaskSchema}, + timeWindow: {wire: 'time_window', children: () => timeWindowFieldMaskSchema}, + varPop: {wire: 'var_pop', children: () => varPopFunctionFieldMaskSchema}, + varSamp: {wire: 'var_samp', children: () => varSampFunctionFieldMaskSchema}, +}; + +export function aggregationFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + aggregationFunctionFieldMaskSchema + ); +} + +const approxCountDistinctFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, + relativeSd: {wire: 'relative_sd'}, +}; + +export function approxCountDistinctFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + approxCountDistinctFunctionFieldMaskSchema + ); +} + +const approxPercentileFunctionFieldMaskSchema: FieldMaskSchema = { + accuracy: {wire: 'accuracy'}, + input: {wire: 'input'}, + percentile: {wire: 'percentile'}, +}; + +export function approxPercentileFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + approxPercentileFunctionFieldMaskSchema + ); +} + +const authConfigFieldMaskSchema: FieldMaskSchema = { + ucServiceCredentialName: {wire: 'uc_service_credential_name'}, +}; + +export function authConfigFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, authConfigFieldMaskSchema); +} + +const avgFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function avgFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, avgFunctionFieldMaskSchema); +} + +const backfillSourceFieldMaskSchema: FieldMaskSchema = { + deltaTableSource: { + wire: 'delta_table_source', + children: () => deltaTableSourceFieldMaskSchema, + }, +}; + +export function backfillSourceFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, backfillSourceFieldMaskSchema); +} + +const batchCreateMaterializedFeaturesRequestFieldMaskSchema: FieldMaskSchema = { + requests: {wire: 'requests'}, +}; + +export function batchCreateMaterializedFeaturesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + batchCreateMaterializedFeaturesRequestFieldMaskSchema + ); +} + +const batchCreateMaterializedFeaturesResponseFieldMaskSchema: FieldMaskSchema = + { + materializedFeatures: {wire: 'materialized_features'}, + }; + +export function batchCreateMaterializedFeaturesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + batchCreateMaterializedFeaturesResponseFieldMaskSchema + ); +} + +const columnIdentifierFieldMaskSchema: FieldMaskSchema = { + variantExprPath: {wire: 'variant_expr_path'}, +}; + +export function columnIdentifierFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + columnIdentifierFieldMaskSchema + ); +} + +const columnSelectionFieldMaskSchema: FieldMaskSchema = { + column: {wire: 'column'}, +}; + +export function columnSelectionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + columnSelectionFieldMaskSchema + ); +} + +const continuousWindowFieldMaskSchema: FieldMaskSchema = { + offset: {wire: 'offset'}, + windowDuration: {wire: 'window_duration'}, +}; + +export function continuousWindowFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + continuousWindowFieldMaskSchema + ); +} + +const countFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function countFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, countFunctionFieldMaskSchema); +} + +const createFeatureRequestFieldMaskSchema: FieldMaskSchema = { + feature: {wire: 'feature', children: () => featureFieldMaskSchema}, +}; + +export function createFeatureRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createFeatureRequestFieldMaskSchema + ); +} + +const createKafkaConfigRequestFieldMaskSchema: FieldMaskSchema = { + kafkaConfig: { + wire: 'kafka_config', + children: () => kafkaConfigFieldMaskSchema, + }, +}; + +export function createKafkaConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createKafkaConfigRequestFieldMaskSchema + ); +} + +const createMaterializedFeatureRequestFieldMaskSchema: FieldMaskSchema = { + materializedFeature: { + wire: 'materialized_feature', + children: () => materializedFeatureFieldMaskSchema, + }, +}; + +export function createMaterializedFeatureRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createMaterializedFeatureRequestFieldMaskSchema + ); +} + +const dataSourceFieldMaskSchema: FieldMaskSchema = { + deltaTableSource: { + wire: 'delta_table_source', + children: () => deltaTableSourceFieldMaskSchema, + }, + kafkaSource: { + wire: 'kafka_source', + children: () => kafkaSourceFieldMaskSchema, + }, + requestSource: { + wire: 'request_source', + children: () => requestSourceFieldMaskSchema, + }, +}; + +export function dataSourceFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, dataSourceFieldMaskSchema); +} + +const deleteFeatureRequestFieldMaskSchema: FieldMaskSchema = { + fullName: {wire: 'full_name'}, +}; + +export function deleteFeatureRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteFeatureRequestFieldMaskSchema + ); +} + +const deleteKafkaConfigRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteKafkaConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteKafkaConfigRequestFieldMaskSchema + ); +} + +const deleteMaterializedFeatureRequestFieldMaskSchema: FieldMaskSchema = { + materializedFeatureId: {wire: 'materialized_feature_id'}, +}; + +export function deleteMaterializedFeatureRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteMaterializedFeatureRequestFieldMaskSchema + ); +} + +const deltaTableSourceFieldMaskSchema: FieldMaskSchema = { + dataframeSchema: {wire: 'dataframe_schema'}, + entityColumns: {wire: 'entity_columns'}, + filterCondition: {wire: 'filter_condition'}, + fullName: {wire: 'full_name'}, + timeseriesColumn: {wire: 'timeseries_column'}, + transformationSql: {wire: 'transformation_sql'}, +}; + +export function deltaTableSourceFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deltaTableSourceFieldMaskSchema + ); +} + +const entityColumnFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function entityColumnFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, entityColumnFieldMaskSchema); +} + +const featureFieldMaskSchema: FieldMaskSchema = { + description: {wire: 'description'}, + entities: {wire: 'entities'}, + filterCondition: {wire: 'filter_condition'}, + fullName: {wire: 'full_name'}, + function: {wire: 'function', children: () => functionFieldMaskSchema}, + inputs: {wire: 'inputs'}, + lineageContext: { + wire: 'lineage_context', + children: () => lineageContextFieldMaskSchema, + }, + source: {wire: 'source', children: () => dataSourceFieldMaskSchema}, + timeWindow: {wire: 'time_window', children: () => timeWindowFieldMaskSchema}, + timeseriesColumn: { + wire: 'timeseries_column', + children: () => timeseriesColumnFieldMaskSchema, + }, +}; + +export function featureFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, featureFieldMaskSchema); +} + +const fieldDefinitionFieldMaskSchema: FieldMaskSchema = { + dataType: {wire: 'data_type'}, + name: {wire: 'name'}, +}; + +export function fieldDefinitionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + fieldDefinitionFieldMaskSchema + ); +} + +const firstFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function firstFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, firstFunctionFieldMaskSchema); +} + +const flatSchemaFieldMaskSchema: FieldMaskSchema = { + fields: {wire: 'fields'}, +}; + +export function flatSchemaFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, flatSchemaFieldMaskSchema); +} + +const functionFieldMaskSchema: FieldMaskSchema = { + aggregationFunction: { + wire: 'aggregation_function', + children: () => aggregationFunctionFieldMaskSchema, + }, + columnSelection: { + wire: 'column_selection', + children: () => columnSelectionFieldMaskSchema, + }, + extraParameters: {wire: 'extra_parameters'}, + functionType: {wire: 'function_type'}, +}; + +export function functionFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, functionFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const function_ExtraParameterFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function function_ExtraParameterFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + function_ExtraParameterFieldMaskSchema + ); +} + +const getFeatureRequestFieldMaskSchema: FieldMaskSchema = { + fullName: {wire: 'full_name'}, +}; + +export function getFeatureRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getFeatureRequestFieldMaskSchema + ); +} + +const getKafkaConfigRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getKafkaConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getKafkaConfigRequestFieldMaskSchema + ); +} + +const getMaterializedFeatureRequestFieldMaskSchema: FieldMaskSchema = { + materializedFeatureId: {wire: 'materialized_feature_id'}, +}; + +export function getMaterializedFeatureRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getMaterializedFeatureRequestFieldMaskSchema + ); +} + +const jobContextFieldMaskSchema: FieldMaskSchema = { + jobId: {wire: 'job_id'}, + jobRunId: {wire: 'job_run_id'}, +}; + +export function jobContextFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, jobContextFieldMaskSchema); +} + +const kafkaConfigFieldMaskSchema: FieldMaskSchema = { + authConfig: {wire: 'auth_config', children: () => authConfigFieldMaskSchema}, + backfillSource: { + wire: 'backfill_source', + children: () => backfillSourceFieldMaskSchema, + }, + bootstrapServers: {wire: 'bootstrap_servers'}, + extraOptions: {wire: 'extra_options'}, + keySchema: {wire: 'key_schema', children: () => schemaConfigFieldMaskSchema}, + name: {wire: 'name'}, + subscriptionMode: { + wire: 'subscription_mode', + children: () => subscriptionModeFieldMaskSchema, + }, + valueSchema: { + wire: 'value_schema', + children: () => schemaConfigFieldMaskSchema, + }, +}; + +export function kafkaConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, kafkaConfigFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const kafkaConfig_ExtraOptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function kafkaConfig_ExtraOptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + kafkaConfig_ExtraOptionsEntryFieldMaskSchema + ); +} + +const kafkaSourceFieldMaskSchema: FieldMaskSchema = { + entityColumnIdentifiers: {wire: 'entity_column_identifiers'}, + filterCondition: {wire: 'filter_condition'}, + name: {wire: 'name'}, + timeseriesColumnIdentifier: { + wire: 'timeseries_column_identifier', + children: () => columnIdentifierFieldMaskSchema, + }, +}; + +export function kafkaSourceFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, kafkaSourceFieldMaskSchema); +} + +const lastFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function lastFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, lastFunctionFieldMaskSchema); +} + +const lineageContextFieldMaskSchema: FieldMaskSchema = { + jobContext: {wire: 'job_context', children: () => jobContextFieldMaskSchema}, + notebookId: {wire: 'notebook_id'}, +}; + +export function lineageContextFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, lineageContextFieldMaskSchema); +} + +const listFeaturesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listFeaturesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listFeaturesRequestFieldMaskSchema + ); +} + +const listFeaturesResponseFieldMaskSchema: FieldMaskSchema = { + features: {wire: 'features'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listFeaturesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listFeaturesResponseFieldMaskSchema + ); +} + +const listKafkaConfigsRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listKafkaConfigsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listKafkaConfigsRequestFieldMaskSchema + ); +} + +const listKafkaConfigsResponseFieldMaskSchema: FieldMaskSchema = { + kafkaConfigs: {wire: 'kafka_configs'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listKafkaConfigsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listKafkaConfigsResponseFieldMaskSchema + ); +} + +const listMaterializedFeaturesRequestFieldMaskSchema: FieldMaskSchema = { + featureName: {wire: 'feature_name'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listMaterializedFeaturesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listMaterializedFeaturesRequestFieldMaskSchema + ); +} + +const listMaterializedFeaturesResponseFieldMaskSchema: FieldMaskSchema = { + materializedFeatures: {wire: 'materialized_features'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listMaterializedFeaturesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listMaterializedFeaturesResponseFieldMaskSchema + ); +} + +const materializedFeatureFieldMaskSchema: FieldMaskSchema = { + cronSchedule: {wire: 'cron_schedule'}, + featureName: {wire: 'feature_name'}, + isOnline: {wire: 'is_online'}, + lastMaterializationTime: {wire: 'last_materialization_time'}, + materializedFeatureId: {wire: 'materialized_feature_id'}, + offlineStoreConfig: { + wire: 'offline_store_config', + children: () => offlineStoreConfigFieldMaskSchema, + }, + onlineStoreConfig: { + wire: 'online_store_config', + children: () => onlineStoreConfigFieldMaskSchema, + }, + pipelineScheduleState: {wire: 'pipeline_schedule_state'}, + tableName: {wire: 'table_name'}, +}; + +export function materializedFeatureFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + materializedFeatureFieldMaskSchema + ); +} + +const maxFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function maxFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, maxFunctionFieldMaskSchema); +} + +const minFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function minFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, minFunctionFieldMaskSchema); +} + +const offlineStoreConfigFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, + schemaName: {wire: 'schema_name'}, + tableNamePrefix: {wire: 'table_name_prefix'}, +}; + +export function offlineStoreConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + offlineStoreConfigFieldMaskSchema + ); +} + +const onlineStoreConfigFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, + onlineStoreName: {wire: 'online_store_name'}, + schemaName: {wire: 'schema_name'}, + tableNamePrefix: {wire: 'table_name_prefix'}, +}; + +export function onlineStoreConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + onlineStoreConfigFieldMaskSchema + ); +} + +const requestSourceFieldMaskSchema: FieldMaskSchema = { + flatSchema: {wire: 'flat_schema', children: () => flatSchemaFieldMaskSchema}, +}; + +export function requestSourceFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, requestSourceFieldMaskSchema); +} + +const schemaConfigFieldMaskSchema: FieldMaskSchema = { + jsonSchema: {wire: 'json_schema'}, +}; + +export function schemaConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, schemaConfigFieldMaskSchema); +} + +const slidingWindowFieldMaskSchema: FieldMaskSchema = { + slideDuration: {wire: 'slide_duration'}, + windowDuration: {wire: 'window_duration'}, +}; + +export function slidingWindowFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, slidingWindowFieldMaskSchema); +} + +const stddevPopFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function stddevPopFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + stddevPopFunctionFieldMaskSchema + ); +} + +const stddevSampFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function stddevSampFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + stddevSampFunctionFieldMaskSchema + ); +} + +const subscriptionModeFieldMaskSchema: FieldMaskSchema = { + assign: {wire: 'assign'}, + subscribe: {wire: 'subscribe'}, + subscribePattern: {wire: 'subscribe_pattern'}, +}; + +export function subscriptionModeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + subscriptionModeFieldMaskSchema + ); +} + +const sumFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function sumFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, sumFunctionFieldMaskSchema); +} + +const timeWindowFieldMaskSchema: FieldMaskSchema = { + continuous: { + wire: 'continuous', + children: () => continuousWindowFieldMaskSchema, + }, + sliding: {wire: 'sliding', children: () => slidingWindowFieldMaskSchema}, + tumbling: {wire: 'tumbling', children: () => tumblingWindowFieldMaskSchema}, +}; + +export function timeWindowFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, timeWindowFieldMaskSchema); +} + +const timeseriesColumnFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function timeseriesColumnFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + timeseriesColumnFieldMaskSchema + ); +} + +const tumblingWindowFieldMaskSchema: FieldMaskSchema = { + windowDuration: {wire: 'window_duration'}, +}; + +export function tumblingWindowFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, tumblingWindowFieldMaskSchema); +} + +const updateFeatureRequestFieldMaskSchema: FieldMaskSchema = { + feature: {wire: 'feature', children: () => featureFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateFeatureRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateFeatureRequestFieldMaskSchema + ); +} + +const updateKafkaConfigRequestFieldMaskSchema: FieldMaskSchema = { + kafkaConfig: { + wire: 'kafka_config', + children: () => kafkaConfigFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateKafkaConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateKafkaConfigRequestFieldMaskSchema + ); +} + +const updateMaterializedFeatureRequestFieldMaskSchema: FieldMaskSchema = { + materializedFeature: { + wire: 'materialized_feature', + children: () => materializedFeatureFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateMaterializedFeatureRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateMaterializedFeatureRequestFieldMaskSchema + ); +} + +const varPopFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function varPopFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, varPopFunctionFieldMaskSchema); +} + +const varSampFunctionFieldMaskSchema: FieldMaskSchema = { + input: {wire: 'input'}, +}; + +export function varSampFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + varSampFunctionFieldMaskSchema + ); +} diff --git a/packages/featurestore/src/v1/model.ts b/packages/featurestore/src/v1/model.ts index 54c01379..c71a3a6c 100644 --- a/packages/featurestore/src/v1/model.ts +++ b/packages/featurestore/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name. @@ -258,3 +260,162 @@ export const marshalPublishTableResponseSchema: z.ZodType = z online_table_name: d.onlineTableName, pipeline_id: d.pipelineId, })); + +const createOnlineStoreRequestFieldMaskSchema: FieldMaskSchema = { + onlineStore: { + wire: 'online_store', + children: () => onlineStoreFieldMaskSchema, + }, +}; + +export function createOnlineStoreRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createOnlineStoreRequestFieldMaskSchema + ); +} + +const deleteOnlineStoreRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteOnlineStoreRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteOnlineStoreRequestFieldMaskSchema + ); +} + +const deleteOnlineTableRequestFieldMaskSchema: FieldMaskSchema = { + onlineTableName: {wire: 'online_table_name'}, +}; + +export function deleteOnlineTableRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteOnlineTableRequestFieldMaskSchema + ); +} + +const getOnlineStoreRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getOnlineStoreRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getOnlineStoreRequestFieldMaskSchema + ); +} + +const listOnlineStoresRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listOnlineStoresRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listOnlineStoresRequestFieldMaskSchema + ); +} + +const listOnlineStoresResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + onlineStores: {wire: 'online_stores'}, +}; + +export function listOnlineStoresResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listOnlineStoresResponseFieldMaskSchema + ); +} + +const onlineStoreFieldMaskSchema: FieldMaskSchema = { + capacity: {wire: 'capacity'}, + creationTime: {wire: 'creation_time'}, + creator: {wire: 'creator'}, + name: {wire: 'name'}, + readReplicaCount: {wire: 'read_replica_count'}, + state: {wire: 'state'}, + usagePolicyId: {wire: 'usage_policy_id'}, +}; + +export function onlineStoreFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, onlineStoreFieldMaskSchema); +} + +const publishSpecFieldMaskSchema: FieldMaskSchema = { + onlineStore: {wire: 'online_store'}, + onlineTableName: {wire: 'online_table_name'}, + publishMode: {wire: 'publish_mode'}, +}; + +export function publishSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, publishSpecFieldMaskSchema); +} + +const publishTableRequestFieldMaskSchema: FieldMaskSchema = { + publishSpec: { + wire: 'publish_spec', + children: () => publishSpecFieldMaskSchema, + }, + sourceTableName: {wire: 'source_table_name'}, +}; + +export function publishTableRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + publishTableRequestFieldMaskSchema + ); +} + +const publishTableResponseFieldMaskSchema: FieldMaskSchema = { + onlineTableName: {wire: 'online_table_name'}, + pipelineId: {wire: 'pipeline_id'}, +}; + +export function publishTableResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + publishTableResponseFieldMaskSchema + ); +} + +const updateOnlineStoreRequestFieldMaskSchema: FieldMaskSchema = { + onlineStore: { + wire: 'online_store', + children: () => onlineStoreFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateOnlineStoreRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateOnlineStoreRequestFieldMaskSchema + ); +} diff --git a/packages/files/src/v2/model.ts b/packages/files/src/v2/model.ts index 869fb2a2..e6f0e31e 100644 --- a/packages/files/src/v2/model.ts +++ b/packages/files/src/v2/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface AddBlock { @@ -457,3 +459,232 @@ export const marshalRead_ResponseSchema: z.ZodType = z bytes_read: d.bytesRead, data: d.data, })); + +const addBlockFieldMaskSchema: FieldMaskSchema = { + data: {wire: 'data'}, + handle: {wire: 'handle'}, +}; + +export function addBlockFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, addBlockFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const addBlock_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function addBlock_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + addBlock_ResponseFieldMaskSchema + ); +} + +const closeFieldMaskSchema: FieldMaskSchema = { + handle: {wire: 'handle'}, +}; + +export function closeFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, closeFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const close_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function close_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, close_ResponseFieldMaskSchema); +} + +const createFieldMaskSchema: FieldMaskSchema = { + overwrite: {wire: 'overwrite'}, + path: {wire: 'path'}, +}; + +export function createFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, createFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const create_ResponseFieldMaskSchema: FieldMaskSchema = { + handle: {wire: 'handle'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function create_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + create_ResponseFieldMaskSchema + ); +} + +const deleteFieldMaskSchema: FieldMaskSchema = { + path: {wire: 'path'}, + recursive: {wire: 'recursive'}, +}; + +export function deleteFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, deleteFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const delete_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function delete_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + delete_ResponseFieldMaskSchema + ); +} + +const fileInfoFieldMaskSchema: FieldMaskSchema = { + fileSize: {wire: 'file_size'}, + isDir: {wire: 'is_dir'}, + modificationTime: {wire: 'modification_time'}, + path: {wire: 'path'}, +}; + +export function fileInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, fileInfoFieldMaskSchema); +} + +const getStatusFieldMaskSchema: FieldMaskSchema = { + path: {wire: 'path'}, +}; + +export function getStatusFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getStatusFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getStatus_ResponseFieldMaskSchema: FieldMaskSchema = { + fileSize: {wire: 'file_size'}, + isDir: {wire: 'is_dir'}, + modificationTime: {wire: 'modification_time'}, + path: {wire: 'path'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getStatus_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getStatus_ResponseFieldMaskSchema + ); +} + +const listStatusFieldMaskSchema: FieldMaskSchema = { + path: {wire: 'path'}, +}; + +export function listStatusFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, listStatusFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listStatus_ResponseFieldMaskSchema: FieldMaskSchema = { + files: {wire: 'files'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listStatus_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listStatus_ResponseFieldMaskSchema + ); +} + +const mkDirsFieldMaskSchema: FieldMaskSchema = { + path: {wire: 'path'}, +}; + +export function mkDirsFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, mkDirsFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const mkDirs_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function mkDirs_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + mkDirs_ResponseFieldMaskSchema + ); +} + +const moveFieldMaskSchema: FieldMaskSchema = { + destinationPath: {wire: 'destination_path'}, + sourcePath: {wire: 'source_path'}, +}; + +export function moveFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, moveFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const move_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function move_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, move_ResponseFieldMaskSchema); +} + +const putFieldMaskSchema: FieldMaskSchema = { + contents: {wire: 'contents'}, + overwrite: {wire: 'overwrite'}, + path: {wire: 'path'}, +}; + +export function putFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, putFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const put_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function put_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, put_ResponseFieldMaskSchema); +} + +const readFieldMaskSchema: FieldMaskSchema = { + length: {wire: 'length'}, + offset: {wire: 'offset'}, + path: {wire: 'path'}, +}; + +export function readFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, readFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const read_ResponseFieldMaskSchema: FieldMaskSchema = { + bytesRead: {wire: 'bytes_read'}, + data: {wire: 'data'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function read_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, read_ResponseFieldMaskSchema); +} diff --git a/packages/functions/src/v1/model.ts b/packages/functions/src/v1/model.ts index e16905c5..f0937ee2 100644 --- a/packages/functions/src/v1/model.ts +++ b/packages/functions/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ColumnTypeName { @@ -1097,3 +1099,376 @@ export const marshalVolumeDependencySchema: z.ZodType = z .transform(d => ({ volume_full_name: d.volumeFullName, })); + +const connectionDependencyFieldMaskSchema: FieldMaskSchema = { + connectionName: {wire: 'connection_name'}, +}; + +export function connectionDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + connectionDependencyFieldMaskSchema + ); +} + +const createFunctionFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + dataType: {wire: 'data_type'}, + externalLanguage: {wire: 'external_language'}, + externalName: {wire: 'external_name'}, + fullDataType: {wire: 'full_data_type'}, + fullName: {wire: 'full_name'}, + functionId: {wire: 'function_id'}, + inputParams: { + wire: 'input_params', + children: () => functionParameterInfosFieldMaskSchema, + }, + isDeterministic: {wire: 'is_deterministic'}, + isNullCall: {wire: 'is_null_call'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + parameterStyle: {wire: 'parameter_style'}, + properties: {wire: 'properties'}, + returnParams: { + wire: 'return_params', + children: () => functionParameterInfosFieldMaskSchema, + }, + routineBody: {wire: 'routine_body'}, + routineDefinition: {wire: 'routine_definition'}, + routineDependencies: { + wire: 'routine_dependencies', + children: () => dependencyListFieldMaskSchema, + }, + schemaName: {wire: 'schema_name'}, + securityType: {wire: 'security_type'}, + specificName: {wire: 'specific_name'}, + sqlDataAccess: {wire: 'sql_data_access'}, + sqlPath: {wire: 'sql_path'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function createFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createFunctionFieldMaskSchema); +} + +const createFunctionRequestFieldMaskSchema: FieldMaskSchema = { + functionInfo: { + wire: 'function_info', + children: () => createFunctionFieldMaskSchema, + }, +}; + +export function createFunctionRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createFunctionRequestFieldMaskSchema + ); +} + +const credentialDependencyFieldMaskSchema: FieldMaskSchema = { + credentialName: {wire: 'credential_name'}, +}; + +export function credentialDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + credentialDependencyFieldMaskSchema + ); +} + +const deleteFunctionFieldMaskSchema: FieldMaskSchema = { + force: {wire: 'force'}, + fullNameArg: {wire: 'full_name_arg'}, +}; + +export function deleteFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deleteFunctionFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteFunction_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteFunction_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteFunction_ResponseFieldMaskSchema + ); +} + +const dependencyFieldMaskSchema: FieldMaskSchema = { + connection: { + wire: 'connection', + children: () => connectionDependencyFieldMaskSchema, + }, + credential: { + wire: 'credential', + children: () => credentialDependencyFieldMaskSchema, + }, + function: { + wire: 'function', + children: () => functionDependencyFieldMaskSchema, + }, + secret: {wire: 'secret', children: () => secretDependencyFieldMaskSchema}, + table: {wire: 'table', children: () => tableDependencyFieldMaskSchema}, + volume: {wire: 'volume', children: () => volumeDependencyFieldMaskSchema}, +}; + +export function dependencyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, dependencyFieldMaskSchema); +} + +const dependencyListFieldMaskSchema: FieldMaskSchema = { + dependencies: {wire: 'dependencies'}, +}; + +export function dependencyListFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, dependencyListFieldMaskSchema); +} + +const functionDependencyFieldMaskSchema: FieldMaskSchema = { + functionFullName: {wire: 'function_full_name'}, +}; + +export function functionDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + functionDependencyFieldMaskSchema + ); +} + +const functionInfoFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + dataType: {wire: 'data_type'}, + externalLanguage: {wire: 'external_language'}, + externalName: {wire: 'external_name'}, + fullDataType: {wire: 'full_data_type'}, + fullName: {wire: 'full_name'}, + functionId: {wire: 'function_id'}, + inputParams: { + wire: 'input_params', + children: () => functionParameterInfosFieldMaskSchema, + }, + isDeterministic: {wire: 'is_deterministic'}, + isNullCall: {wire: 'is_null_call'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + parameterStyle: {wire: 'parameter_style'}, + properties: {wire: 'properties'}, + returnParams: { + wire: 'return_params', + children: () => functionParameterInfosFieldMaskSchema, + }, + routineBody: {wire: 'routine_body'}, + routineDefinition: {wire: 'routine_definition'}, + routineDependencies: { + wire: 'routine_dependencies', + children: () => dependencyListFieldMaskSchema, + }, + schemaName: {wire: 'schema_name'}, + securityType: {wire: 'security_type'}, + specificName: {wire: 'specific_name'}, + sqlDataAccess: {wire: 'sql_data_access'}, + sqlPath: {wire: 'sql_path'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function functionInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, functionInfoFieldMaskSchema); +} + +const functionParameterInfoFieldMaskSchema: FieldMaskSchema = { + comment: {wire: 'comment'}, + name: {wire: 'name'}, + parameterDefault: {wire: 'parameter_default'}, + parameterMode: {wire: 'parameter_mode'}, + parameterType: {wire: 'parameter_type'}, + position: {wire: 'position'}, + typeIntervalType: {wire: 'type_interval_type'}, + typeJson: {wire: 'type_json'}, + typeName: {wire: 'type_name'}, + typePrecision: {wire: 'type_precision'}, + typeScale: {wire: 'type_scale'}, + typeText: {wire: 'type_text'}, +}; + +export function functionParameterInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + functionParameterInfoFieldMaskSchema + ); +} + +const functionParameterInfosFieldMaskSchema: FieldMaskSchema = { + parameters: {wire: 'parameters'}, +}; + +export function functionParameterInfosFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + functionParameterInfosFieldMaskSchema + ); +} + +const getFunctionFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, + includeBrowse: {wire: 'include_browse'}, +}; + +export function getFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, getFunctionFieldMaskSchema); +} + +const listFunctionsFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, + includeBrowse: {wire: 'include_browse'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, + schemaName: {wire: 'schema_name'}, +}; + +export function listFunctionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listFunctionsFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listFunctions_ResponseFieldMaskSchema: FieldMaskSchema = { + functions: {wire: 'functions'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listFunctions_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listFunctions_ResponseFieldMaskSchema + ); +} + +const secretDependencyFieldMaskSchema: FieldMaskSchema = { + secretFullName: {wire: 'secret_full_name'}, +}; + +export function secretDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + secretDependencyFieldMaskSchema + ); +} + +const tableDependencyFieldMaskSchema: FieldMaskSchema = { + tableFullName: {wire: 'table_full_name'}, +}; + +export function tableDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + tableDependencyFieldMaskSchema + ); +} + +const updateFunctionFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + dataType: {wire: 'data_type'}, + externalLanguage: {wire: 'external_language'}, + externalName: {wire: 'external_name'}, + fullDataType: {wire: 'full_data_type'}, + fullName: {wire: 'full_name'}, + fullNameArg: {wire: 'full_name_arg'}, + functionId: {wire: 'function_id'}, + inputParams: { + wire: 'input_params', + children: () => functionParameterInfosFieldMaskSchema, + }, + isDeterministic: {wire: 'is_deterministic'}, + isNullCall: {wire: 'is_null_call'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + parameterStyle: {wire: 'parameter_style'}, + properties: {wire: 'properties'}, + returnParams: { + wire: 'return_params', + children: () => functionParameterInfosFieldMaskSchema, + }, + routineBody: {wire: 'routine_body'}, + routineDefinition: {wire: 'routine_definition'}, + routineDependencies: { + wire: 'routine_dependencies', + children: () => dependencyListFieldMaskSchema, + }, + schemaName: {wire: 'schema_name'}, + securityType: {wire: 'security_type'}, + specificName: {wire: 'specific_name'}, + sqlDataAccess: {wire: 'sql_data_access'}, + sqlPath: {wire: 'sql_path'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function updateFunctionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, updateFunctionFieldMaskSchema); +} + +const volumeDependencyFieldMaskSchema: FieldMaskSchema = { + volumeFullName: {wire: 'volume_full_name'}, +}; + +export function volumeDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + volumeDependencyFieldMaskSchema + ); +} diff --git a/packages/genie/src/v1/model.ts b/packages/genie/src/v1/model.ts index b83e8f18..545c3827 100644 --- a/packages/genie/src/v1/model.ts +++ b/packages/genie/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ColumnTypeName { @@ -3459,3 +3461,1160 @@ export const marshalVerificationMetadataSchema: z.ZodType = z section: d.section, index: d.index, })); + +const chunkInfoFieldMaskSchema: FieldMaskSchema = { + byteCount: {wire: 'byte_count'}, + chunkIndex: {wire: 'chunk_index'}, + nextChunkIndex: {wire: 'next_chunk_index'}, + nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, + rowCount: {wire: 'row_count'}, + rowOffset: {wire: 'row_offset'}, +}; + +export function chunkInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, chunkInfoFieldMaskSchema); +} + +const columnInfoFieldMaskSchema: FieldMaskSchema = { + comment: {wire: 'comment'}, + mask: {wire: 'mask', children: () => columnMaskFieldMaskSchema}, + name: {wire: 'name'}, + nullable: {wire: 'nullable'}, + partitionIndex: {wire: 'partition_index'}, + position: {wire: 'position'}, + typeIntervalType: {wire: 'type_interval_type'}, + typeJson: {wire: 'type_json'}, + typeName: {wire: 'type_name'}, + typePrecision: {wire: 'type_precision'}, + typeScale: {wire: 'type_scale'}, + typeText: {wire: 'type_text'}, +}; + +export function columnInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, columnInfoFieldMaskSchema); +} + +const columnMaskFieldMaskSchema: FieldMaskSchema = { + functionName: {wire: 'function_name'}, + usingArguments: {wire: 'using_arguments'}, + usingColumnNames: {wire: 'using_column_names'}, +}; + +export function columnMaskFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, columnMaskFieldMaskSchema); +} + +const databricksServiceExceptionProtoFieldMaskSchema: FieldMaskSchema = { + errorCode: {wire: 'error_code'}, + message: {wire: 'message'}, + stackTrace: {wire: 'stack_trace'}, +}; + +export function databricksServiceExceptionProtoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + databricksServiceExceptionProtoFieldMaskSchema + ); +} + +const externalLinkFieldMaskSchema: FieldMaskSchema = { + byteCount: {wire: 'byte_count'}, + chunkIndex: {wire: 'chunk_index'}, + expiration: {wire: 'expiration'}, + externalLink: {wire: 'external_link'}, + httpHeaders: {wire: 'http_headers'}, + nextChunkIndex: {wire: 'next_chunk_index'}, + nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, + rowCount: {wire: 'row_count'}, + rowOffset: {wire: 'row_offset'}, +}; + +export function externalLinkFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, externalLinkFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const externalLink_HttpHeadersEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function externalLink_HttpHeadersEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + externalLink_HttpHeadersEntryFieldMaskSchema + ); +} + +const genieAttachmentFieldMaskSchema: FieldMaskSchema = { + attachmentId: {wire: 'attachment_id'}, + query: {wire: 'query', children: () => genieQueryAttachmentFieldMaskSchema}, + suggestedQuestions: { + wire: 'suggested_questions', + children: () => genieSuggestedQuestionsAttachmentFieldMaskSchema, + }, + text: {wire: 'text', children: () => textAttachmentFieldMaskSchema}, +}; + +export function genieAttachmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieAttachmentFieldMaskSchema + ); +} + +const genieConversationFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + createdTimestamp: {wire: 'created_timestamp'}, + id: {wire: 'id'}, + lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, + spaceId: {wire: 'space_id'}, + title: {wire: 'title'}, + userId: {wire: 'user_id'}, +}; + +export function genieConversationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieConversationFieldMaskSchema + ); +} + +const genieConversationSummaryFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + createdTimestamp: {wire: 'created_timestamp'}, + title: {wire: 'title'}, +}; + +export function genieConversationSummaryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieConversationSummaryFieldMaskSchema + ); +} + +const genieCreateConversationMessageRequestFieldMaskSchema: FieldMaskSchema = { + content: {wire: 'content'}, + conversationId: {wire: 'conversation_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieCreateConversationMessageRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieCreateConversationMessageRequestFieldMaskSchema + ); +} + +const genieCreateEvalRunRequestFieldMaskSchema: FieldMaskSchema = { + benchmarkQuestionIds: {wire: 'benchmark_question_ids'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieCreateEvalRunRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieCreateEvalRunRequestFieldMaskSchema + ); +} + +const genieCreateMessageCommentRequestFieldMaskSchema: FieldMaskSchema = { + content: {wire: 'content'}, + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieCreateMessageCommentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieCreateMessageCommentRequestFieldMaskSchema + ); +} + +const genieCreateSpaceRequestFieldMaskSchema: FieldMaskSchema = { + description: {wire: 'description'}, + parentPath: {wire: 'parent_path'}, + serializedSpace: {wire: 'serialized_space'}, + title: {wire: 'title'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function genieCreateSpaceRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieCreateSpaceRequestFieldMaskSchema + ); +} + +const genieDeleteConversationMessageRequestFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieDeleteConversationMessageRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieDeleteConversationMessageRequestFieldMaskSchema + ); +} + +const genieDeleteConversationRequestFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieDeleteConversationRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieDeleteConversationRequestFieldMaskSchema + ); +} + +const genieEvalResponseFieldMaskSchema: FieldMaskSchema = { + response: {wire: 'response'}, + responseType: {wire: 'response_type'}, + sqlExecutionResult: { + wire: 'sql_execution_result', + children: () => statementResponseFieldMaskSchema, + }, +}; + +export function genieEvalResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieEvalResponseFieldMaskSchema + ); +} + +const genieEvalResultFieldMaskSchema: FieldMaskSchema = { + benchmarkAnswer: {wire: 'benchmark_answer'}, + benchmarkQuestionId: {wire: 'benchmark_question_id'}, + createdByUser: {wire: 'created_by_user'}, + question: {wire: 'question'}, + resultId: {wire: 'result_id'}, + spaceId: {wire: 'space_id'}, + status: {wire: 'status'}, +}; + +export function genieEvalResultFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieEvalResultFieldMaskSchema + ); +} + +const genieEvalResultDetailsFieldMaskSchema: FieldMaskSchema = { + actualResponse: {wire: 'actual_response'}, + assessment: {wire: 'assessment'}, + assessmentReasons: {wire: 'assessment_reasons'}, + benchmarkQuestionId: {wire: 'benchmark_question_id'}, + evalRunStatus: {wire: 'eval_run_status'}, + expectedResponse: {wire: 'expected_response'}, + manualAssessment: {wire: 'manual_assessment'}, + resultId: {wire: 'result_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieEvalResultDetailsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieEvalResultDetailsFieldMaskSchema + ); +} + +const genieEvalRunResponseFieldMaskSchema: FieldMaskSchema = { + createdTimestamp: {wire: 'created_timestamp'}, + evalRunId: {wire: 'eval_run_id'}, + evalRunStatus: {wire: 'eval_run_status'}, + lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, + numCorrect: {wire: 'num_correct'}, + numDone: {wire: 'num_done'}, + numNeedsReview: {wire: 'num_needs_review'}, + numQuestions: {wire: 'num_questions'}, + runByUser: {wire: 'run_by_user'}, +}; + +export function genieEvalRunResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieEvalRunResponseFieldMaskSchema + ); +} + +const genieExecuteMessageAttachmentQueryRequestFieldMaskSchema: FieldMaskSchema = + { + attachmentId: {wire: 'attachment_id'}, + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, + }; + +export function genieExecuteMessageAttachmentQueryRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieExecuteMessageAttachmentQueryRequestFieldMaskSchema + ); +} + +const genieExecuteMessageQueryRequestFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieExecuteMessageQueryRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieExecuteMessageQueryRequestFieldMaskSchema + ); +} + +const genieFeedbackFieldMaskSchema: FieldMaskSchema = { + comment: {wire: 'comment'}, + rating: {wire: 'rating'}, +}; + +export function genieFeedbackFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, genieFeedbackFieldMaskSchema); +} + +const genieGenerateDownloadFullQueryResultRequestFieldMaskSchema: FieldMaskSchema = + { + attachmentId: {wire: 'attachment_id'}, + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, + }; + +export function genieGenerateDownloadFullQueryResultRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGenerateDownloadFullQueryResultRequestFieldMaskSchema + ); +} + +const genieGenerateDownloadFullQueryResultResponseFieldMaskSchema: FieldMaskSchema = + { + downloadId: {wire: 'download_id'}, + downloadIdSignature: {wire: 'download_id_signature'}, + }; + +export function genieGenerateDownloadFullQueryResultResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGenerateDownloadFullQueryResultResponseFieldMaskSchema + ); +} + +const genieGetConversationMessageRequestFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieGetConversationMessageRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetConversationMessageRequestFieldMaskSchema + ); +} + +const genieGetDownloadFullQueryResultRequestFieldMaskSchema: FieldMaskSchema = { + attachmentId: {wire: 'attachment_id'}, + conversationId: {wire: 'conversation_id'}, + downloadId: {wire: 'download_id'}, + downloadIdSignature: {wire: 'download_id_signature'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieGetDownloadFullQueryResultRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetDownloadFullQueryResultRequestFieldMaskSchema + ); +} + +const genieGetDownloadFullQueryResultResponseFieldMaskSchema: FieldMaskSchema = + { + statementResponse: { + wire: 'statement_response', + children: () => statementResponseFieldMaskSchema, + }, + }; + +export function genieGetDownloadFullQueryResultResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetDownloadFullQueryResultResponseFieldMaskSchema + ); +} + +const genieGetEvalResultDetailsRequestFieldMaskSchema: FieldMaskSchema = { + evalRunId: {wire: 'eval_run_id'}, + resultId: {wire: 'result_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieGetEvalResultDetailsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetEvalResultDetailsRequestFieldMaskSchema + ); +} + +const genieGetEvalRunRequestFieldMaskSchema: FieldMaskSchema = { + evalRunId: {wire: 'eval_run_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieGetEvalRunRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetEvalRunRequestFieldMaskSchema + ); +} + +const genieGetMessageAttachmentQueryResultRequestFieldMaskSchema: FieldMaskSchema = + { + attachmentId: {wire: 'attachment_id'}, + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, + }; + +export function genieGetMessageAttachmentQueryResultRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetMessageAttachmentQueryResultRequestFieldMaskSchema + ); +} + +const genieGetMessageQueryResultRequestFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieGetMessageQueryResultRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetMessageQueryResultRequestFieldMaskSchema + ); +} + +const genieGetMessageQueryResultResponseFieldMaskSchema: FieldMaskSchema = { + statementResponse: { + wire: 'statement_response', + children: () => statementResponseFieldMaskSchema, + }, +}; + +export function genieGetMessageQueryResultResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetMessageQueryResultResponseFieldMaskSchema + ); +} + +const genieGetQueryResultByAttachmentRequestFieldMaskSchema: FieldMaskSchema = { + attachmentId: {wire: 'attachment_id'}, + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieGetQueryResultByAttachmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetQueryResultByAttachmentRequestFieldMaskSchema + ); +} + +const genieGetSpaceRequestFieldMaskSchema: FieldMaskSchema = { + includeSerializedSpace: {wire: 'include_serialized_space'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieGetSpaceRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieGetSpaceRequestFieldMaskSchema + ); +} + +const genieListConversationCommentsRequestFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieListConversationCommentsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListConversationCommentsRequestFieldMaskSchema + ); +} + +const genieListConversationCommentsResponseFieldMaskSchema: FieldMaskSchema = { + comments: {wire: 'comments'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function genieListConversationCommentsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListConversationCommentsResponseFieldMaskSchema + ); +} + +const genieListConversationMessagesRequestFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieListConversationMessagesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListConversationMessagesRequestFieldMaskSchema + ); +} + +const genieListConversationMessagesResponseFieldMaskSchema: FieldMaskSchema = { + messages: {wire: 'messages'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function genieListConversationMessagesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListConversationMessagesResponseFieldMaskSchema + ); +} + +const genieListConversationsRequestFieldMaskSchema: FieldMaskSchema = { + includeAll: {wire: 'include_all'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieListConversationsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListConversationsRequestFieldMaskSchema + ); +} + +const genieListConversationsResponseFieldMaskSchema: FieldMaskSchema = { + conversations: {wire: 'conversations'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function genieListConversationsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListConversationsResponseFieldMaskSchema + ); +} + +const genieListEvalResultsRequestFieldMaskSchema: FieldMaskSchema = { + evalRunId: {wire: 'eval_run_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieListEvalResultsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListEvalResultsRequestFieldMaskSchema + ); +} + +const genieListEvalResultsResponseFieldMaskSchema: FieldMaskSchema = { + evalResults: {wire: 'eval_results'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function genieListEvalResultsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListEvalResultsResponseFieldMaskSchema + ); +} + +const genieListEvalRunsRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieListEvalRunsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListEvalRunsRequestFieldMaskSchema + ); +} + +const genieListEvalRunsResponseFieldMaskSchema: FieldMaskSchema = { + evalRuns: {wire: 'eval_runs'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function genieListEvalRunsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListEvalRunsResponseFieldMaskSchema + ); +} + +const genieListMessageCommentsRequestFieldMaskSchema: FieldMaskSchema = { + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieListMessageCommentsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListMessageCommentsRequestFieldMaskSchema + ); +} + +const genieListMessageCommentsResponseFieldMaskSchema: FieldMaskSchema = { + comments: {wire: 'comments'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function genieListMessageCommentsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListMessageCommentsResponseFieldMaskSchema + ); +} + +const genieListSpacesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function genieListSpacesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListSpacesRequestFieldMaskSchema + ); +} + +const genieListSpacesResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + spaces: {wire: 'spaces'}, +}; + +export function genieListSpacesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieListSpacesResponseFieldMaskSchema + ); +} + +const genieMessageFieldMaskSchema: FieldMaskSchema = { + attachments: {wire: 'attachments'}, + content: {wire: 'content'}, + conversationId: {wire: 'conversation_id'}, + createdTimestamp: {wire: 'created_timestamp'}, + error: {wire: 'error', children: () => messageErrorFieldMaskSchema}, + feedback: {wire: 'feedback', children: () => genieFeedbackFieldMaskSchema}, + id: {wire: 'id'}, + lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, + messageId: {wire: 'message_id'}, + queryResult: {wire: 'query_result', children: () => resultFieldMaskSchema}, + spaceId: {wire: 'space_id'}, + status: {wire: 'status'}, + userId: {wire: 'user_id'}, +}; + +export function genieMessageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, genieMessageFieldMaskSchema); +} + +const genieMessageCommentFieldMaskSchema: FieldMaskSchema = { + content: {wire: 'content'}, + conversationId: {wire: 'conversation_id'}, + createdTimestamp: {wire: 'created_timestamp'}, + messageCommentId: {wire: 'message_comment_id'}, + messageId: {wire: 'message_id'}, + spaceId: {wire: 'space_id'}, + userId: {wire: 'user_id'}, +}; + +export function genieMessageCommentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieMessageCommentFieldMaskSchema + ); +} + +const genieQueryAttachmentFieldMaskSchema: FieldMaskSchema = { + description: {wire: 'description'}, + id: {wire: 'id'}, + lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, + parameters: {wire: 'parameters'}, + query: {wire: 'query'}, + queryResultMetadata: { + wire: 'query_result_metadata', + children: () => genieResultMetadataFieldMaskSchema, + }, + statementId: {wire: 'statement_id'}, + thoughts: {wire: 'thoughts'}, + title: {wire: 'title'}, +}; + +export function genieQueryAttachmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieQueryAttachmentFieldMaskSchema + ); +} + +const genieResultMetadataFieldMaskSchema: FieldMaskSchema = { + isTruncated: {wire: 'is_truncated'}, + rowCount: {wire: 'row_count'}, +}; + +export function genieResultMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieResultMetadataFieldMaskSchema + ); +} + +const genieSendMessageFeedbackRequestFieldMaskSchema: FieldMaskSchema = { + comment: {wire: 'comment'}, + conversationId: {wire: 'conversation_id'}, + messageId: {wire: 'message_id'}, + rating: {wire: 'rating'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieSendMessageFeedbackRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieSendMessageFeedbackRequestFieldMaskSchema + ); +} + +const genieSpaceFieldMaskSchema: FieldMaskSchema = { + description: {wire: 'description'}, + etag: {wire: 'etag'}, + parentPath: {wire: 'parent_path'}, + serializedSpace: {wire: 'serialized_space'}, + spaceId: {wire: 'space_id'}, + title: {wire: 'title'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function genieSpaceFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, genieSpaceFieldMaskSchema); +} + +const genieStartConversationMessageRequestFieldMaskSchema: FieldMaskSchema = { + content: {wire: 'content'}, + spaceId: {wire: 'space_id'}, +}; + +export function genieStartConversationMessageRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieStartConversationMessageRequestFieldMaskSchema + ); +} + +const genieStartConversationResponseFieldMaskSchema: FieldMaskSchema = { + conversation: { + wire: 'conversation', + children: () => genieConversationFieldMaskSchema, + }, + conversationId: {wire: 'conversation_id'}, + message: {wire: 'message', children: () => genieMessageFieldMaskSchema}, + messageId: {wire: 'message_id'}, +}; + +export function genieStartConversationResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieStartConversationResponseFieldMaskSchema + ); +} + +const genieSuggestedQuestionsAttachmentFieldMaskSchema: FieldMaskSchema = { + questions: {wire: 'questions'}, +}; + +export function genieSuggestedQuestionsAttachmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieSuggestedQuestionsAttachmentFieldMaskSchema + ); +} + +const genieTrashSpaceRequestFieldMaskSchema: FieldMaskSchema = { + spaceId: {wire: 'space_id'}, +}; + +export function genieTrashSpaceRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieTrashSpaceRequestFieldMaskSchema + ); +} + +const genieUpdateSpaceRequestFieldMaskSchema: FieldMaskSchema = { + description: {wire: 'description'}, + etag: {wire: 'etag'}, + serializedSpace: {wire: 'serialized_space'}, + spaceId: {wire: 'space_id'}, + title: {wire: 'title'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function genieUpdateSpaceRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genieUpdateSpaceRequestFieldMaskSchema + ); +} + +const listValueFieldMaskSchema: FieldMaskSchema = { + values: {wire: 'values'}, +}; + +export function listValueFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, listValueFieldMaskSchema); +} + +const mapStringValueEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value', children: () => valueFieldMaskSchema}, +}; + +export function mapStringValueEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + mapStringValueEntryFieldMaskSchema + ); +} + +const messageErrorFieldMaskSchema: FieldMaskSchema = { + error: {wire: 'error'}, + type: {wire: 'type'}, +}; + +export function messageErrorFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, messageErrorFieldMaskSchema); +} + +const messageStatusFieldMaskSchema: FieldMaskSchema = {}; + +export function messageStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, messageStatusFieldMaskSchema); +} + +const policyFunctionArgumentFieldMaskSchema: FieldMaskSchema = { + column: {wire: 'column'}, + constant: {wire: 'constant'}, +}; + +export function policyFunctionArgumentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + policyFunctionArgumentFieldMaskSchema + ); +} + +const queryAttachmentParameterFieldMaskSchema: FieldMaskSchema = { + keyword: {wire: 'keyword'}, + sqlType: {wire: 'sql_type'}, + value: {wire: 'value'}, +}; + +export function queryAttachmentParameterFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + queryAttachmentParameterFieldMaskSchema + ); +} + +const resultFieldMaskSchema: FieldMaskSchema = { + isTruncated: {wire: 'is_truncated'}, + rowCount: {wire: 'row_count'}, + statementId: {wire: 'statement_id'}, + statementIdSignature: {wire: 'statement_id_signature'}, +}; + +export function resultFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, resultFieldMaskSchema); +} + +const resultDataFieldMaskSchema: FieldMaskSchema = { + byteCount: {wire: 'byte_count'}, + chunkIndex: {wire: 'chunk_index'}, + dataArray: {wire: 'data_array'}, + externalLinks: {wire: 'external_links'}, + nextChunkIndex: {wire: 'next_chunk_index'}, + nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, + rowCount: {wire: 'row_count'}, + rowOffset: {wire: 'row_offset'}, +}; + +export function resultDataFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, resultDataFieldMaskSchema); +} + +const resultManifestFieldMaskSchema: FieldMaskSchema = { + chunks: {wire: 'chunks'}, + format: {wire: 'format'}, + schema: {wire: 'schema', children: () => schemaFieldMaskSchema}, + totalByteCount: {wire: 'total_byte_count'}, + totalChunkCount: {wire: 'total_chunk_count'}, + totalRowCount: {wire: 'total_row_count'}, + truncated: {wire: 'truncated'}, +}; + +export function resultManifestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, resultManifestFieldMaskSchema); +} + +const schemaFieldMaskSchema: FieldMaskSchema = { + columnCount: {wire: 'column_count'}, + columns: {wire: 'columns'}, +}; + +export function schemaFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, schemaFieldMaskSchema); +} + +const statementResponseFieldMaskSchema: FieldMaskSchema = { + manifest: {wire: 'manifest', children: () => resultManifestFieldMaskSchema}, + result: {wire: 'result', children: () => resultDataFieldMaskSchema}, + statementId: {wire: 'statement_id'}, + status: {wire: 'status', children: () => statementStatusFieldMaskSchema}, +}; + +export function statementResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + statementResponseFieldMaskSchema + ); +} + +const statementStatusFieldMaskSchema: FieldMaskSchema = { + error: { + wire: 'error', + children: () => databricksServiceExceptionProtoFieldMaskSchema, + }, + sqlState: {wire: 'sql_state'}, + state: {wire: 'state'}, +}; + +export function statementStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + statementStatusFieldMaskSchema + ); +} + +const structFieldMaskSchema: FieldMaskSchema = { + fields: {wire: 'fields'}, +}; + +export function structFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, structFieldMaskSchema); +} + +const textAttachmentFieldMaskSchema: FieldMaskSchema = { + content: {wire: 'content'}, + id: {wire: 'id'}, + phase: {wire: 'phase'}, + purpose: {wire: 'purpose'}, + verificationMetadata: { + wire: 'verification_metadata', + children: () => verificationMetadataFieldMaskSchema, + }, +}; + +export function textAttachmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, textAttachmentFieldMaskSchema); +} + +const thoughtFieldMaskSchema: FieldMaskSchema = { + content: {wire: 'content'}, + thoughtType: {wire: 'thought_type'}, +}; + +export function thoughtFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, thoughtFieldMaskSchema); +} + +const valueFieldMaskSchema: FieldMaskSchema = { + boolValue: {wire: 'bool_value'}, + listValue: {wire: 'list_value', children: () => listValueFieldMaskSchema}, + nullValue: {wire: 'null_value'}, + numberValue: {wire: 'number_value'}, + stringValue: {wire: 'string_value'}, + structValue: {wire: 'struct_value', children: () => structFieldMaskSchema}, +}; + +export function valueFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, valueFieldMaskSchema); +} + +const verificationMetadataFieldMaskSchema: FieldMaskSchema = { + index: {wire: 'index'}, + section: {wire: 'section'}, +}; + +export function verificationMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + verificationMetadataFieldMaskSchema + ); +} diff --git a/packages/globalinitscripts/src/v2/model.ts b/packages/globalinitscripts/src/v2/model.ts index b0b8c275..d0017374 100644 --- a/packages/globalinitscripts/src/v2/model.ts +++ b/packages/globalinitscripts/src/v2/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface CreateGlobalInitScript { @@ -276,3 +278,149 @@ export const marshalUpdateGlobalInitScriptSchema: z.ZodType = z export const marshalUpdateGlobalInitScript_ResponseSchema: z.ZodType = z.object( {} ); + +const createGlobalInitScriptFieldMaskSchema: FieldMaskSchema = { + enabled: {wire: 'enabled'}, + name: {wire: 'name'}, + position: {wire: 'position'}, + script: {wire: 'script'}, +}; + +export function createGlobalInitScriptFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createGlobalInitScriptFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createGlobalInitScript_ResponseFieldMaskSchema: FieldMaskSchema = { + scriptId: {wire: 'script_id'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createGlobalInitScript_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createGlobalInitScript_ResponseFieldMaskSchema + ); +} + +const deleteGlobalInitScriptFieldMaskSchema: FieldMaskSchema = { + scriptId: {wire: 'script_id'}, +}; + +export function deleteGlobalInitScriptFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteGlobalInitScriptFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteGlobalInitScript_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteGlobalInitScript_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteGlobalInitScript_ResponseFieldMaskSchema + ); +} + +const getGlobalInitScriptFieldMaskSchema: FieldMaskSchema = { + scriptId: {wire: 'script_id'}, +}; + +export function getGlobalInitScriptFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getGlobalInitScriptFieldMaskSchema + ); +} + +const globalInitScriptDetailsFieldMaskSchema: FieldMaskSchema = { + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + enabled: {wire: 'enabled'}, + name: {wire: 'name'}, + position: {wire: 'position'}, + scriptId: {wire: 'script_id'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function globalInitScriptDetailsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + globalInitScriptDetailsFieldMaskSchema + ); +} + +const listGlobalInitScriptsFieldMaskSchema: FieldMaskSchema = {}; + +export function listGlobalInitScriptsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listGlobalInitScriptsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listGlobalInitScripts_ResponseFieldMaskSchema: FieldMaskSchema = { + scripts: {wire: 'scripts'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listGlobalInitScripts_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listGlobalInitScripts_ResponseFieldMaskSchema + ); +} + +const updateGlobalInitScriptFieldMaskSchema: FieldMaskSchema = { + enabled: {wire: 'enabled'}, + name: {wire: 'name'}, + position: {wire: 'position'}, + script: {wire: 'script'}, + scriptId: {wire: 'script_id'}, +}; + +export function updateGlobalInitScriptFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateGlobalInitScriptFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateGlobalInitScript_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateGlobalInitScript_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateGlobalInitScript_ResponseFieldMaskSchema + ); +} diff --git a/packages/grants/src/v1/model.ts b/packages/grants/src/v1/model.ts index 68690143..b81a435b 100644 --- a/packages/grants/src/v1/model.ts +++ b/packages/grants/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface EffectivePrivilege { @@ -463,3 +465,223 @@ export const marshalUpdatePermissions_ResponseSchema: z.ZodType = z .transform(d => ({ privilege_assignments: d.privilegeAssignments, })); + +const effectivePrivilegeFieldMaskSchema: FieldMaskSchema = { + inheritedFromName: {wire: 'inherited_from_name'}, + inheritedFromType: {wire: 'inherited_from_type'}, + privilege: {wire: 'privilege'}, +}; + +export function effectivePrivilegeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + effectivePrivilegeFieldMaskSchema + ); +} + +const effectivePrivilegeAssignmentFieldMaskSchema: FieldMaskSchema = { + principal: {wire: 'principal'}, + privileges: {wire: 'privileges'}, +}; + +export function effectivePrivilegeAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + effectivePrivilegeAssignmentFieldMaskSchema + ); +} + +const getEffectivePermissionsFieldMaskSchema: FieldMaskSchema = { + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, + principal: {wire: 'principal'}, + securableFullName: {wire: 'securable_full_name'}, + securableType: {wire: 'securable_type'}, +}; + +export function getEffectivePermissionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getEffectivePermissionsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getEffectivePermissions_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + privilegeAssignments: {wire: 'privilege_assignments'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getEffectivePermissions_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getEffectivePermissions_ResponseFieldMaskSchema + ); +} + +const getPermissionsFieldMaskSchema: FieldMaskSchema = { + includeDeletedPrincipals: {wire: 'include_deleted_principals'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, + principal: {wire: 'principal'}, + securableFullName: {wire: 'securable_full_name'}, + securableType: {wire: 'securable_type'}, +}; + +export function getPermissionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, getPermissionsFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getPermissions_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + privilegeAssignments: {wire: 'privilege_assignments'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getPermissions_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getPermissions_ResponseFieldMaskSchema + ); +} + +const listEffectivePrivilegeAssignmentsRequestFieldMaskSchema: FieldMaskSchema = + { + fullName: {wire: 'full_name'}, + includeDeletedPrincipals: {wire: 'include_deleted_principals'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + principal: {wire: 'principal'}, + securableType: {wire: 'securable_type'}, + }; + +export function listEffectivePrivilegeAssignmentsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listEffectivePrivilegeAssignmentsRequestFieldMaskSchema + ); +} + +const listEffectivePrivilegeAssignmentsResponseFieldMaskSchema: FieldMaskSchema = + { + effectivePrivilegeAssignments: {wire: 'effective_privilege_assignments'}, + nextPageToken: {wire: 'next_page_token'}, + }; + +export function listEffectivePrivilegeAssignmentsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listEffectivePrivilegeAssignmentsResponseFieldMaskSchema + ); +} + +const listPrivilegeAssignmentsRequestFieldMaskSchema: FieldMaskSchema = { + fullName: {wire: 'full_name'}, + includeDeletedPrincipals: {wire: 'include_deleted_principals'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + principal: {wire: 'principal'}, + securableType: {wire: 'securable_type'}, +}; + +export function listPrivilegeAssignmentsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPrivilegeAssignmentsRequestFieldMaskSchema + ); +} + +const listPrivilegeAssignmentsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + privilegeAssignments: {wire: 'privilege_assignments'}, +}; + +export function listPrivilegeAssignmentsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPrivilegeAssignmentsResponseFieldMaskSchema + ); +} + +const permissionsChangeFieldMaskSchema: FieldMaskSchema = { + add: {wire: 'add'}, + principal: {wire: 'principal'}, + principalId: {wire: 'principal_id'}, + remove: {wire: 'remove'}, +}; + +export function permissionsChangeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + permissionsChangeFieldMaskSchema + ); +} + +const privilegeAssignmentFieldMaskSchema: FieldMaskSchema = { + principal: {wire: 'principal'}, + principalId: {wire: 'principal_id'}, + privileges: {wire: 'privileges'}, +}; + +export function privilegeAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + privilegeAssignmentFieldMaskSchema + ); +} + +const updatePermissionsFieldMaskSchema: FieldMaskSchema = { + changes: {wire: 'changes'}, + securableFullName: {wire: 'securable_full_name'}, + securableType: {wire: 'securable_type'}, +}; + +export function updatePermissionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updatePermissionsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updatePermissions_ResponseFieldMaskSchema: FieldMaskSchema = { + privilegeAssignments: {wire: 'privilege_assignments'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updatePermissions_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updatePermissions_ResponseFieldMaskSchema + ); +} diff --git a/packages/iam/src/v2/model.ts b/packages/iam/src/v2/model.ts index 1583346b..8dbd39d4 100644 --- a/packages/iam/src/v2/model.ts +++ b/packages/iam/src/v2/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The action type for an account access identity rule (currently DENY only). */ @@ -1675,3 +1677,1301 @@ export const marshalWorkspaceIdentityDetailSchema: z.ZodType = z workspace_identity_status: d.workspaceIdentityStatus, assignment_type: d.assignmentType, })); + +const accountAccessIdentityRuleFieldMaskSchema: FieldMaskSchema = { + action: {wire: 'action'}, + displayName: {wire: 'display_name'}, + externalPrincipalId: {wire: 'external_principal_id'}, + name: {wire: 'name'}, + principalType: {wire: 'principal_type'}, +}; + +export function accountAccessIdentityRuleFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + accountAccessIdentityRuleFieldMaskSchema + ); +} + +const createAccountAccessIdentityRuleRequestFieldMaskSchema: FieldMaskSchema = { + accountAccessIdentityRule: { + wire: 'account_access_identity_rule', + children: () => accountAccessIdentityRuleFieldMaskSchema, + }, + externalPrincipalId: {wire: 'external_principal_id'}, + parent: {wire: 'parent'}, +}; + +export function createAccountAccessIdentityRuleRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createAccountAccessIdentityRuleRequestFieldMaskSchema + ); +} + +const createDirectGroupMemberProxyRequestFieldMaskSchema: FieldMaskSchema = { + directGroupMember: { + wire: 'direct_group_member', + children: () => directGroupMemberFieldMaskSchema, + }, + groupId: {wire: 'group_id'}, +}; + +export function createDirectGroupMemberProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createDirectGroupMemberProxyRequestFieldMaskSchema + ); +} + +const createDirectGroupMemberRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + directGroupMember: { + wire: 'direct_group_member', + children: () => directGroupMemberFieldMaskSchema, + }, + groupId: {wire: 'group_id'}, +}; + +export function createDirectGroupMemberRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createDirectGroupMemberRequestFieldMaskSchema + ); +} + +const createGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { + group: {wire: 'group', children: () => groupFieldMaskSchema}, +}; + +export function createGroupProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createGroupProxyRequestFieldMaskSchema + ); +} + +const createGroupRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + group: {wire: 'group', children: () => groupFieldMaskSchema}, +}; + +export function createGroupRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createGroupRequestFieldMaskSchema + ); +} + +const createServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { + servicePrincipal: { + wire: 'service_principal', + children: () => servicePrincipalFieldMaskSchema, + }, +}; + +export function createServicePrincipalProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createServicePrincipalProxyRequestFieldMaskSchema + ); +} + +const createServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + servicePrincipal: { + wire: 'service_principal', + children: () => servicePrincipalFieldMaskSchema, + }, +}; + +export function createServicePrincipalRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createServicePrincipalRequestFieldMaskSchema + ); +} + +const createUserProxyRequestFieldMaskSchema: FieldMaskSchema = { + user: {wire: 'user', children: () => userFieldMaskSchema}, +}; + +export function createUserProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createUserProxyRequestFieldMaskSchema + ); +} + +const createUserRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + user: {wire: 'user', children: () => userFieldMaskSchema}, +}; + +export function createUserRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createUserRequestFieldMaskSchema + ); +} + +const createWorkspaceAssignmentDetailProxyRequestFieldMaskSchema: FieldMaskSchema = + { + workspaceAssignmentDetail: { + wire: 'workspace_assignment_detail', + children: () => workspaceAssignmentDetailFieldMaskSchema, + }, + }; + +export function createWorkspaceAssignmentDetailProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createWorkspaceAssignmentDetailProxyRequestFieldMaskSchema + ); +} + +const createWorkspaceAssignmentDetailRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + workspaceAssignmentDetail: { + wire: 'workspace_assignment_detail', + children: () => workspaceAssignmentDetailFieldMaskSchema, + }, + workspaceId: {wire: 'workspace_id'}, +}; + +export function createWorkspaceAssignmentDetailRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createWorkspaceAssignmentDetailRequestFieldMaskSchema + ); +} + +const deleteAccountAccessIdentityRuleRequestFieldMaskSchema: FieldMaskSchema = { + externalPrincipalId: {wire: 'external_principal_id'}, + parent: {wire: 'parent'}, +}; + +export function deleteAccountAccessIdentityRuleRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteAccountAccessIdentityRuleRequestFieldMaskSchema + ); +} + +const deleteDirectGroupMemberProxyRequestFieldMaskSchema: FieldMaskSchema = { + groupId: {wire: 'group_id'}, + principalId: {wire: 'principal_id'}, +}; + +export function deleteDirectGroupMemberProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteDirectGroupMemberProxyRequestFieldMaskSchema + ); +} + +const deleteDirectGroupMemberRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + groupId: {wire: 'group_id'}, + principalId: {wire: 'principal_id'}, +}; + +export function deleteDirectGroupMemberRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteDirectGroupMemberRequestFieldMaskSchema + ); +} + +const deleteGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { + internalId: {wire: 'internal_id'}, +}; + +export function deleteGroupProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteGroupProxyRequestFieldMaskSchema + ); +} + +const deleteGroupRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + internalId: {wire: 'internal_id'}, +}; + +export function deleteGroupRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteGroupRequestFieldMaskSchema + ); +} + +const deleteServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { + internalId: {wire: 'internal_id'}, +}; + +export function deleteServicePrincipalProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteServicePrincipalProxyRequestFieldMaskSchema + ); +} + +const deleteServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + internalId: {wire: 'internal_id'}, +}; + +export function deleteServicePrincipalRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteServicePrincipalRequestFieldMaskSchema + ); +} + +const deleteUserProxyRequestFieldMaskSchema: FieldMaskSchema = { + internalId: {wire: 'internal_id'}, +}; + +export function deleteUserProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteUserProxyRequestFieldMaskSchema + ); +} + +const deleteUserRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + internalId: {wire: 'internal_id'}, +}; + +export function deleteUserRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteUserRequestFieldMaskSchema + ); +} + +const deleteWorkspaceAssignmentDetailProxyRequestFieldMaskSchema: FieldMaskSchema = + { + principalId: {wire: 'principal_id'}, + }; + +export function deleteWorkspaceAssignmentDetailProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteWorkspaceAssignmentDetailProxyRequestFieldMaskSchema + ); +} + +const deleteWorkspaceAssignmentDetailRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + principalId: {wire: 'principal_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function deleteWorkspaceAssignmentDetailRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteWorkspaceAssignmentDetailRequestFieldMaskSchema + ); +} + +const directGroupMemberFieldMaskSchema: FieldMaskSchema = { + displayName: {wire: 'display_name'}, + externalId: {wire: 'external_id'}, + membershipSource: {wire: 'membership_source'}, + principalId: {wire: 'principal_id'}, + principalType: {wire: 'principal_type'}, +}; + +export function directGroupMemberFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + directGroupMemberFieldMaskSchema + ); +} + +const getAccountAccessIdentityRuleRequestFieldMaskSchema: FieldMaskSchema = { + externalPrincipalId: {wire: 'external_principal_id'}, + parent: {wire: 'parent'}, +}; + +export function getAccountAccessIdentityRuleRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getAccountAccessIdentityRuleRequestFieldMaskSchema + ); +} + +const getDirectGroupMemberProxyRequestFieldMaskSchema: FieldMaskSchema = { + groupId: {wire: 'group_id'}, + principalId: {wire: 'principal_id'}, +}; + +export function getDirectGroupMemberProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getDirectGroupMemberProxyRequestFieldMaskSchema + ); +} + +const getDirectGroupMemberRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + groupId: {wire: 'group_id'}, + principalId: {wire: 'principal_id'}, +}; + +export function getDirectGroupMemberRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getDirectGroupMemberRequestFieldMaskSchema + ); +} + +const getGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { + internalId: {wire: 'internal_id'}, +}; + +export function getGroupProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getGroupProxyRequestFieldMaskSchema + ); +} + +const getGroupRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + internalId: {wire: 'internal_id'}, +}; + +export function getGroupRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getGroupRequestFieldMaskSchema + ); +} + +const getServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { + internalId: {wire: 'internal_id'}, +}; + +export function getServicePrincipalProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getServicePrincipalProxyRequestFieldMaskSchema + ); +} + +const getServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + internalId: {wire: 'internal_id'}, +}; + +export function getServicePrincipalRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getServicePrincipalRequestFieldMaskSchema + ); +} + +const getUserProxyRequestFieldMaskSchema: FieldMaskSchema = { + internalId: {wire: 'internal_id'}, +}; + +export function getUserProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getUserProxyRequestFieldMaskSchema + ); +} + +const getUserRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + internalId: {wire: 'internal_id'}, +}; + +export function getUserRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, getUserRequestFieldMaskSchema); +} + +const getWorkspaceAccessDetailLocalRequestFieldMaskSchema: FieldMaskSchema = { + principalId: {wire: 'principal_id'}, + view: {wire: 'view'}, +}; + +export function getWorkspaceAccessDetailLocalRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceAccessDetailLocalRequestFieldMaskSchema + ); +} + +const getWorkspaceAccessDetailRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + principalId: {wire: 'principal_id'}, + view: {wire: 'view'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function getWorkspaceAccessDetailRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceAccessDetailRequestFieldMaskSchema + ); +} + +const getWorkspaceAssignmentDetailProxyRequestFieldMaskSchema: FieldMaskSchema = + { + principalId: {wire: 'principal_id'}, + }; + +export function getWorkspaceAssignmentDetailProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceAssignmentDetailProxyRequestFieldMaskSchema + ); +} + +const getWorkspaceAssignmentDetailRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + principalId: {wire: 'principal_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function getWorkspaceAssignmentDetailRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceAssignmentDetailRequestFieldMaskSchema + ); +} + +const getWorkspaceIdentityDetailRequestFieldMaskSchema: FieldMaskSchema = { + principalId: {wire: 'principal_id'}, +}; + +export function getWorkspaceIdentityDetailRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceIdentityDetailRequestFieldMaskSchema + ); +} + +const groupFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + externalId: {wire: 'external_id'}, + groupName: {wire: 'group_name'}, + internalId: {wire: 'internal_id'}, +}; + +export function groupFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, groupFieldMaskSchema); +} + +const listAccountAccessIdentityRulesRequestFieldMaskSchema: FieldMaskSchema = { + filter: {wire: 'filter'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + parent: {wire: 'parent'}, +}; + +export function listAccountAccessIdentityRulesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAccountAccessIdentityRulesRequestFieldMaskSchema + ); +} + +const listAccountAccessIdentityRulesResponseFieldMaskSchema: FieldMaskSchema = { + accountAccessIdentityRules: {wire: 'account_access_identity_rules'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listAccountAccessIdentityRulesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAccountAccessIdentityRulesResponseFieldMaskSchema + ); +} + +const listDirectGroupMembersProxyRequestFieldMaskSchema: FieldMaskSchema = { + groupId: {wire: 'group_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listDirectGroupMembersProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listDirectGroupMembersProxyRequestFieldMaskSchema + ); +} + +const listDirectGroupMembersRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + groupId: {wire: 'group_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listDirectGroupMembersRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listDirectGroupMembersRequestFieldMaskSchema + ); +} + +const listDirectGroupMembersResponseFieldMaskSchema: FieldMaskSchema = { + directGroupMembers: {wire: 'direct_group_members'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listDirectGroupMembersResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listDirectGroupMembersResponseFieldMaskSchema + ); +} + +const listGroupsProxyRequestFieldMaskSchema: FieldMaskSchema = { + filter: {wire: 'filter'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listGroupsProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listGroupsProxyRequestFieldMaskSchema + ); +} + +const listGroupsRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + filter: {wire: 'filter'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listGroupsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listGroupsRequestFieldMaskSchema + ); +} + +const listGroupsResponseFieldMaskSchema: FieldMaskSchema = { + groups: {wire: 'groups'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listGroupsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listGroupsResponseFieldMaskSchema + ); +} + +const listServicePrincipalsProxyRequestFieldMaskSchema: FieldMaskSchema = { + filter: {wire: 'filter'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listServicePrincipalsProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listServicePrincipalsProxyRequestFieldMaskSchema + ); +} + +const listServicePrincipalsRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + filter: {wire: 'filter'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listServicePrincipalsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listServicePrincipalsRequestFieldMaskSchema + ); +} + +const listServicePrincipalsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + servicePrincipals: {wire: 'service_principals'}, +}; + +export function listServicePrincipalsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listServicePrincipalsResponseFieldMaskSchema + ); +} + +const listTransitiveParentGroupsProxyRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + principalId: {wire: 'principal_id'}, +}; + +export function listTransitiveParentGroupsProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTransitiveParentGroupsProxyRequestFieldMaskSchema + ); +} + +const listTransitiveParentGroupsRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + principalId: {wire: 'principal_id'}, +}; + +export function listTransitiveParentGroupsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTransitiveParentGroupsRequestFieldMaskSchema + ); +} + +const listTransitiveParentGroupsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + transitiveParentGroups: {wire: 'transitive_parent_groups'}, +}; + +export function listTransitiveParentGroupsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTransitiveParentGroupsResponseFieldMaskSchema + ); +} + +const listUsersProxyRequestFieldMaskSchema: FieldMaskSchema = { + filter: {wire: 'filter'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listUsersProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listUsersProxyRequestFieldMaskSchema + ); +} + +const listUsersRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + filter: {wire: 'filter'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listUsersRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listUsersRequestFieldMaskSchema + ); +} + +const listUsersResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + users: {wire: 'users'}, +}; + +export function listUsersResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listUsersResponseFieldMaskSchema + ); +} + +const listWorkspaceAccessDetailsLocalRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listWorkspaceAccessDetailsLocalRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceAccessDetailsLocalRequestFieldMaskSchema + ); +} + +const listWorkspaceAccessDetailsRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function listWorkspaceAccessDetailsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceAccessDetailsRequestFieldMaskSchema + ); +} + +const listWorkspaceAccessDetailsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + workspaceAccessDetails: {wire: 'workspace_access_details'}, +}; + +export function listWorkspaceAccessDetailsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceAccessDetailsResponseFieldMaskSchema + ); +} + +const listWorkspaceAssignmentDetailsProxyRequestFieldMaskSchema: FieldMaskSchema = + { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + }; + +export function listWorkspaceAssignmentDetailsProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceAssignmentDetailsProxyRequestFieldMaskSchema + ); +} + +const listWorkspaceAssignmentDetailsRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function listWorkspaceAssignmentDetailsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceAssignmentDetailsRequestFieldMaskSchema + ); +} + +const listWorkspaceAssignmentDetailsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + workspaceAssignmentDetails: {wire: 'workspace_assignment_details'}, +}; + +export function listWorkspaceAssignmentDetailsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceAssignmentDetailsResponseFieldMaskSchema + ); +} + +const resolveGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { + externalId: {wire: 'external_id'}, +}; + +export function resolveGroupProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + resolveGroupProxyRequestFieldMaskSchema + ); +} + +const resolveGroupRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + externalId: {wire: 'external_id'}, +}; + +export function resolveGroupRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + resolveGroupRequestFieldMaskSchema + ); +} + +const resolveGroupResponseFieldMaskSchema: FieldMaskSchema = { + group: {wire: 'group', children: () => groupFieldMaskSchema}, +}; + +export function resolveGroupResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + resolveGroupResponseFieldMaskSchema + ); +} + +const resolveServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { + externalId: {wire: 'external_id'}, +}; + +export function resolveServicePrincipalProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + resolveServicePrincipalProxyRequestFieldMaskSchema + ); +} + +const resolveServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + externalId: {wire: 'external_id'}, +}; + +export function resolveServicePrincipalRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + resolveServicePrincipalRequestFieldMaskSchema + ); +} + +const resolveServicePrincipalResponseFieldMaskSchema: FieldMaskSchema = { + servicePrincipal: { + wire: 'service_principal', + children: () => servicePrincipalFieldMaskSchema, + }, +}; + +export function resolveServicePrincipalResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + resolveServicePrincipalResponseFieldMaskSchema + ); +} + +const resolveUserProxyRequestFieldMaskSchema: FieldMaskSchema = { + externalId: {wire: 'external_id'}, +}; + +export function resolveUserProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + resolveUserProxyRequestFieldMaskSchema + ); +} + +const resolveUserRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + externalId: {wire: 'external_id'}, +}; + +export function resolveUserRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + resolveUserRequestFieldMaskSchema + ); +} + +const resolveUserResponseFieldMaskSchema: FieldMaskSchema = { + user: {wire: 'user', children: () => userFieldMaskSchema}, +}; + +export function resolveUserResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + resolveUserResponseFieldMaskSchema + ); +} + +const servicePrincipalFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + accountSpStatus: {wire: 'account_sp_status'}, + applicationId: {wire: 'application_id'}, + displayName: {wire: 'display_name'}, + externalId: {wire: 'external_id'}, + internalId: {wire: 'internal_id'}, +}; + +export function servicePrincipalFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + servicePrincipalFieldMaskSchema + ); +} + +const transitiveParentGroupFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + externalId: {wire: 'external_id'}, + internalId: {wire: 'internal_id'}, +}; + +export function transitiveParentGroupFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + transitiveParentGroupFieldMaskSchema + ); +} + +const updateGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { + group: {wire: 'group', children: () => groupFieldMaskSchema}, + internalId: {wire: 'internal_id'}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateGroupProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateGroupProxyRequestFieldMaskSchema + ); +} + +const updateGroupRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + group: {wire: 'group', children: () => groupFieldMaskSchema}, + internalId: {wire: 'internal_id'}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateGroupRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateGroupRequestFieldMaskSchema + ); +} + +const updateServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { + internalId: {wire: 'internal_id'}, + servicePrincipal: { + wire: 'service_principal', + children: () => servicePrincipalFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateServicePrincipalProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateServicePrincipalProxyRequestFieldMaskSchema + ); +} + +const updateServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + internalId: {wire: 'internal_id'}, + servicePrincipal: { + wire: 'service_principal', + children: () => servicePrincipalFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateServicePrincipalRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateServicePrincipalRequestFieldMaskSchema + ); +} + +const updateUserProxyRequestFieldMaskSchema: FieldMaskSchema = { + internalId: {wire: 'internal_id'}, + updateMask: {wire: 'update_mask'}, + user: {wire: 'user', children: () => userFieldMaskSchema}, +}; + +export function updateUserProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateUserProxyRequestFieldMaskSchema + ); +} + +const updateUserRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + internalId: {wire: 'internal_id'}, + updateMask: {wire: 'update_mask'}, + user: {wire: 'user', children: () => userFieldMaskSchema}, +}; + +export function updateUserRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateUserRequestFieldMaskSchema + ); +} + +const updateWorkspaceAssignmentDetailProxyRequestFieldMaskSchema: FieldMaskSchema = + { + principalId: {wire: 'principal_id'}, + updateMask: {wire: 'update_mask'}, + workspaceAssignmentDetail: { + wire: 'workspace_assignment_detail', + children: () => workspaceAssignmentDetailFieldMaskSchema, + }, + }; + +export function updateWorkspaceAssignmentDetailProxyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateWorkspaceAssignmentDetailProxyRequestFieldMaskSchema + ); +} + +const updateWorkspaceAssignmentDetailRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + principalId: {wire: 'principal_id'}, + updateMask: {wire: 'update_mask'}, + workspaceAssignmentDetail: { + wire: 'workspace_assignment_detail', + children: () => workspaceAssignmentDetailFieldMaskSchema, + }, + workspaceId: {wire: 'workspace_id'}, +}; + +export function updateWorkspaceAssignmentDetailRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateWorkspaceAssignmentDetailRequestFieldMaskSchema + ); +} + +const updateWorkspaceIdentityDetailRequestFieldMaskSchema: FieldMaskSchema = { + principalId: {wire: 'principal_id'}, + updateMask: {wire: 'update_mask'}, + workspaceIdentityDetail: { + wire: 'workspace_identity_detail', + children: () => workspaceIdentityDetailFieldMaskSchema, + }, +}; + +export function updateWorkspaceIdentityDetailRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateWorkspaceIdentityDetailRequestFieldMaskSchema + ); +} + +const userFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + accountUserStatus: {wire: 'account_user_status'}, + externalId: {wire: 'external_id'}, + internalId: {wire: 'internal_id'}, + name: {wire: 'name', children: () => user_NameFieldMaskSchema}, + username: {wire: 'username'}, +}; + +export function userFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, userFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const user_NameFieldMaskSchema: FieldMaskSchema = { + familyName: {wire: 'family_name'}, + givenName: {wire: 'given_name'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function user_NameFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, user_NameFieldMaskSchema); +} + +const workspaceAccessDetailFieldMaskSchema: FieldMaskSchema = { + accessType: {wire: 'access_type'}, + accountId: {wire: 'account_id'}, + permissions: {wire: 'permissions'}, + principalId: {wire: 'principal_id'}, + principalType: {wire: 'principal_type'}, + status: {wire: 'status'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function workspaceAccessDetailFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + workspaceAccessDetailFieldMaskSchema + ); +} + +const workspaceAssignmentDetailFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + entitlements: {wire: 'entitlements'}, + principalId: {wire: 'principal_id'}, + principalType: {wire: 'principal_type'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function workspaceAssignmentDetailFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + workspaceAssignmentDetailFieldMaskSchema + ); +} + +const workspaceIdentityDetailFieldMaskSchema: FieldMaskSchema = { + assignmentType: {wire: 'assignment_type'}, + principalId: {wire: 'principal_id'}, + principalType: {wire: 'principal_type'}, + workspaceIdentityStatus: {wire: 'workspace_identity_status'}, +}; + +export function workspaceIdentityDetailFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + workspaceIdentityDetailFieldMaskSchema + ); +} diff --git a/packages/instancepools/src/v2/model.ts b/packages/instancepools/src/v2/model.ts index e4499230..c7dc4cba 100644 --- a/packages/instancepools/src/v2/model.ts +++ b/packages/instancepools/src/v2/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** @@ -1546,3 +1548,529 @@ export const marshalPendingInstanceErrorSchema: z.ZodType = z instance_id: d.instanceId, message: d.message, })); + +const createInstancePoolFieldMaskSchema: FieldMaskSchema = { + awsAttributes: { + wire: 'aws_attributes', + children: () => instancePoolAwsAttributesFieldMaskSchema, + }, + azureAttributes: { + wire: 'azure_attributes', + children: () => instancePoolAzureAttributesFieldMaskSchema, + }, + customTags: {wire: 'custom_tags'}, + diskSpec: {wire: 'disk_spec', children: () => diskSpecFieldMaskSchema}, + enableAutoAlternateNodeTypes: {wire: 'enable_auto_alternate_node_types'}, + enableElasticDisk: {wire: 'enable_elastic_disk'}, + gcpAttributes: { + wire: 'gcp_attributes', + children: () => instancePoolGcpAttributesFieldMaskSchema, + }, + idleInstanceAutoterminationMinutes: { + wire: 'idle_instance_autotermination_minutes', + }, + instancePoolName: {wire: 'instance_pool_name'}, + maxCapacity: {wire: 'max_capacity'}, + minIdleInstances: {wire: 'min_idle_instances'}, + nodeTypeFlexibility: { + wire: 'node_type_flexibility', + children: () => nodeTypeFlexibilityFieldMaskSchema, + }, + nodeTypeId: {wire: 'node_type_id'}, + preloadedDockerImages: {wire: 'preloaded_docker_images'}, + preloadedSparkVersions: {wire: 'preloaded_spark_versions'}, + remoteDiskThroughput: {wire: 'remote_disk_throughput'}, + totalInitialRemoteDiskSize: {wire: 'total_initial_remote_disk_size'}, +}; + +export function createInstancePoolFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createInstancePoolFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createInstancePool_CustomTagsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createInstancePool_CustomTagsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createInstancePool_CustomTagsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createInstancePool_ResponseFieldMaskSchema: FieldMaskSchema = { + instancePoolId: {wire: 'instance_pool_id'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createInstancePool_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createInstancePool_ResponseFieldMaskSchema + ); +} + +const deleteInstancePoolFieldMaskSchema: FieldMaskSchema = { + instancePoolId: {wire: 'instance_pool_id'}, +}; + +export function deleteInstancePoolFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteInstancePoolFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteInstancePool_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteInstancePool_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteInstancePool_ResponseFieldMaskSchema + ); +} + +const diskSpecFieldMaskSchema: FieldMaskSchema = { + diskCount: {wire: 'disk_count'}, + diskIops: {wire: 'disk_iops'}, + diskSize: {wire: 'disk_size'}, + diskThroughput: {wire: 'disk_throughput'}, + diskType: {wire: 'disk_type', children: () => diskTypeFieldMaskSchema}, +}; + +export function diskSpecFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, diskSpecFieldMaskSchema); +} + +const diskTypeFieldMaskSchema: FieldMaskSchema = { + azureDiskVolumeType: {wire: 'azure_disk_volume_type'}, + ebsVolumeType: {wire: 'ebs_volume_type'}, +}; + +export function diskTypeFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, diskTypeFieldMaskSchema); +} + +const dockerBasicAuthFieldMaskSchema: FieldMaskSchema = { + password: {wire: 'password'}, + username: {wire: 'username'}, +}; + +export function dockerBasicAuthFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + dockerBasicAuthFieldMaskSchema + ); +} + +const dockerImageFieldMaskSchema: FieldMaskSchema = { + basicAuth: { + wire: 'basic_auth', + children: () => dockerBasicAuthFieldMaskSchema, + }, + url: {wire: 'url'}, +}; + +export function dockerImageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, dockerImageFieldMaskSchema); +} + +const editInstancePoolFieldMaskSchema: FieldMaskSchema = { + awsAttributes: { + wire: 'aws_attributes', + children: () => instancePoolAwsAttributesFieldMaskSchema, + }, + azureAttributes: { + wire: 'azure_attributes', + children: () => instancePoolAzureAttributesFieldMaskSchema, + }, + customTags: {wire: 'custom_tags'}, + diskSpec: {wire: 'disk_spec', children: () => diskSpecFieldMaskSchema}, + enableAutoAlternateNodeTypes: {wire: 'enable_auto_alternate_node_types'}, + enableElasticDisk: {wire: 'enable_elastic_disk'}, + gcpAttributes: { + wire: 'gcp_attributes', + children: () => instancePoolGcpAttributesFieldMaskSchema, + }, + idleInstanceAutoterminationMinutes: { + wire: 'idle_instance_autotermination_minutes', + }, + instancePoolId: {wire: 'instance_pool_id'}, + instancePoolName: {wire: 'instance_pool_name'}, + maxCapacity: {wire: 'max_capacity'}, + minIdleInstances: {wire: 'min_idle_instances'}, + nodeTypeFlexibility: { + wire: 'node_type_flexibility', + children: () => nodeTypeFlexibilityFieldMaskSchema, + }, + nodeTypeId: {wire: 'node_type_id'}, + preloadedDockerImages: {wire: 'preloaded_docker_images'}, + preloadedSparkVersions: {wire: 'preloaded_spark_versions'}, + remoteDiskThroughput: {wire: 'remote_disk_throughput'}, + totalInitialRemoteDiskSize: {wire: 'total_initial_remote_disk_size'}, +}; + +export function editInstancePoolFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + editInstancePoolFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const editInstancePool_CustomTagsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function editInstancePool_CustomTagsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + editInstancePool_CustomTagsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const editInstancePool_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function editInstancePool_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + editInstancePool_ResponseFieldMaskSchema + ); +} + +const getInstancePoolFieldMaskSchema: FieldMaskSchema = { + instancePoolId: {wire: 'instance_pool_id'}, +}; + +export function getInstancePoolFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getInstancePoolFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getInstancePool_ResponseFieldMaskSchema: FieldMaskSchema = { + awsAttributes: { + wire: 'aws_attributes', + children: () => instancePoolAwsAttributesFieldMaskSchema, + }, + azureAttributes: { + wire: 'azure_attributes', + children: () => instancePoolAzureAttributesFieldMaskSchema, + }, + customTags: {wire: 'custom_tags'}, + defaultTags: {wire: 'default_tags'}, + diskSpec: {wire: 'disk_spec', children: () => diskSpecFieldMaskSchema}, + enableAutoAlternateNodeTypes: {wire: 'enable_auto_alternate_node_types'}, + enableElasticDisk: {wire: 'enable_elastic_disk'}, + gcpAttributes: { + wire: 'gcp_attributes', + children: () => instancePoolGcpAttributesFieldMaskSchema, + }, + idleInstanceAutoterminationMinutes: { + wire: 'idle_instance_autotermination_minutes', + }, + instancePoolId: {wire: 'instance_pool_id'}, + instancePoolName: {wire: 'instance_pool_name'}, + maxCapacity: {wire: 'max_capacity'}, + minIdleInstances: {wire: 'min_idle_instances'}, + nodeTypeFlexibility: { + wire: 'node_type_flexibility', + children: () => nodeTypeFlexibilityFieldMaskSchema, + }, + nodeTypeId: {wire: 'node_type_id'}, + preloadedDockerImages: {wire: 'preloaded_docker_images'}, + preloadedSparkVersions: {wire: 'preloaded_spark_versions'}, + remoteDiskThroughput: {wire: 'remote_disk_throughput'}, + state: {wire: 'state'}, + stats: {wire: 'stats', children: () => instancePoolStatsFieldMaskSchema}, + status: {wire: 'status', children: () => instancePoolStatusFieldMaskSchema}, + totalInitialRemoteDiskSize: {wire: 'total_initial_remote_disk_size'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getInstancePool_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getInstancePool_ResponseFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getInstancePool_Response_CustomTagsEntryFieldMaskSchema: FieldMaskSchema = + { + key: {wire: 'key'}, + value: {wire: 'value'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getInstancePool_Response_CustomTagsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getInstancePool_Response_CustomTagsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getInstancePool_Response_DefaultTagsEntryFieldMaskSchema: FieldMaskSchema = + { + key: {wire: 'key'}, + value: {wire: 'value'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getInstancePool_Response_DefaultTagsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getInstancePool_Response_DefaultTagsEntryFieldMaskSchema + ); +} + +const instancePoolAndStatsFieldMaskSchema: FieldMaskSchema = { + awsAttributes: { + wire: 'aws_attributes', + children: () => instancePoolAwsAttributesFieldMaskSchema, + }, + azureAttributes: { + wire: 'azure_attributes', + children: () => instancePoolAzureAttributesFieldMaskSchema, + }, + customTags: {wire: 'custom_tags'}, + defaultTags: {wire: 'default_tags'}, + diskSpec: {wire: 'disk_spec', children: () => diskSpecFieldMaskSchema}, + enableAutoAlternateNodeTypes: {wire: 'enable_auto_alternate_node_types'}, + enableElasticDisk: {wire: 'enable_elastic_disk'}, + gcpAttributes: { + wire: 'gcp_attributes', + children: () => instancePoolGcpAttributesFieldMaskSchema, + }, + idleInstanceAutoterminationMinutes: { + wire: 'idle_instance_autotermination_minutes', + }, + instancePoolId: {wire: 'instance_pool_id'}, + instancePoolName: {wire: 'instance_pool_name'}, + maxCapacity: {wire: 'max_capacity'}, + minIdleInstances: {wire: 'min_idle_instances'}, + nodeTypeFlexibility: { + wire: 'node_type_flexibility', + children: () => nodeTypeFlexibilityFieldMaskSchema, + }, + nodeTypeId: {wire: 'node_type_id'}, + preloadedDockerImages: {wire: 'preloaded_docker_images'}, + preloadedSparkVersions: {wire: 'preloaded_spark_versions'}, + remoteDiskThroughput: {wire: 'remote_disk_throughput'}, + state: {wire: 'state'}, + stats: {wire: 'stats', children: () => instancePoolStatsFieldMaskSchema}, + status: {wire: 'status', children: () => instancePoolStatusFieldMaskSchema}, + totalInitialRemoteDiskSize: {wire: 'total_initial_remote_disk_size'}, +}; + +export function instancePoolAndStatsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + instancePoolAndStatsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const instancePoolAndStats_CustomTagsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function instancePoolAndStats_CustomTagsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + instancePoolAndStats_CustomTagsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const instancePoolAndStats_DefaultTagsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function instancePoolAndStats_DefaultTagsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + instancePoolAndStats_DefaultTagsEntryFieldMaskSchema + ); +} + +const instancePoolAwsAttributesFieldMaskSchema: FieldMaskSchema = { + availability: {wire: 'availability'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + spotBidPricePercent: {wire: 'spot_bid_price_percent'}, + zoneId: {wire: 'zone_id'}, +}; + +export function instancePoolAwsAttributesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + instancePoolAwsAttributesFieldMaskSchema + ); +} + +const instancePoolAzureAttributesFieldMaskSchema: FieldMaskSchema = { + availability: {wire: 'availability'}, + spotBidMaxPrice: {wire: 'spot_bid_max_price'}, +}; + +export function instancePoolAzureAttributesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + instancePoolAzureAttributesFieldMaskSchema + ); +} + +const instancePoolGcpAttributesFieldMaskSchema: FieldMaskSchema = { + gcpAvailability: {wire: 'gcp_availability'}, + localSsdCount: {wire: 'local_ssd_count'}, + zoneId: {wire: 'zone_id'}, +}; + +export function instancePoolGcpAttributesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + instancePoolGcpAttributesFieldMaskSchema + ); +} + +const instancePoolStatsFieldMaskSchema: FieldMaskSchema = { + idleCount: {wire: 'idle_count'}, + pendingIdleCount: {wire: 'pending_idle_count'}, + pendingUsedCount: {wire: 'pending_used_count'}, + usedCount: {wire: 'used_count'}, +}; + +export function instancePoolStatsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + instancePoolStatsFieldMaskSchema + ); +} + +const instancePoolStatusFieldMaskSchema: FieldMaskSchema = { + pendingInstanceErrors: {wire: 'pending_instance_errors'}, +}; + +export function instancePoolStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + instancePoolStatusFieldMaskSchema + ); +} + +const listInstancePoolsFieldMaskSchema: FieldMaskSchema = {}; + +export function listInstancePoolsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listInstancePoolsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listInstancePools_ResponseFieldMaskSchema: FieldMaskSchema = { + instancePools: {wire: 'instance_pools'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listInstancePools_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listInstancePools_ResponseFieldMaskSchema + ); +} + +const nodeTypeFlexibilityFieldMaskSchema: FieldMaskSchema = { + alternateNodeTypeIds: {wire: 'alternate_node_type_ids'}, +}; + +export function nodeTypeFlexibilityFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + nodeTypeFlexibilityFieldMaskSchema + ); +} + +const pendingInstanceErrorFieldMaskSchema: FieldMaskSchema = { + instanceId: {wire: 'instance_id'}, + message: {wire: 'message'}, +}; + +export function pendingInstanceErrorFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + pendingInstanceErrorFieldMaskSchema + ); +} diff --git a/packages/instanceprofiles/src/v2/model.ts b/packages/instanceprofiles/src/v2/model.ts index e153148c..263b26c0 100644 --- a/packages/instanceprofiles/src/v2/model.ts +++ b/packages/instanceprofiles/src/v2/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface AddInstanceProfile { @@ -242,3 +244,127 @@ export const marshalRemoveInstanceProfileSchema: z.ZodType = z export const marshalRemoveInstanceProfile_ResponseSchema: z.ZodType = z.object( {} ); + +const addInstanceProfileFieldMaskSchema: FieldMaskSchema = { + iamRoleArn: {wire: 'iam_role_arn'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + isMetaInstanceProfile: {wire: 'is_meta_instance_profile'}, + skipValidation: {wire: 'skip_validation'}, +}; + +export function addInstanceProfileFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + addInstanceProfileFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const addInstanceProfile_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function addInstanceProfile_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + addInstanceProfile_ResponseFieldMaskSchema + ); +} + +const editInstanceProfileFieldMaskSchema: FieldMaskSchema = { + iamRoleArn: {wire: 'iam_role_arn'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + isMetaInstanceProfile: {wire: 'is_meta_instance_profile'}, +}; + +export function editInstanceProfileFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + editInstanceProfileFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const editInstanceProfile_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function editInstanceProfile_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + editInstanceProfile_ResponseFieldMaskSchema + ); +} + +const instanceProfileFieldMaskSchema: FieldMaskSchema = { + iamRoleArn: {wire: 'iam_role_arn'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + isMetaInstanceProfile: {wire: 'is_meta_instance_profile'}, +}; + +export function instanceProfileFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + instanceProfileFieldMaskSchema + ); +} + +const listInstanceProfilesFieldMaskSchema: FieldMaskSchema = {}; + +export function listInstanceProfilesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listInstanceProfilesFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listInstanceProfiles_ResponseFieldMaskSchema: FieldMaskSchema = { + instanceProfiles: {wire: 'instance_profiles'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listInstanceProfiles_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listInstanceProfiles_ResponseFieldMaskSchema + ); +} + +const removeInstanceProfileFieldMaskSchema: FieldMaskSchema = { + instanceProfileArn: {wire: 'instance_profile_arn'}, +}; + +export function removeInstanceProfileFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + removeInstanceProfileFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const removeInstanceProfile_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function removeInstanceProfile_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + removeInstanceProfile_ResponseFieldMaskSchema + ); +} diff --git a/packages/materializedfeatures/src/v1/model.ts b/packages/materializedfeatures/src/v1/model.ts index 6e29c771..df1d38b7 100644 --- a/packages/materializedfeatures/src/v1/model.ts +++ b/packages/materializedfeatures/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Request message for CreateFeatureTag. */ @@ -235,3 +237,176 @@ export const marshalListFeatureTagsResponseSchema: z.ZodType = z feature_tags: d.featureTags, next_page_token: d.nextPageToken, })); + +const createFeatureTagRequestFieldMaskSchema: FieldMaskSchema = { + featureName: {wire: 'feature_name'}, + featureTag: {wire: 'feature_tag', children: () => featureTagFieldMaskSchema}, + tableName: {wire: 'table_name'}, +}; + +export function createFeatureTagRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createFeatureTagRequestFieldMaskSchema + ); +} + +const deleteFeatureTagRequestFieldMaskSchema: FieldMaskSchema = { + featureName: {wire: 'feature_name'}, + key: {wire: 'key'}, + tableName: {wire: 'table_name'}, +}; + +export function deleteFeatureTagRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteFeatureTagRequestFieldMaskSchema + ); +} + +const featureLineageFieldMaskSchema: FieldMaskSchema = { + featureSpecs: {wire: 'feature_specs'}, + models: {wire: 'models'}, + onlineFeatures: {wire: 'online_features'}, +}; + +export function featureLineageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, featureLineageFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const featureLineage_FeatureSpecFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function featureLineage_FeatureSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + featureLineage_FeatureSpecFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const featureLineage_ModelFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + version: {wire: 'version'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function featureLineage_ModelFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + featureLineage_ModelFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const featureLineage_OnlineFeatureFieldMaskSchema: FieldMaskSchema = { + featureName: {wire: 'feature_name'}, + tableName: {wire: 'table_name'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function featureLineage_OnlineFeatureFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + featureLineage_OnlineFeatureFieldMaskSchema + ); +} + +const featureTagFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +export function featureTagFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, featureTagFieldMaskSchema); +} + +const getFeatureLineageRequestFieldMaskSchema: FieldMaskSchema = { + featureName: {wire: 'feature_name'}, + tableName: {wire: 'table_name'}, +}; + +export function getFeatureLineageRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getFeatureLineageRequestFieldMaskSchema + ); +} + +const getFeatureTagRequestFieldMaskSchema: FieldMaskSchema = { + featureName: {wire: 'feature_name'}, + key: {wire: 'key'}, + tableName: {wire: 'table_name'}, +}; + +export function getFeatureTagRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getFeatureTagRequestFieldMaskSchema + ); +} + +const listFeatureTagsRequestFieldMaskSchema: FieldMaskSchema = { + featureName: {wire: 'feature_name'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + tableName: {wire: 'table_name'}, +}; + +export function listFeatureTagsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listFeatureTagsRequestFieldMaskSchema + ); +} + +const listFeatureTagsResponseFieldMaskSchema: FieldMaskSchema = { + featureTags: {wire: 'feature_tags'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listFeatureTagsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listFeatureTagsResponseFieldMaskSchema + ); +} + +const updateFeatureTagRequestFieldMaskSchema: FieldMaskSchema = { + featureName: {wire: 'feature_name'}, + featureTag: {wire: 'feature_tag', children: () => featureTagFieldMaskSchema}, + tableName: {wire: 'table_name'}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateFeatureTagRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateFeatureTagRequestFieldMaskSchema + ); +} diff --git a/packages/metastores/src/v1/model.ts b/packages/metastores/src/v1/model.ts index 36c4d556..aceb1a14 100644 --- a/packages/metastores/src/v1/model.ts +++ b/packages/metastores/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name. @@ -791,3 +793,331 @@ export const marshalUpdateMetastoreAssignmentSchema: z.ZodType = z // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const marshalUpdateMetastoreAssignment_ResponseSchema: z.ZodType = z.object({}); + +const createMetastoreFieldMaskSchema: FieldMaskSchema = { + cloud: {wire: 'cloud'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + defaultDataAccessConfigId: {wire: 'default_data_access_config_id'}, + deltaSharingOrganizationName: {wire: 'delta_sharing_organization_name'}, + deltaSharingRecipientTokenLifetimeInSeconds: { + wire: 'delta_sharing_recipient_token_lifetime_in_seconds', + }, + deltaSharingScope: {wire: 'delta_sharing_scope'}, + externalAccessEnabled: {wire: 'external_access_enabled'}, + globalMetastoreId: {wire: 'global_metastore_id'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + privilegeModelVersion: {wire: 'privilege_model_version'}, + region: {wire: 'region'}, + storageRoot: {wire: 'storage_root'}, + storageRootCredentialId: {wire: 'storage_root_credential_id'}, + storageRootCredentialName: {wire: 'storage_root_credential_name'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function createMetastoreFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createMetastoreFieldMaskSchema + ); +} + +const createMetastoreAssignmentFieldMaskSchema: FieldMaskSchema = { + defaultCatalogName: {wire: 'default_catalog_name'}, + metastoreId: {wire: 'metastore_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function createMetastoreAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createMetastoreAssignmentFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createMetastoreAssignment_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createMetastoreAssignment_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createMetastoreAssignment_ResponseFieldMaskSchema + ); +} + +const deleteMetastoreFieldMaskSchema: FieldMaskSchema = { + force: {wire: 'force'}, + id: {wire: 'id'}, +}; + +export function deleteMetastoreFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteMetastoreFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteMetastore_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteMetastore_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteMetastore_ResponseFieldMaskSchema + ); +} + +const deleteMetastoreAssignmentFieldMaskSchema: FieldMaskSchema = { + metastoreId: {wire: 'metastore_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function deleteMetastoreAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteMetastoreAssignmentFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteMetastoreAssignment_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteMetastoreAssignment_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteMetastoreAssignment_ResponseFieldMaskSchema + ); +} + +const deltaSharingScopeFieldMaskSchema: FieldMaskSchema = {}; + +export function deltaSharingScopeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deltaSharingScopeFieldMaskSchema + ); +} + +const getCurrentMetastoreAssignmentFieldMaskSchema: FieldMaskSchema = {}; + +export function getCurrentMetastoreAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getCurrentMetastoreAssignmentFieldMaskSchema + ); +} + +const getMetastoreFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function getMetastoreFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, getMetastoreFieldMaskSchema); +} + +const getMetastoreSummaryFieldMaskSchema: FieldMaskSchema = {}; + +export function getMetastoreSummaryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getMetastoreSummaryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getMetastoreSummary_ResponseFieldMaskSchema: FieldMaskSchema = { + cloud: {wire: 'cloud'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + defaultDataAccessConfigId: {wire: 'default_data_access_config_id'}, + deltaSharingOrganizationName: {wire: 'delta_sharing_organization_name'}, + deltaSharingRecipientTokenLifetimeInSeconds: { + wire: 'delta_sharing_recipient_token_lifetime_in_seconds', + }, + deltaSharingScope: {wire: 'delta_sharing_scope'}, + externalAccessEnabled: {wire: 'external_access_enabled'}, + globalMetastoreId: {wire: 'global_metastore_id'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + privilegeModelVersion: {wire: 'privilege_model_version'}, + region: {wire: 'region'}, + storageRoot: {wire: 'storage_root'}, + storageRootCredentialId: {wire: 'storage_root_credential_id'}, + storageRootCredentialName: {wire: 'storage_root_credential_name'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getMetastoreSummary_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getMetastoreSummary_ResponseFieldMaskSchema + ); +} + +const listMetastoresFieldMaskSchema: FieldMaskSchema = { + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listMetastoresFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listMetastoresFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listMetastores_ResponseFieldMaskSchema: FieldMaskSchema = { + metastores: {wire: 'metastores'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listMetastores_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listMetastores_ResponseFieldMaskSchema + ); +} + +const metastoreAssignmentFieldMaskSchema: FieldMaskSchema = { + defaultCatalogName: {wire: 'default_catalog_name'}, + metastoreId: {wire: 'metastore_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function metastoreAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + metastoreAssignmentFieldMaskSchema + ); +} + +const metastoreInfoFieldMaskSchema: FieldMaskSchema = { + cloud: {wire: 'cloud'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + defaultDataAccessConfigId: {wire: 'default_data_access_config_id'}, + deltaSharingOrganizationName: {wire: 'delta_sharing_organization_name'}, + deltaSharingRecipientTokenLifetimeInSeconds: { + wire: 'delta_sharing_recipient_token_lifetime_in_seconds', + }, + deltaSharingScope: {wire: 'delta_sharing_scope'}, + externalAccessEnabled: {wire: 'external_access_enabled'}, + globalMetastoreId: {wire: 'global_metastore_id'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + privilegeModelVersion: {wire: 'privilege_model_version'}, + region: {wire: 'region'}, + storageRoot: {wire: 'storage_root'}, + storageRootCredentialId: {wire: 'storage_root_credential_id'}, + storageRootCredentialName: {wire: 'storage_root_credential_name'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function metastoreInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, metastoreInfoFieldMaskSchema); +} + +const updateMetastoreFieldMaskSchema: FieldMaskSchema = { + cloud: {wire: 'cloud'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + defaultDataAccessConfigId: {wire: 'default_data_access_config_id'}, + deltaSharingOrganizationName: {wire: 'delta_sharing_organization_name'}, + deltaSharingRecipientTokenLifetimeInSeconds: { + wire: 'delta_sharing_recipient_token_lifetime_in_seconds', + }, + deltaSharingScope: {wire: 'delta_sharing_scope'}, + externalAccessEnabled: {wire: 'external_access_enabled'}, + globalMetastoreId: {wire: 'global_metastore_id'}, + id: {wire: 'id'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + newName: {wire: 'new_name'}, + owner: {wire: 'owner'}, + privilegeModelVersion: {wire: 'privilege_model_version'}, + region: {wire: 'region'}, + storageRoot: {wire: 'storage_root'}, + storageRootCredentialId: {wire: 'storage_root_credential_id'}, + storageRootCredentialName: {wire: 'storage_root_credential_name'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function updateMetastoreFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateMetastoreFieldMaskSchema + ); +} + +const updateMetastoreAssignmentFieldMaskSchema: FieldMaskSchema = { + defaultCatalogName: {wire: 'default_catalog_name'}, + metastoreId: {wire: 'metastore_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function updateMetastoreAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateMetastoreAssignmentFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateMetastoreAssignment_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateMetastoreAssignment_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateMetastoreAssignment_ResponseFieldMaskSchema + ); +} diff --git a/packages/notificationdestinations/src/v1/model.ts b/packages/notificationdestinations/src/v1/model.ts index 977fefff..462e7289 100644 --- a/packages/notificationdestinations/src/v1/model.ts +++ b/packages/notificationdestinations/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum DestinationType { @@ -473,3 +475,224 @@ export const marshalUpdateNotificationDestinationRequestSchema: z.ZodType = z display_name: d.displayName, config: d.config, })); + +const configFieldMaskSchema: FieldMaskSchema = { + email: {wire: 'email', children: () => emailConfigFieldMaskSchema}, + genericWebhook: { + wire: 'generic_webhook', + children: () => genericWebhookConfigFieldMaskSchema, + }, + microsoftTeams: { + wire: 'microsoft_teams', + children: () => microsoftTeamsConfigFieldMaskSchema, + }, + pagerduty: { + wire: 'pagerduty', + children: () => pagerdutyConfigFieldMaskSchema, + }, + slack: {wire: 'slack', children: () => slackConfigFieldMaskSchema}, +}; + +export function configFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, configFieldMaskSchema); +} + +const createNotificationDestinationRequestFieldMaskSchema: FieldMaskSchema = { + config: {wire: 'config', children: () => configFieldMaskSchema}, + displayName: {wire: 'display_name'}, +}; + +export function createNotificationDestinationRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createNotificationDestinationRequestFieldMaskSchema + ); +} + +const deleteNotificationDestinationRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function deleteNotificationDestinationRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteNotificationDestinationRequestFieldMaskSchema + ); +} + +const emailConfigFieldMaskSchema: FieldMaskSchema = { + addresses: {wire: 'addresses'}, +}; + +export function emailConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, emailConfigFieldMaskSchema); +} + +const emptyFieldMaskSchema: FieldMaskSchema = {}; + +export function emptyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, emptyFieldMaskSchema); +} + +const genericWebhookConfigFieldMaskSchema: FieldMaskSchema = { + password: {wire: 'password'}, + passwordSet: {wire: 'password_set'}, + url: {wire: 'url'}, + urlSet: {wire: 'url_set'}, + username: {wire: 'username'}, + usernameSet: {wire: 'username_set'}, +}; + +export function genericWebhookConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + genericWebhookConfigFieldMaskSchema + ); +} + +const getNotificationDestinationRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function getNotificationDestinationRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getNotificationDestinationRequestFieldMaskSchema + ); +} + +const listNotificationDestinationsRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listNotificationDestinationsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listNotificationDestinationsRequestFieldMaskSchema + ); +} + +const listNotificationDestinationsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + results: {wire: 'results'}, +}; + +export function listNotificationDestinationsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listNotificationDestinationsResponseFieldMaskSchema + ); +} + +const listNotificationDestinationsResultFieldMaskSchema: FieldMaskSchema = { + config: {wire: 'config', children: () => configFieldMaskSchema}, + destinationType: {wire: 'destination_type'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, +}; + +export function listNotificationDestinationsResultFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listNotificationDestinationsResultFieldMaskSchema + ); +} + +const microsoftTeamsConfigFieldMaskSchema: FieldMaskSchema = { + appId: {wire: 'app_id'}, + appIdSet: {wire: 'app_id_set'}, + authSecret: {wire: 'auth_secret'}, + authSecretSet: {wire: 'auth_secret_set'}, + channelUrl: {wire: 'channel_url'}, + channelUrlSet: {wire: 'channel_url_set'}, + tenantId: {wire: 'tenant_id'}, + tenantIdSet: {wire: 'tenant_id_set'}, + url: {wire: 'url'}, + urlSet: {wire: 'url_set'}, +}; + +export function microsoftTeamsConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + microsoftTeamsConfigFieldMaskSchema + ); +} + +const notificationDestinationFieldMaskSchema: FieldMaskSchema = { + config: {wire: 'config', children: () => configFieldMaskSchema}, + destinationType: {wire: 'destination_type'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, +}; + +export function notificationDestinationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + notificationDestinationFieldMaskSchema + ); +} + +const pagerdutyConfigFieldMaskSchema: FieldMaskSchema = { + integrationKey: {wire: 'integration_key'}, + integrationKeySet: {wire: 'integration_key_set'}, +}; + +export function pagerdutyConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + pagerdutyConfigFieldMaskSchema + ); +} + +const slackConfigFieldMaskSchema: FieldMaskSchema = { + channelId: {wire: 'channel_id'}, + channelIdSet: {wire: 'channel_id_set'}, + oauthToken: {wire: 'oauth_token'}, + oauthTokenSet: {wire: 'oauth_token_set'}, + url: {wire: 'url'}, + urlSet: {wire: 'url_set'}, +}; + +export function slackConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, slackConfigFieldMaskSchema); +} + +const updateNotificationDestinationRequestFieldMaskSchema: FieldMaskSchema = { + config: {wire: 'config', children: () => configFieldMaskSchema}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, +}; + +export function updateNotificationDestinationRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateNotificationDestinationRequestFieldMaskSchema + ); +} diff --git a/packages/oauthcustomappintegration/src/v1/model.ts b/packages/oauthcustomappintegration/src/v1/model.ts index 24a2cad0..508b8544 100644 --- a/packages/oauthcustomappintegration/src/v1/model.ts +++ b/packages/oauthcustomappintegration/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface CreateCustomOAuthAppIntegration { @@ -626,3 +628,358 @@ export const marshalUpdatePublishedOAuthAppIntegrationSchema: z.ZodType = z // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const marshalUpdatePublishedOAuthAppIntegration_ResponseSchema: z.ZodType = z.object({}); + +const createCustomOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + confidential: {wire: 'confidential'}, + name: {wire: 'name'}, + redirectUrls: {wire: 'redirect_urls'}, + scopes: {wire: 'scopes'}, + tokenAccessPolicy: { + wire: 'token_access_policy', + children: () => tokenAccessPolicyFieldMaskSchema, + }, + userAuthorizedScopes: {wire: 'user_authorized_scopes'}, +}; + +export function createCustomOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createCustomOAuthAppIntegrationFieldMaskSchema + ); +} + +const createPublishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + appId: {wire: 'app_id'}, + tokenAccessPolicy: { + wire: 'token_access_policy', + children: () => tokenAccessPolicyFieldMaskSchema, + }, +}; + +export function createPublishedOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createPublishedOAuthAppIntegrationFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createPublishedOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = + { + integrationId: {wire: 'integration_id'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createPublishedOAuthAppIntegration_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createPublishedOAuthAppIntegration_ResponseFieldMaskSchema + ); +} + +const customOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + clientId: {wire: 'client_id'}, + confidential: {wire: 'confidential'}, + createTime: {wire: 'create_time'}, + createdBy: {wire: 'created_by'}, + creatorUsername: {wire: 'creator_username'}, + integrationId: {wire: 'integration_id'}, + name: {wire: 'name'}, + principalId: {wire: 'principal_id'}, + redirectUrls: {wire: 'redirect_urls'}, + scopes: {wire: 'scopes'}, + tokenAccessPolicy: { + wire: 'token_access_policy', + children: () => tokenAccessPolicyFieldMaskSchema, + }, + userAuthorizedScopes: {wire: 'user_authorized_scopes'}, +}; + +export function customOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + customOAuthAppIntegrationFieldMaskSchema + ); +} + +const customOAuthAppIntegrationSecretFieldMaskSchema: FieldMaskSchema = { + clientId: {wire: 'client_id'}, + clientSecret: {wire: 'client_secret'}, + clientSecretExpireTime: {wire: 'client_secret_expire_time'}, + integrationId: {wire: 'integration_id'}, + principalId: {wire: 'principal_id'}, +}; + +export function customOAuthAppIntegrationSecretFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + customOAuthAppIntegrationSecretFieldMaskSchema + ); +} + +const deleteCustomOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + integrationId: {wire: 'integration_id'}, +}; + +export function deleteCustomOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteCustomOAuthAppIntegrationFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteCustomOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = + {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteCustomOAuthAppIntegration_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteCustomOAuthAppIntegration_ResponseFieldMaskSchema + ); +} + +const deletePublishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + integrationId: {wire: 'integration_id'}, +}; + +export function deletePublishedOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deletePublishedOAuthAppIntegrationFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deletePublishedOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = + {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deletePublishedOAuthAppIntegration_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deletePublishedOAuthAppIntegration_ResponseFieldMaskSchema + ); +} + +const getCustomOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + integrationId: {wire: 'integration_id'}, +}; + +export function getCustomOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getCustomOAuthAppIntegrationFieldMaskSchema + ); +} + +const getPublishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + integrationId: {wire: 'integration_id'}, +}; + +export function getPublishedOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getPublishedOAuthAppIntegrationFieldMaskSchema + ); +} + +const listCustomOAuthAppIntegrationsFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + includeCreatorUsername: {wire: 'include_creator_username'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listCustomOAuthAppIntegrationsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listCustomOAuthAppIntegrationsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listCustomOAuthAppIntegrations_ResponseFieldMaskSchema: FieldMaskSchema = + { + apps: {wire: 'apps'}, + nextPageToken: {wire: 'next_page_token'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listCustomOAuthAppIntegrations_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listCustomOAuthAppIntegrations_ResponseFieldMaskSchema + ); +} + +const listPublishedOAuthAppIntegrationsFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listPublishedOAuthAppIntegrationsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPublishedOAuthAppIntegrationsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listPublishedOAuthAppIntegrations_ResponseFieldMaskSchema: FieldMaskSchema = + { + apps: {wire: 'apps'}, + nextPageToken: {wire: 'next_page_token'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listPublishedOAuthAppIntegrations_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPublishedOAuthAppIntegrations_ResponseFieldMaskSchema + ); +} + +const publishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + appId: {wire: 'app_id'}, + createTime: {wire: 'create_time'}, + createdBy: {wire: 'created_by'}, + integrationId: {wire: 'integration_id'}, + name: {wire: 'name'}, + tokenAccessPolicy: { + wire: 'token_access_policy', + children: () => tokenAccessPolicyFieldMaskSchema, + }, +}; + +export function publishedOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + publishedOAuthAppIntegrationFieldMaskSchema + ); +} + +const tokenAccessPolicyFieldMaskSchema: FieldMaskSchema = { + absoluteSessionLifetimeInMinutes: { + wire: 'absolute_session_lifetime_in_minutes', + }, + accessTokenTtlInMinutes: {wire: 'access_token_ttl_in_minutes'}, + enableSingleUseRefreshTokens: {wire: 'enable_single_use_refresh_tokens'}, + refreshTokenTtlInMinutes: {wire: 'refresh_token_ttl_in_minutes'}, +}; + +export function tokenAccessPolicyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + tokenAccessPolicyFieldMaskSchema + ); +} + +const updateCustomOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + integrationId: {wire: 'integration_id'}, + redirectUrls: {wire: 'redirect_urls'}, + scopes: {wire: 'scopes'}, + tokenAccessPolicy: { + wire: 'token_access_policy', + children: () => tokenAccessPolicyFieldMaskSchema, + }, + userAuthorizedScopes: {wire: 'user_authorized_scopes'}, +}; + +export function updateCustomOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateCustomOAuthAppIntegrationFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateCustomOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = + {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateCustomOAuthAppIntegration_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateCustomOAuthAppIntegration_ResponseFieldMaskSchema + ); +} + +const updatePublishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + integrationId: {wire: 'integration_id'}, + tokenAccessPolicy: { + wire: 'token_access_policy', + children: () => tokenAccessPolicyFieldMaskSchema, + }, +}; + +export function updatePublishedOAuthAppIntegrationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updatePublishedOAuthAppIntegrationFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updatePublishedOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = + {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updatePublishedOAuthAppIntegration_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updatePublishedOAuthAppIntegration_ResponseFieldMaskSchema + ); +} diff --git a/packages/oauthpublishedapp/src/v1/model.ts b/packages/oauthpublishedapp/src/v1/model.ts index 8134b8a2..77911af8 100644 --- a/packages/oauthpublishedapp/src/v1/model.ts +++ b/packages/oauthpublishedapp/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface ListPublishedOAuthApps { @@ -98,3 +100,53 @@ export const marshalPublishedOAuthAppSchema: z.ZodType = z redirect_urls: d.redirectUrls, scopes: d.scopes, })); + +const listPublishedOAuthAppsFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listPublishedOAuthAppsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPublishedOAuthAppsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listPublishedOAuthApps_ResponseFieldMaskSchema: FieldMaskSchema = { + apps: {wire: 'apps'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listPublishedOAuthApps_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPublishedOAuthApps_ResponseFieldMaskSchema + ); +} + +const publishedOAuthAppFieldMaskSchema: FieldMaskSchema = { + appId: {wire: 'app_id'}, + clientId: {wire: 'client_id'}, + description: {wire: 'description'}, + isConfidentialClient: {wire: 'is_confidential_client'}, + name: {wire: 'name'}, + redirectUrls: {wire: 'redirect_urls'}, + scopes: {wire: 'scopes'}, +}; + +export function publishedOAuthAppFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + publishedOAuthAppFieldMaskSchema + ); +} diff --git a/packages/permissions/src/v1/model.ts b/packages/permissions/src/v1/model.ts index 2e8af176..78ad4df4 100644 --- a/packages/permissions/src/v1/model.ts +++ b/packages/permissions/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Permission level */ @@ -324,3 +326,148 @@ export const marshalUpdateObjectPermissionsSchema: z.ZodType = z request_object_id: d.requestObjectId, access_control_list: d.accessControlList, })); + +const accessControlRequestFieldMaskSchema: FieldMaskSchema = { + groupName: {wire: 'group_name'}, + permissionLevel: {wire: 'permission_level'}, + servicePrincipalName: {wire: 'service_principal_name'}, + userName: {wire: 'user_name'}, +}; + +export function accessControlRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + accessControlRequestFieldMaskSchema + ); +} + +const accessControlResponseFieldMaskSchema: FieldMaskSchema = { + allPermissions: {wire: 'all_permissions'}, + displayName: {wire: 'display_name'}, + groupName: {wire: 'group_name'}, + servicePrincipalName: {wire: 'service_principal_name'}, + userName: {wire: 'user_name'}, +}; + +export function accessControlResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + accessControlResponseFieldMaskSchema + ); +} + +const getObjectPermissionsFieldMaskSchema: FieldMaskSchema = { + requestObjectId: {wire: 'request_object_id'}, + requestObjectType: {wire: 'request_object_type'}, +}; + +export function getObjectPermissionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getObjectPermissionsFieldMaskSchema + ); +} + +const getPermissionLevelsFieldMaskSchema: FieldMaskSchema = { + requestObjectId: {wire: 'request_object_id'}, + requestObjectType: {wire: 'request_object_type'}, +}; + +export function getPermissionLevelsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getPermissionLevelsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getPermissionLevels_ResponseFieldMaskSchema: FieldMaskSchema = { + permissionLevels: {wire: 'permission_levels'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getPermissionLevels_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getPermissionLevels_ResponseFieldMaskSchema + ); +} + +const permissionFieldMaskSchema: FieldMaskSchema = { + inherited: {wire: 'inherited'}, + inheritedFromObject: {wire: 'inherited_from_object'}, + permissionLevel: {wire: 'permission_level'}, +}; + +export function permissionFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, permissionFieldMaskSchema); +} + +const permissionsDescriptionFieldMaskSchema: FieldMaskSchema = { + description: {wire: 'description'}, + permissionLevel: {wire: 'permission_level'}, +}; + +export function permissionsDescriptionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + permissionsDescriptionFieldMaskSchema + ); +} + +const permissionsResponseFieldMaskSchema: FieldMaskSchema = { + accessControlList: {wire: 'access_control_list'}, + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, +}; + +export function permissionsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + permissionsResponseFieldMaskSchema + ); +} + +const setObjectPermissionsFieldMaskSchema: FieldMaskSchema = { + accessControlList: {wire: 'access_control_list'}, + requestObjectId: {wire: 'request_object_id'}, + requestObjectType: {wire: 'request_object_type'}, +}; + +export function setObjectPermissionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + setObjectPermissionsFieldMaskSchema + ); +} + +const updateObjectPermissionsFieldMaskSchema: FieldMaskSchema = { + accessControlList: {wire: 'access_control_list'}, + requestObjectId: {wire: 'request_object_id'}, + requestObjectType: {wire: 'request_object_type'}, +}; + +export function updateObjectPermissionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateObjectPermissionsFieldMaskSchema + ); +} diff --git a/packages/policyfamilies/src/v2/model.ts b/packages/policyfamilies/src/v2/model.ts index d13e9ee5..6491544f 100644 --- a/packages/policyfamilies/src/v2/model.ts +++ b/packages/policyfamilies/src/v2/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Returns the details of a policy family at a specific version */ @@ -89,3 +91,60 @@ export const marshalPolicyFamilySchema: z.ZodType = z description: d.description, definition: d.definition, })); + +const getPolicyFamilyFieldMaskSchema: FieldMaskSchema = { + policyFamilyId: {wire: 'policy_family_id'}, + version: {wire: 'version'}, +}; + +export function getPolicyFamilyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getPolicyFamilyFieldMaskSchema + ); +} + +const listPolicyFamiliesFieldMaskSchema: FieldMaskSchema = { + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listPolicyFamiliesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPolicyFamiliesFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listPolicyFamilies_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + policyFamilies: {wire: 'policy_families'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listPolicyFamilies_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listPolicyFamilies_ResponseFieldMaskSchema + ); +} + +const policyFamilyFieldMaskSchema: FieldMaskSchema = { + definition: {wire: 'definition'}, + description: {wire: 'description'}, + name: {wire: 'name'}, + policyFamilyId: {wire: 'policy_family_id'}, +}; + +export function policyFamilyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, policyFamilyFieldMaskSchema); +} diff --git a/packages/postgres/src/v1/model.ts b/packages/postgres/src/v1/model.ts index 525afee1..4efe85c9 100644 --- a/packages/postgres/src/v1/model.ts +++ b/packages/postgres/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The compute endpoint type. Either `read_write` or `read_only`. */ @@ -4453,3 +4455,1641 @@ export const marshalUndeleteProjectRequestSchema: z.ZodType = z .transform(d => ({ name: d.name, })); + +const branchFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + name: {wire: 'name'}, + parent: {wire: 'parent'}, + spec: {wire: 'spec', children: () => branchSpecFieldMaskSchema}, + status: {wire: 'status', children: () => branchStatusFieldMaskSchema}, + uid: {wire: 'uid'}, + updateTime: {wire: 'update_time'}, +}; + +export function branchFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, branchFieldMaskSchema); +} + +const branchOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; + +export function branchOperationMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + branchOperationMetadataFieldMaskSchema + ); +} + +const branchSpecFieldMaskSchema: FieldMaskSchema = { + expireTime: {wire: 'expire_time'}, + isProtected: {wire: 'is_protected'}, + noExpiry: {wire: 'no_expiry'}, + sourceBranch: {wire: 'source_branch'}, + sourceBranchLsn: {wire: 'source_branch_lsn'}, + sourceBranchTime: {wire: 'source_branch_time'}, + ttl: {wire: 'ttl'}, +}; + +export function branchSpecFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, branchSpecFieldMaskSchema); +} + +const branchStatusFieldMaskSchema: FieldMaskSchema = { + branchId: {wire: 'branch_id'}, + currentState: {wire: 'current_state'}, + default: {wire: 'default'}, + deleteTime: {wire: 'delete_time'}, + expireTime: {wire: 'expire_time'}, + isProtected: {wire: 'is_protected'}, + logicalSizeBytes: {wire: 'logical_size_bytes'}, + pendingState: {wire: 'pending_state'}, + purgeTime: {wire: 'purge_time'}, + sourceBranch: {wire: 'source_branch'}, + sourceBranchLsn: {wire: 'source_branch_lsn'}, + sourceBranchTime: {wire: 'source_branch_time'}, + stateChangeTime: {wire: 'state_change_time'}, +}; + +export function branchStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, branchStatusFieldMaskSchema); +} + +const catalogFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + name: {wire: 'name'}, + spec: {wire: 'spec', children: () => catalog_CatalogSpecFieldMaskSchema}, + status: { + wire: 'status', + children: () => catalog_CatalogStatusFieldMaskSchema, + }, + uid: {wire: 'uid'}, + updateTime: {wire: 'update_time'}, +}; + +export function catalogFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, catalogFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const catalog_CatalogSpecFieldMaskSchema: FieldMaskSchema = { + branch: {wire: 'branch'}, + createDatabaseIfMissing: {wire: 'create_database_if_missing'}, + postgresDatabase: {wire: 'postgres_database'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function catalog_CatalogSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + catalog_CatalogSpecFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const catalog_CatalogStatusFieldMaskSchema: FieldMaskSchema = { + branch: {wire: 'branch'}, + catalogId: {wire: 'catalog_id'}, + postgresDatabase: {wire: 'postgres_database'}, + project: {wire: 'project'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function catalog_CatalogStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + catalog_CatalogStatusFieldMaskSchema + ); +} + +const catalogOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; + +export function catalogOperationMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + catalogOperationMetadataFieldMaskSchema + ); +} + +const computeInstanceFieldMaskSchema: FieldMaskSchema = { + computeHost: {wire: 'compute_host'}, + computeInstanceId: {wire: 'compute_instance_id'}, + currentState: {wire: 'current_state'}, + name: {wire: 'name'}, + pendingState: {wire: 'pending_state'}, + role: {wire: 'role'}, + startTime: {wire: 'start_time'}, + suspendTime: {wire: 'suspend_time'}, +}; + +export function computeInstanceFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + computeInstanceFieldMaskSchema + ); +} + +const createBranchRequestFieldMaskSchema: FieldMaskSchema = { + branch: {wire: 'branch', children: () => branchFieldMaskSchema}, + branchId: {wire: 'branch_id'}, + parent: {wire: 'parent'}, +}; + +export function createBranchRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createBranchRequestFieldMaskSchema + ); +} + +const createCatalogRequestFieldMaskSchema: FieldMaskSchema = { + catalog: {wire: 'catalog', children: () => catalogFieldMaskSchema}, + catalogId: {wire: 'catalog_id'}, +}; + +export function createCatalogRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createCatalogRequestFieldMaskSchema + ); +} + +const createDatabaseRequestFieldMaskSchema: FieldMaskSchema = { + database: {wire: 'database', children: () => databaseFieldMaskSchema}, + databaseId: {wire: 'database_id'}, + parent: {wire: 'parent'}, +}; + +export function createDatabaseRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createDatabaseRequestFieldMaskSchema + ); +} + +const createEndpointRequestFieldMaskSchema: FieldMaskSchema = { + endpoint: {wire: 'endpoint', children: () => endpointFieldMaskSchema}, + endpointId: {wire: 'endpoint_id'}, + parent: {wire: 'parent'}, +}; + +export function createEndpointRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createEndpointRequestFieldMaskSchema + ); +} + +const createProjectRequestFieldMaskSchema: FieldMaskSchema = { + project: {wire: 'project', children: () => projectFieldMaskSchema}, + projectId: {wire: 'project_id'}, +}; + +export function createProjectRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createProjectRequestFieldMaskSchema + ); +} + +const createRoleRequestFieldMaskSchema: FieldMaskSchema = { + parent: {wire: 'parent'}, + role: {wire: 'role', children: () => roleFieldMaskSchema}, + roleId: {wire: 'role_id'}, +}; + +export function createRoleRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createRoleRequestFieldMaskSchema + ); +} + +const createSyncedTableRequestFieldMaskSchema: FieldMaskSchema = { + syncedTable: { + wire: 'synced_table', + children: () => syncedTableFieldMaskSchema, + }, + syncedTableId: {wire: 'synced_table_id'}, +}; + +export function createSyncedTableRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createSyncedTableRequestFieldMaskSchema + ); +} + +const createTableRequestFieldMaskSchema: FieldMaskSchema = { + table: {wire: 'table', children: () => tableFieldMaskSchema}, +}; + +export function createTableRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createTableRequestFieldMaskSchema + ); +} + +const databaseFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + name: {wire: 'name'}, + parent: {wire: 'parent'}, + spec: {wire: 'spec', children: () => database_DatabaseSpecFieldMaskSchema}, + status: { + wire: 'status', + children: () => database_DatabaseStatusFieldMaskSchema, + }, + updateTime: {wire: 'update_time'}, +}; + +export function databaseFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, databaseFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const database_DatabaseSpecFieldMaskSchema: FieldMaskSchema = { + postgresDatabase: {wire: 'postgres_database'}, + role: {wire: 'role'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function database_DatabaseSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + database_DatabaseSpecFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const database_DatabaseStatusFieldMaskSchema: FieldMaskSchema = { + databaseId: {wire: 'database_id'}, + postgresDatabase: {wire: 'postgres_database'}, + role: {wire: 'role'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function database_DatabaseStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + database_DatabaseStatusFieldMaskSchema + ); +} + +const databaseCredentialFieldMaskSchema: FieldMaskSchema = { + expireTime: {wire: 'expire_time'}, + token: {wire: 'token'}, +}; + +export function databaseCredentialFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + databaseCredentialFieldMaskSchema + ); +} + +const databaseOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; + +export function databaseOperationMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + databaseOperationMetadataFieldMaskSchema + ); +} + +const databricksServiceExceptionWithDetailsProtoFieldMaskSchema: FieldMaskSchema = + { + details: {wire: 'details'}, + errorCode: {wire: 'error_code'}, + message: {wire: 'message'}, + stackTrace: {wire: 'stack_trace'}, + }; + +export function databricksServiceExceptionWithDetailsProtoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + databricksServiceExceptionWithDetailsProtoFieldMaskSchema + ); +} + +const deleteBranchRequestFieldMaskSchema: FieldMaskSchema = { + allowMissing: {wire: 'allow_missing'}, + name: {wire: 'name'}, + purge: {wire: 'purge'}, +}; + +export function deleteBranchRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteBranchRequestFieldMaskSchema + ); +} + +const deleteCatalogRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteCatalogRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteCatalogRequestFieldMaskSchema + ); +} + +const deleteDatabaseRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteDatabaseRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteDatabaseRequestFieldMaskSchema + ); +} + +const deleteEndpointRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteEndpointRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteEndpointRequestFieldMaskSchema + ); +} + +const deleteForwardEtlConfigurationRequestFieldMaskSchema: FieldMaskSchema = { + parent: {wire: 'parent'}, + pgDatabaseOid: {wire: 'pg_database_oid'}, + pgSchemaOid: {wire: 'pg_schema_oid'}, + tenantId: {wire: 'tenant_id'}, + timelineId: {wire: 'timeline_id'}, +}; + +export function deleteForwardEtlConfigurationRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteForwardEtlConfigurationRequestFieldMaskSchema + ); +} + +const deleteForwardEtlConfigurationResponseFieldMaskSchema: FieldMaskSchema = { + deletedConfigs: {wire: 'deleted_configs'}, + deletedMappings: {wire: 'deleted_mappings'}, +}; + +export function deleteForwardEtlConfigurationResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteForwardEtlConfigurationResponseFieldMaskSchema + ); +} + +const deleteProjectRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + purge: {wire: 'purge'}, +}; + +export function deleteProjectRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteProjectRequestFieldMaskSchema + ); +} + +const deleteRoleRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + reassignOwnedTo: {wire: 'reassign_owned_to'}, +}; + +export function deleteRoleRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteRoleRequestFieldMaskSchema + ); +} + +const deleteSyncedTableRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteSyncedTableRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteSyncedTableRequestFieldMaskSchema + ); +} + +const deleteTableRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteTableRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteTableRequestFieldMaskSchema + ); +} + +const deltaTableSyncInfoFieldMaskSchema: FieldMaskSchema = { + deltaCommitTime: {wire: 'delta_commit_time'}, + deltaCommitVersion: {wire: 'delta_commit_version'}, +}; + +export function deltaTableSyncInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deltaTableSyncInfoFieldMaskSchema + ); +} + +const disableForwardEtlRequestFieldMaskSchema: FieldMaskSchema = { + parent: {wire: 'parent'}, + pgDatabaseOid: {wire: 'pg_database_oid'}, + pgSchemaOid: {wire: 'pg_schema_oid'}, + tenantId: {wire: 'tenant_id'}, + timelineId: {wire: 'timeline_id'}, +}; + +export function disableForwardEtlRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + disableForwardEtlRequestFieldMaskSchema + ); +} + +const disableForwardEtlResponseFieldMaskSchema: FieldMaskSchema = { + disabled: {wire: 'disabled'}, +}; + +export function disableForwardEtlResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + disableForwardEtlResponseFieldMaskSchema + ); +} + +const endpointFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + name: {wire: 'name'}, + parent: {wire: 'parent'}, + spec: {wire: 'spec', children: () => endpointSpecFieldMaskSchema}, + status: {wire: 'status', children: () => endpointStatusFieldMaskSchema}, + uid: {wire: 'uid'}, + updateTime: {wire: 'update_time'}, +}; + +export function endpointFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, endpointFieldMaskSchema); +} + +const endpointGroupSpecFieldMaskSchema: FieldMaskSchema = { + enableReadableSecondaries: {wire: 'enable_readable_secondaries'}, + max: {wire: 'max'}, + min: {wire: 'min'}, +}; + +export function endpointGroupSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + endpointGroupSpecFieldMaskSchema + ); +} + +const endpointGroupStatusFieldMaskSchema: FieldMaskSchema = { + enableReadableSecondaries: {wire: 'enable_readable_secondaries'}, + max: {wire: 'max'}, + min: {wire: 'min'}, +}; + +export function endpointGroupStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + endpointGroupStatusFieldMaskSchema + ); +} + +const endpointHostsFieldMaskSchema: FieldMaskSchema = { + host: {wire: 'host'}, + readOnlyHost: {wire: 'read_only_host'}, + readOnlyPooledHost: {wire: 'read_only_pooled_host'}, + readWritePooledHost: {wire: 'read_write_pooled_host'}, +}; + +export function endpointHostsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, endpointHostsFieldMaskSchema); +} + +const endpointOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; + +export function endpointOperationMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + endpointOperationMetadataFieldMaskSchema + ); +} + +const endpointSettingsFieldMaskSchema: FieldMaskSchema = { + pgSettings: {wire: 'pg_settings'}, +}; + +export function endpointSettingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + endpointSettingsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const endpointSettings_PgSettingsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function endpointSettings_PgSettingsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + endpointSettings_PgSettingsEntryFieldMaskSchema + ); +} + +const endpointSpecFieldMaskSchema: FieldMaskSchema = { + autoscalingLimitMaxCu: {wire: 'autoscaling_limit_max_cu'}, + autoscalingLimitMinCu: {wire: 'autoscaling_limit_min_cu'}, + disabled: {wire: 'disabled'}, + endpointType: {wire: 'endpoint_type'}, + group: {wire: 'group', children: () => endpointGroupSpecFieldMaskSchema}, + noSuspension: {wire: 'no_suspension'}, + settings: {wire: 'settings', children: () => endpointSettingsFieldMaskSchema}, + suspendTimeoutDuration: {wire: 'suspend_timeout_duration'}, +}; + +export function endpointSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, endpointSpecFieldMaskSchema); +} + +const endpointStatusFieldMaskSchema: FieldMaskSchema = { + autoscalingLimitMaxCu: {wire: 'autoscaling_limit_max_cu'}, + autoscalingLimitMinCu: {wire: 'autoscaling_limit_min_cu'}, + currentState: {wire: 'current_state'}, + disabled: {wire: 'disabled'}, + endpointId: {wire: 'endpoint_id'}, + endpointType: {wire: 'endpoint_type'}, + group: {wire: 'group', children: () => endpointGroupStatusFieldMaskSchema}, + hosts: {wire: 'hosts', children: () => endpointHostsFieldMaskSchema}, + lastActiveTime: {wire: 'last_active_time'}, + pendingState: {wire: 'pending_state'}, + settings: {wire: 'settings', children: () => endpointSettingsFieldMaskSchema}, + suspendTimeoutDuration: {wire: 'suspend_timeout_duration'}, +}; + +export function endpointStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, endpointStatusFieldMaskSchema); +} + +const forwardEtlConfigFieldMaskSchema: FieldMaskSchema = { + createTimeMillis: {wire: 'create_time_millis'}, + enabled: {wire: 'enabled'}, + pgDatabaseOid: {wire: 'pg_database_oid'}, + pgSchemaOid: {wire: 'pg_schema_oid'}, + tenantId: {wire: 'tenant_id'}, + timelineId: {wire: 'timeline_id'}, + ucCatalogId: {wire: 'uc_catalog_id'}, + ucSchemaId: {wire: 'uc_schema_id'}, + updateTimeMillis: {wire: 'update_time_millis'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function forwardEtlConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + forwardEtlConfigFieldMaskSchema + ); +} + +const forwardEtlDatabaseFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + oid: {wire: 'oid'}, +}; + +export function forwardEtlDatabaseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + forwardEtlDatabaseFieldMaskSchema + ); +} + +const forwardEtlMetadataFieldMaskSchema: FieldMaskSchema = { + databases: {wire: 'databases'}, + schemas: {wire: 'schemas'}, +}; + +export function forwardEtlMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + forwardEtlMetadataFieldMaskSchema + ); +} + +const forwardEtlSchemaFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + oid: {wire: 'oid'}, +}; + +export function forwardEtlSchemaFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + forwardEtlSchemaFieldMaskSchema + ); +} + +const forwardEtlStatusFieldMaskSchema: FieldMaskSchema = { + configurations: {wire: 'configurations'}, + tableMappings: {wire: 'table_mappings'}, +}; + +export function forwardEtlStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + forwardEtlStatusFieldMaskSchema + ); +} + +const forwardEtlTableMappingFieldMaskSchema: FieldMaskSchema = { + enabled: {wire: 'enabled'}, + lastSyncedLsn: {wire: 'last_synced_lsn'}, + pgTableName: {wire: 'pg_table_name'}, + pgTableOid: {wire: 'pg_table_oid'}, + ucTableId: {wire: 'uc_table_id'}, + ucTableName: {wire: 'uc_table_name'}, +}; + +export function forwardEtlTableMappingFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + forwardEtlTableMappingFieldMaskSchema + ); +} + +const generateDatabaseCredentialRequestFieldMaskSchema: FieldMaskSchema = { + claims: {wire: 'claims'}, + endpoint: {wire: 'endpoint'}, + expireTime: {wire: 'expire_time'}, + groupName: {wire: 'group_name'}, + ttl: {wire: 'ttl'}, +}; + +export function generateDatabaseCredentialRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + generateDatabaseCredentialRequestFieldMaskSchema + ); +} + +const getBranchRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getBranchRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getBranchRequestFieldMaskSchema + ); +} + +const getCatalogRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getCatalogRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getCatalogRequestFieldMaskSchema + ); +} + +const getComputeInstanceRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getComputeInstanceRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getComputeInstanceRequestFieldMaskSchema + ); +} + +const getDatabaseRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getDatabaseRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getDatabaseRequestFieldMaskSchema + ); +} + +const getEndpointRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getEndpointRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getEndpointRequestFieldMaskSchema + ); +} + +const getForwardEtlMetadataRequestFieldMaskSchema: FieldMaskSchema = { + parent: {wire: 'parent'}, + tenantId: {wire: 'tenant_id'}, + timelineId: {wire: 'timeline_id'}, +}; + +export function getForwardEtlMetadataRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getForwardEtlMetadataRequestFieldMaskSchema + ); +} + +const getForwardEtlStatusRequestFieldMaskSchema: FieldMaskSchema = { + parent: {wire: 'parent'}, + tenantId: {wire: 'tenant_id'}, + timelineId: {wire: 'timeline_id'}, +}; + +export function getForwardEtlStatusRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getForwardEtlStatusRequestFieldMaskSchema + ); +} + +const getOperationRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getOperationRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getOperationRequestFieldMaskSchema + ); +} + +const getProjectRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getProjectRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getProjectRequestFieldMaskSchema + ); +} + +const getRoleRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getRoleRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, getRoleRequestFieldMaskSchema); +} + +const getSyncedTableRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getSyncedTableRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getSyncedTableRequestFieldMaskSchema + ); +} + +const getTableRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getTableRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getTableRequestFieldMaskSchema + ); +} + +const initialEndpointSpecFieldMaskSchema: FieldMaskSchema = { + group: {wire: 'group', children: () => endpointGroupSpecFieldMaskSchema}, +}; + +export function initialEndpointSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + initialEndpointSpecFieldMaskSchema + ); +} + +const listBranchesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + parent: {wire: 'parent'}, + showDeleted: {wire: 'show_deleted'}, +}; + +export function listBranchesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listBranchesRequestFieldMaskSchema + ); +} + +const listBranchesResponseFieldMaskSchema: FieldMaskSchema = { + branches: {wire: 'branches'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listBranchesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listBranchesResponseFieldMaskSchema + ); +} + +const listComputeInstancesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + parent: {wire: 'parent'}, +}; + +export function listComputeInstancesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listComputeInstancesRequestFieldMaskSchema + ); +} + +const listComputeInstancesResponseFieldMaskSchema: FieldMaskSchema = { + computeInstances: {wire: 'compute_instances'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listComputeInstancesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listComputeInstancesResponseFieldMaskSchema + ); +} + +const listDatabasesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + parent: {wire: 'parent'}, +}; + +export function listDatabasesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listDatabasesRequestFieldMaskSchema + ); +} + +const listDatabasesResponseFieldMaskSchema: FieldMaskSchema = { + databases: {wire: 'databases'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listDatabasesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listDatabasesResponseFieldMaskSchema + ); +} + +const listEndpointsRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + parent: {wire: 'parent'}, +}; + +export function listEndpointsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listEndpointsRequestFieldMaskSchema + ); +} + +const listEndpointsResponseFieldMaskSchema: FieldMaskSchema = { + endpoints: {wire: 'endpoints'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listEndpointsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listEndpointsResponseFieldMaskSchema + ); +} + +const listProjectsRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + showDeleted: {wire: 'show_deleted'}, +}; + +export function listProjectsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listProjectsRequestFieldMaskSchema + ); +} + +const listProjectsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + projects: {wire: 'projects'}, +}; + +export function listProjectsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listProjectsResponseFieldMaskSchema + ); +} + +const listRolesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + parent: {wire: 'parent'}, +}; + +export function listRolesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listRolesRequestFieldMaskSchema + ); +} + +const listRolesResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + roles: {wire: 'roles'}, +}; + +export function listRolesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listRolesResponseFieldMaskSchema + ); +} + +const newPipelineSpecFieldMaskSchema: FieldMaskSchema = { + budgetPolicyId: {wire: 'budget_policy_id'}, + pipelineChannel: {wire: 'pipeline_channel'}, + storageCatalog: {wire: 'storage_catalog'}, + storageSchema: {wire: 'storage_schema'}, +}; + +export function newPipelineSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + newPipelineSpecFieldMaskSchema + ); +} + +const operationFieldMaskSchema: FieldMaskSchema = { + done: {wire: 'done'}, + error: { + wire: 'error', + children: () => databricksServiceExceptionWithDetailsProtoFieldMaskSchema, + }, + metadata: {wire: 'metadata'}, + name: {wire: 'name'}, + response: {wire: 'response'}, +}; + +export function operationFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, operationFieldMaskSchema); +} + +const projectFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + deleteTime: {wire: 'delete_time'}, + initialEndpointSpec: { + wire: 'initial_endpoint_spec', + children: () => initialEndpointSpecFieldMaskSchema, + }, + name: {wire: 'name'}, + purgeTime: {wire: 'purge_time'}, + spec: {wire: 'spec', children: () => projectSpecFieldMaskSchema}, + status: {wire: 'status', children: () => projectStatusFieldMaskSchema}, + uid: {wire: 'uid'}, + updateTime: {wire: 'update_time'}, +}; + +export function projectFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, projectFieldMaskSchema); +} + +const projectCustomTagFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +export function projectCustomTagFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + projectCustomTagFieldMaskSchema + ); +} + +const projectDefaultEndpointSettingsFieldMaskSchema: FieldMaskSchema = { + autoscalingLimitMaxCu: {wire: 'autoscaling_limit_max_cu'}, + autoscalingLimitMinCu: {wire: 'autoscaling_limit_min_cu'}, + noSuspension: {wire: 'no_suspension'}, + pgSettings: {wire: 'pg_settings'}, + suspendTimeoutDuration: {wire: 'suspend_timeout_duration'}, +}; + +export function projectDefaultEndpointSettingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + projectDefaultEndpointSettingsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const projectDefaultEndpointSettings_PgSettingsEntryFieldMaskSchema: FieldMaskSchema = + { + key: {wire: 'key'}, + value: {wire: 'value'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function projectDefaultEndpointSettings_PgSettingsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + projectDefaultEndpointSettings_PgSettingsEntryFieldMaskSchema + ); +} + +const projectOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; + +export function projectOperationMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + projectOperationMetadataFieldMaskSchema + ); +} + +const projectSpecFieldMaskSchema: FieldMaskSchema = { + budgetPolicyId: {wire: 'budget_policy_id'}, + customTags: {wire: 'custom_tags'}, + defaultBranch: {wire: 'default_branch'}, + defaultEndpointSettings: { + wire: 'default_endpoint_settings', + children: () => projectDefaultEndpointSettingsFieldMaskSchema, + }, + displayName: {wire: 'display_name'}, + enablePgNativeLogin: {wire: 'enable_pg_native_login'}, + historyRetentionDuration: {wire: 'history_retention_duration'}, + pgVersion: {wire: 'pg_version'}, + workspaceKeyEncrypted: {wire: 'workspace_key_encrypted'}, +}; + +export function projectSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, projectSpecFieldMaskSchema); +} + +const projectStatusFieldMaskSchema: FieldMaskSchema = { + branchLogicalSizeLimitBytes: {wire: 'branch_logical_size_limit_bytes'}, + budgetPolicyId: {wire: 'budget_policy_id'}, + computeLastActiveTime: {wire: 'compute_last_active_time'}, + customTags: {wire: 'custom_tags'}, + defaultBranch: {wire: 'default_branch'}, + defaultEndpointSettings: { + wire: 'default_endpoint_settings', + children: () => projectDefaultEndpointSettingsFieldMaskSchema, + }, + displayName: {wire: 'display_name'}, + enablePgNativeLogin: {wire: 'enable_pg_native_login'}, + historyRetentionDuration: {wire: 'history_retention_duration'}, + owner: {wire: 'owner'}, + pgVersion: {wire: 'pg_version'}, + projectId: {wire: 'project_id'}, + syntheticStorageSizeBytes: {wire: 'synthetic_storage_size_bytes'}, +}; + +export function projectStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, projectStatusFieldMaskSchema); +} + +const provisioningInfoFieldMaskSchema: FieldMaskSchema = {}; + +export function provisioningInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + provisioningInfoFieldMaskSchema + ); +} + +const requestedClaimsFieldMaskSchema: FieldMaskSchema = { + permissionSet: {wire: 'permission_set'}, + resources: {wire: 'resources'}, +}; + +export function requestedClaimsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + requestedClaimsFieldMaskSchema + ); +} + +const requestedResourceFieldMaskSchema: FieldMaskSchema = { + tableName: {wire: 'table_name'}, + unspecifiedResourceName: {wire: 'unspecified_resource_name'}, +}; + +export function requestedResourceFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + requestedResourceFieldMaskSchema + ); +} + +const roleFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + name: {wire: 'name'}, + parent: {wire: 'parent'}, + spec: {wire: 'spec', children: () => role_RoleSpecFieldMaskSchema}, + status: {wire: 'status', children: () => role_RoleStatusFieldMaskSchema}, + updateTime: {wire: 'update_time'}, +}; + +export function roleFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, roleFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const role_AttributesFieldMaskSchema: FieldMaskSchema = { + bypassrls: {wire: 'bypassrls'}, + createdb: {wire: 'createdb'}, + createrole: {wire: 'createrole'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function role_AttributesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + role_AttributesFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const role_RoleSpecFieldMaskSchema: FieldMaskSchema = { + attributes: { + wire: 'attributes', + children: () => role_AttributesFieldMaskSchema, + }, + authMethod: {wire: 'auth_method'}, + identityType: {wire: 'identity_type'}, + membershipRoles: {wire: 'membership_roles'}, + postgresRole: {wire: 'postgres_role'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function role_RoleSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, role_RoleSpecFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const role_RoleStatusFieldMaskSchema: FieldMaskSchema = { + attributes: { + wire: 'attributes', + children: () => role_AttributesFieldMaskSchema, + }, + authMethod: {wire: 'auth_method'}, + identityType: {wire: 'identity_type'}, + membershipRoles: {wire: 'membership_roles'}, + postgresRole: {wire: 'postgres_role'}, + roleId: {wire: 'role_id'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function role_RoleStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + role_RoleStatusFieldMaskSchema + ); +} + +const roleOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; + +export function roleOperationMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + roleOperationMetadataFieldMaskSchema + ); +} + +const syncedTableFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + name: {wire: 'name'}, + spec: { + wire: 'spec', + children: () => syncedTable_SyncedTableSpecFieldMaskSchema, + }, + status: { + wire: 'status', + children: () => syncedTable_SyncedTableStatusFieldMaskSchema, + }, + uid: {wire: 'uid'}, +}; + +export function syncedTableFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, syncedTableFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const syncedTable_SyncedTableSpecFieldMaskSchema: FieldMaskSchema = { + acceleratedSync: {wire: 'accelerated_sync'}, + branch: {wire: 'branch'}, + createDatabaseObjectsIfMissing: {wire: 'create_database_objects_if_missing'}, + existingPipelineId: {wire: 'existing_pipeline_id'}, + newPipelineSpec: { + wire: 'new_pipeline_spec', + children: () => newPipelineSpecFieldMaskSchema, + }, + postgresDatabase: {wire: 'postgres_database'}, + primaryKeyColumns: {wire: 'primary_key_columns'}, + schedulingPolicy: {wire: 'scheduling_policy'}, + sourceTableFullName: {wire: 'source_table_full_name'}, + timeseriesKey: {wire: 'timeseries_key'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function syncedTable_SyncedTableSpecFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + syncedTable_SyncedTableSpecFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const syncedTable_SyncedTableStatusFieldMaskSchema: FieldMaskSchema = { + detailedState: {wire: 'detailed_state'}, + lastProcessedCommitVersion: {wire: 'last_processed_commit_version'}, + lastSync: { + wire: 'last_sync', + children: () => syncedTablePositionFieldMaskSchema, + }, + lastSyncTime: {wire: 'last_sync_time'}, + message: {wire: 'message'}, + ongoingSyncProgress: { + wire: 'ongoing_sync_progress', + children: () => syncedTablePipelineProgressFieldMaskSchema, + }, + pipelineId: {wire: 'pipeline_id'}, + project: {wire: 'project'}, + provisioningPhase: {wire: 'provisioning_phase'}, + unityCatalogProvisioningState: {wire: 'unity_catalog_provisioning_state'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function syncedTable_SyncedTableStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + syncedTable_SyncedTableStatusFieldMaskSchema + ); +} + +const syncedTableOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; + +export function syncedTableOperationMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + syncedTableOperationMetadataFieldMaskSchema + ); +} + +const syncedTablePipelineProgressFieldMaskSchema: FieldMaskSchema = { + estimatedCompletionTimeSeconds: {wire: 'estimated_completion_time_seconds'}, + latestVersionCurrentlyProcessing: { + wire: 'latest_version_currently_processing', + }, + syncProgressCompletion: {wire: 'sync_progress_completion'}, + syncedRowCount: {wire: 'synced_row_count'}, + totalRowCount: {wire: 'total_row_count'}, +}; + +export function syncedTablePipelineProgressFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + syncedTablePipelineProgressFieldMaskSchema + ); +} + +const syncedTablePositionFieldMaskSchema: FieldMaskSchema = { + deltaTableSyncInfo: { + wire: 'delta_table_sync_info', + children: () => deltaTableSyncInfoFieldMaskSchema, + }, + syncEndTime: {wire: 'sync_end_time'}, + syncStartTime: {wire: 'sync_start_time'}, +}; + +export function syncedTablePositionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + syncedTablePositionFieldMaskSchema + ); +} + +const tableFieldMaskSchema: FieldMaskSchema = { + branch: {wire: 'branch'}, + database: {wire: 'database'}, + name: {wire: 'name'}, + project: {wire: 'project'}, + tableServingUrl: {wire: 'table_serving_url'}, +}; + +export function tableFieldMask(...paths: string[]): FieldMask { + return FieldMask.build
(paths, tableFieldMaskSchema); +} + +const undeleteBranchRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function undeleteBranchRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + undeleteBranchRequestFieldMaskSchema + ); +} + +const undeleteProjectRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function undeleteProjectRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + undeleteProjectRequestFieldMaskSchema + ); +} + +const updateBranchRequestFieldMaskSchema: FieldMaskSchema = { + branch: {wire: 'branch', children: () => branchFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateBranchRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateBranchRequestFieldMaskSchema + ); +} + +const updateDatabaseRequestFieldMaskSchema: FieldMaskSchema = { + database: {wire: 'database', children: () => databaseFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateDatabaseRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateDatabaseRequestFieldMaskSchema + ); +} + +const updateEndpointRequestFieldMaskSchema: FieldMaskSchema = { + endpoint: {wire: 'endpoint', children: () => endpointFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateEndpointRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateEndpointRequestFieldMaskSchema + ); +} + +const updateProjectRequestFieldMaskSchema: FieldMaskSchema = { + project: {wire: 'project', children: () => projectFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateProjectRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateProjectRequestFieldMaskSchema + ); +} + +const updateRoleRequestFieldMaskSchema: FieldMaskSchema = { + role: {wire: 'role', children: () => roleFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateRoleRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateRoleRequestFieldMaskSchema + ); +} diff --git a/packages/qualitymonitor/src/v2/model.ts b/packages/qualitymonitor/src/v2/model.ts index 84494eb2..53c51b73 100644 --- a/packages/qualitymonitor/src/v2/model.ts +++ b/packages/qualitymonitor/src/v2/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum AnomalyDetectionJobType { @@ -469,3 +471,263 @@ export const marshalValidityCheckConfigurationSchema: z.ZodType = z range_validity_check: d.rangeValidityCheck, uniqueness_validity_check: d.uniquenessValidityCheck, })); + +const anomalyDetectionConfigFieldMaskSchema: FieldMaskSchema = { + customCheckConfigurations: {wire: 'custom_check_configurations'}, + excludedTableFullNames: {wire: 'excluded_table_full_names'}, + jobType: {wire: 'job_type'}, + lastRunId: {wire: 'last_run_id'}, + latestRunStatus: {wire: 'latest_run_status'}, + validityCheckConfigurations: {wire: 'validity_check_configurations'}, +}; + +export function anomalyDetectionConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + anomalyDetectionConfigFieldMaskSchema + ); +} + +const columnMatcherFieldMaskSchema: FieldMaskSchema = { + columnNames: {wire: 'column_names'}, + variableName: {wire: 'variable_name'}, +}; + +export function columnMatcherFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, columnMatcherFieldMaskSchema); +} + +const createQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { + qualityMonitor: { + wire: 'quality_monitor', + children: () => qualityMonitorFieldMaskSchema, + }, +}; + +export function createQualityMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createQualityMonitorRequestFieldMaskSchema + ); +} + +const customCheckConfigurationFieldMaskSchema: FieldMaskSchema = { + scalarCheck: { + wire: 'scalar_check', + children: () => customScalarCheckFieldMaskSchema, + }, +}; + +export function customCheckConfigurationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + customCheckConfigurationFieldMaskSchema + ); +} + +const customCheckThresholdsFieldMaskSchema: FieldMaskSchema = { + lowerBound: {wire: 'lower_bound', children: () => thresholdFieldMaskSchema}, + upperBound: {wire: 'upper_bound', children: () => thresholdFieldMaskSchema}, +}; + +export function customCheckThresholdsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + customCheckThresholdsFieldMaskSchema + ); +} + +const customScalarCheckFieldMaskSchema: FieldMaskSchema = { + checkName: {wire: 'check_name'}, + columnMatchers: {wire: 'column_matchers'}, + sqlQuery: {wire: 'sql_query'}, + thresholds: { + wire: 'thresholds', + children: () => customCheckThresholdsFieldMaskSchema, + }, +}; + +export function customScalarCheckFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + customScalarCheckFieldMaskSchema + ); +} + +const deleteQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, +}; + +export function deleteQualityMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteQualityMonitorRequestFieldMaskSchema + ); +} + +const getQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, +}; + +export function getQualityMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getQualityMonitorRequestFieldMaskSchema + ); +} + +const listQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listQualityMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listQualityMonitorRequestFieldMaskSchema + ); +} + +const listQualityMonitorResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + qualityMonitors: {wire: 'quality_monitors'}, +}; + +export function listQualityMonitorResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listQualityMonitorResponseFieldMaskSchema + ); +} + +const percentNullValidityCheckFieldMaskSchema: FieldMaskSchema = { + columnNames: {wire: 'column_names'}, + upperBound: {wire: 'upper_bound'}, +}; + +export function percentNullValidityCheckFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + percentNullValidityCheckFieldMaskSchema + ); +} + +const qualityMonitorFieldMaskSchema: FieldMaskSchema = { + anomalyDetectionConfig: { + wire: 'anomaly_detection_config', + children: () => anomalyDetectionConfigFieldMaskSchema, + }, + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, + validityCheckConfigurations: {wire: 'validity_check_configurations'}, +}; + +export function qualityMonitorFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, qualityMonitorFieldMaskSchema); +} + +const rangeValidityCheckFieldMaskSchema: FieldMaskSchema = { + columnNames: {wire: 'column_names'}, + lowerBound: {wire: 'lower_bound'}, + upperBound: {wire: 'upper_bound'}, +}; + +export function rangeValidityCheckFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + rangeValidityCheckFieldMaskSchema + ); +} + +const thresholdFieldMaskSchema: FieldMaskSchema = { + boundValue: {wire: 'bound_value'}, + thresholdType: {wire: 'threshold_type'}, +}; + +export function thresholdFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, thresholdFieldMaskSchema); +} + +const uniquenessValidityCheckFieldMaskSchema: FieldMaskSchema = { + columnNames: {wire: 'column_names'}, +}; + +export function uniquenessValidityCheckFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + uniquenessValidityCheckFieldMaskSchema + ); +} + +const updateQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { + objectId: {wire: 'object_id'}, + objectType: {wire: 'object_type'}, + qualityMonitor: { + wire: 'quality_monitor', + children: () => qualityMonitorFieldMaskSchema, + }, +}; + +export function updateQualityMonitorRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateQualityMonitorRequestFieldMaskSchema + ); +} + +const validityCheckConfigurationFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + percentNullValidityCheck: { + wire: 'percent_null_validity_check', + children: () => percentNullValidityCheckFieldMaskSchema, + }, + rangeValidityCheck: { + wire: 'range_validity_check', + children: () => rangeValidityCheckFieldMaskSchema, + }, + uniquenessValidityCheck: { + wire: 'uniqueness_validity_check', + children: () => uniquenessValidityCheckFieldMaskSchema, + }, +}; + +export function validityCheckConfigurationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + validityCheckConfigurationFieldMaskSchema + ); +} diff --git a/packages/qualitymonitors/src/v1/model.ts b/packages/qualitymonitors/src/v1/model.ts index d5748b09..b0b92d6d 100644 --- a/packages/qualitymonitors/src/v1/model.ts +++ b/packages/qualitymonitors/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** @@ -1094,3 +1096,397 @@ export const marshalUpdateMonitorSchema: z.ZodType = z dashboard_id: d.dashboardId, monitor_version: d.monitorVersion, })); + +const cancelRefreshFieldMaskSchema: FieldMaskSchema = { + fullTableNameArg: {wire: 'full_table_name_arg'}, + refreshId: {wire: 'refresh_id'}, +}; + +export function cancelRefreshFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, cancelRefreshFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const cancelRefresh_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function cancelRefresh_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + cancelRefresh_ResponseFieldMaskSchema + ); +} + +const createMonitorFieldMaskSchema: FieldMaskSchema = { + assetsDir: {wire: 'assets_dir'}, + baselineTableName: {wire: 'baseline_table_name'}, + customMetrics: {wire: 'custom_metrics'}, + dashboardId: {wire: 'dashboard_id'}, + dataClassificationConfig: { + wire: 'data_classification_config', + children: () => dataClassificationConfigFieldMaskSchema, + }, + driftMetricsTableName: {wire: 'drift_metrics_table_name'}, + fullTableNameArg: {wire: 'full_table_name_arg'}, + inferenceLog: { + wire: 'inference_log', + children: () => inferenceLogAnalysisConfigFieldMaskSchema, + }, + latestMonitorFailureMsg: {wire: 'latest_monitor_failure_msg'}, + monitorVersion: {wire: 'monitor_version'}, + notifications: { + wire: 'notifications', + children: () => notificationsFieldMaskSchema, + }, + outputSchemaName: {wire: 'output_schema_name'}, + profileMetricsTableName: {wire: 'profile_metrics_table_name'}, + schedule: { + wire: 'schedule', + children: () => monitorCronScheduleFieldMaskSchema, + }, + skipBuiltinDashboard: {wire: 'skip_builtin_dashboard'}, + slicingExprs: {wire: 'slicing_exprs'}, + snapshot: { + wire: 'snapshot', + children: () => snapshotAnalysisConfigFieldMaskSchema, + }, + status: {wire: 'status'}, + tableName: {wire: 'table_name'}, + timeSeries: { + wire: 'time_series', + children: () => timeSeriesAnalysisConfigFieldMaskSchema, + }, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function createMonitorFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createMonitorFieldMaskSchema); +} + +const customMetricFieldMaskSchema: FieldMaskSchema = { + definition: {wire: 'definition'}, + inputColumns: {wire: 'input_columns'}, + name: {wire: 'name'}, + outputDataType: {wire: 'output_data_type'}, + type: {wire: 'type'}, +}; + +export function customMetricFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, customMetricFieldMaskSchema); +} + +const dataClassificationConfigFieldMaskSchema: FieldMaskSchema = { + enabled: {wire: 'enabled'}, +}; + +export function dataClassificationConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + dataClassificationConfigFieldMaskSchema + ); +} + +const dataMonitorInfoFieldMaskSchema: FieldMaskSchema = { + assetsDir: {wire: 'assets_dir'}, + baselineTableName: {wire: 'baseline_table_name'}, + customMetrics: {wire: 'custom_metrics'}, + dashboardId: {wire: 'dashboard_id'}, + dataClassificationConfig: { + wire: 'data_classification_config', + children: () => dataClassificationConfigFieldMaskSchema, + }, + driftMetricsTableName: {wire: 'drift_metrics_table_name'}, + inferenceLog: { + wire: 'inference_log', + children: () => inferenceLogAnalysisConfigFieldMaskSchema, + }, + latestMonitorFailureMsg: {wire: 'latest_monitor_failure_msg'}, + monitorVersion: {wire: 'monitor_version'}, + notifications: { + wire: 'notifications', + children: () => notificationsFieldMaskSchema, + }, + outputSchemaName: {wire: 'output_schema_name'}, + profileMetricsTableName: {wire: 'profile_metrics_table_name'}, + schedule: { + wire: 'schedule', + children: () => monitorCronScheduleFieldMaskSchema, + }, + slicingExprs: {wire: 'slicing_exprs'}, + snapshot: { + wire: 'snapshot', + children: () => snapshotAnalysisConfigFieldMaskSchema, + }, + status: {wire: 'status'}, + tableName: {wire: 'table_name'}, + timeSeries: { + wire: 'time_series', + children: () => timeSeriesAnalysisConfigFieldMaskSchema, + }, +}; + +export function dataMonitorInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + dataMonitorInfoFieldMaskSchema + ); +} + +const deleteMonitorFieldMaskSchema: FieldMaskSchema = { + fullTableNameArg: {wire: 'full_table_name_arg'}, +}; + +export function deleteMonitorFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deleteMonitorFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteMonitor_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteMonitor_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteMonitor_ResponseFieldMaskSchema + ); +} + +const destinationFieldMaskSchema: FieldMaskSchema = { + emailAddresses: {wire: 'email_addresses'}, +}; + +export function destinationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, destinationFieldMaskSchema); +} + +const getMonitorFieldMaskSchema: FieldMaskSchema = { + fullTableNameArg: {wire: 'full_table_name_arg'}, +}; + +export function getMonitorFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getMonitorFieldMaskSchema); +} + +const getRefreshFieldMaskSchema: FieldMaskSchema = { + fullTableNameArg: {wire: 'full_table_name_arg'}, + refreshId: {wire: 'refresh_id'}, +}; + +export function getRefreshFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getRefreshFieldMaskSchema); +} + +const inferenceLogAnalysisConfigFieldMaskSchema: FieldMaskSchema = { + granularities: {wire: 'granularities'}, + labelCol: {wire: 'label_col'}, + modelIdCol: {wire: 'model_id_col'}, + predictionCol: {wire: 'prediction_col'}, + predictionProbaCol: {wire: 'prediction_proba_col'}, + problemType: {wire: 'problem_type'}, + timestampCol: {wire: 'timestamp_col'}, +}; + +export function inferenceLogAnalysisConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + inferenceLogAnalysisConfigFieldMaskSchema + ); +} + +const listRefreshesFieldMaskSchema: FieldMaskSchema = { + fullTableNameArg: {wire: 'full_table_name_arg'}, +}; + +export function listRefreshesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listRefreshesFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listRefreshes_ResponseFieldMaskSchema: FieldMaskSchema = { + refreshes: {wire: 'refreshes'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listRefreshes_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listRefreshes_ResponseFieldMaskSchema + ); +} + +const monitorCronScheduleFieldMaskSchema: FieldMaskSchema = { + pauseStatus: {wire: 'pause_status'}, + quartzCronExpression: {wire: 'quartz_cron_expression'}, + timezoneId: {wire: 'timezone_id'}, +}; + +export function monitorCronScheduleFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + monitorCronScheduleFieldMaskSchema + ); +} + +const notificationsFieldMaskSchema: FieldMaskSchema = { + onFailure: {wire: 'on_failure', children: () => destinationFieldMaskSchema}, + onNewClassificationTagDetected: { + wire: 'on_new_classification_tag_detected', + children: () => destinationFieldMaskSchema, + }, +}; + +export function notificationsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, notificationsFieldMaskSchema); +} + +const refreshInfoFieldMaskSchema: FieldMaskSchema = { + endTimeMs: {wire: 'end_time_ms'}, + message: {wire: 'message'}, + refreshId: {wire: 'refresh_id'}, + startTimeMs: {wire: 'start_time_ms'}, + state: {wire: 'state'}, + trigger: {wire: 'trigger'}, +}; + +export function refreshInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, refreshInfoFieldMaskSchema); +} + +const regenerateDashboardFieldMaskSchema: FieldMaskSchema = { + fullTableNameArg: {wire: 'full_table_name_arg'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function regenerateDashboardFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + regenerateDashboardFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const regenerateDashboard_ResponseFieldMaskSchema: FieldMaskSchema = { + dashboardId: {wire: 'dashboard_id'}, + parentFolder: {wire: 'parent_folder'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function regenerateDashboard_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + regenerateDashboard_ResponseFieldMaskSchema + ); +} + +const runRefreshFieldMaskSchema: FieldMaskSchema = { + fullTableNameArg: {wire: 'full_table_name_arg'}, +}; + +export function runRefreshFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, runRefreshFieldMaskSchema); +} + +const snapshotAnalysisConfigFieldMaskSchema: FieldMaskSchema = {}; + +export function snapshotAnalysisConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + snapshotAnalysisConfigFieldMaskSchema + ); +} + +const timeSeriesAnalysisConfigFieldMaskSchema: FieldMaskSchema = { + granularities: {wire: 'granularities'}, + timestampCol: {wire: 'timestamp_col'}, +}; + +export function timeSeriesAnalysisConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + timeSeriesAnalysisConfigFieldMaskSchema + ); +} + +const updateMonitorFieldMaskSchema: FieldMaskSchema = { + assetsDir: {wire: 'assets_dir'}, + baselineTableName: {wire: 'baseline_table_name'}, + customMetrics: {wire: 'custom_metrics'}, + dashboardId: {wire: 'dashboard_id'}, + dataClassificationConfig: { + wire: 'data_classification_config', + children: () => dataClassificationConfigFieldMaskSchema, + }, + driftMetricsTableName: {wire: 'drift_metrics_table_name'}, + fullTableNameArg: {wire: 'full_table_name_arg'}, + inferenceLog: { + wire: 'inference_log', + children: () => inferenceLogAnalysisConfigFieldMaskSchema, + }, + latestMonitorFailureMsg: {wire: 'latest_monitor_failure_msg'}, + monitorVersion: {wire: 'monitor_version'}, + notifications: { + wire: 'notifications', + children: () => notificationsFieldMaskSchema, + }, + outputSchemaName: {wire: 'output_schema_name'}, + profileMetricsTableName: {wire: 'profile_metrics_table_name'}, + schedule: { + wire: 'schedule', + children: () => monitorCronScheduleFieldMaskSchema, + }, + slicingExprs: {wire: 'slicing_exprs'}, + snapshot: { + wire: 'snapshot', + children: () => snapshotAnalysisConfigFieldMaskSchema, + }, + status: {wire: 'status'}, + tableName: {wire: 'table_name'}, + timeSeries: { + wire: 'time_series', + children: () => timeSeriesAnalysisConfigFieldMaskSchema, + }, +}; + +export function updateMonitorFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, updateMonitorFieldMaskSchema); +} diff --git a/packages/queries/src/v1/model.ts b/packages/queries/src/v1/model.ts index dd63bba3..48de2889 100644 --- a/packages/queries/src/v1/model.ts +++ b/packages/queries/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum DatePrecision { @@ -1102,3 +1104,381 @@ export const marshalVisualizationSchema: z.ZodType = z serialized_options: d.serializedOptions, query_id: d.queryId, })); + +const createQueryRequestFieldMaskSchema: FieldMaskSchema = { + autoResolveDisplayName: {wire: 'auto_resolve_display_name'}, + query: { + wire: 'query', + children: () => createQueryRequestQueryFieldMaskSchema, + }, +}; + +export function createQueryRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createQueryRequestFieldMaskSchema + ); +} + +const createQueryRequestQueryFieldMaskSchema: FieldMaskSchema = { + applyAutoLimit: {wire: 'apply_auto_limit'}, + catalog: {wire: 'catalog'}, + createTime: {wire: 'create_time'}, + description: {wire: 'description'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, + lastModifierUserName: {wire: 'last_modifier_user_name'}, + lifecycleState: {wire: 'lifecycle_state'}, + ownerUserName: {wire: 'owner_user_name'}, + parameters: {wire: 'parameters'}, + parentPath: {wire: 'parent_path'}, + queryText: {wire: 'query_text'}, + runAsMode: {wire: 'run_as_mode'}, + schema: {wire: 'schema'}, + tags: {wire: 'tags'}, + updateTime: {wire: 'update_time'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function createQueryRequestQueryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createQueryRequestQueryFieldMaskSchema + ); +} + +const dateRangeFieldMaskSchema: FieldMaskSchema = { + end: {wire: 'end'}, + start: {wire: 'start'}, +}; + +export function dateRangeFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, dateRangeFieldMaskSchema); +} + +const dateRangeValueFieldMaskSchema: FieldMaskSchema = { + dateRangeValue: { + wire: 'date_range_value', + children: () => dateRangeFieldMaskSchema, + }, + dynamicDateRangeValue: {wire: 'dynamic_date_range_value'}, + precision: {wire: 'precision'}, + startDayOfWeek: {wire: 'start_day_of_week'}, +}; + +export function dateRangeValueFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, dateRangeValueFieldMaskSchema); +} + +const dateValueFieldMaskSchema: FieldMaskSchema = { + dateValue: {wire: 'date_value'}, + dynamicDateValue: {wire: 'dynamic_date_value'}, + precision: {wire: 'precision'}, +}; + +export function dateValueFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, dateValueFieldMaskSchema); +} + +const emptyFieldMaskSchema: FieldMaskSchema = {}; + +export function emptyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, emptyFieldMaskSchema); +} + +const enumValueFieldMaskSchema: FieldMaskSchema = { + enumOptions: {wire: 'enum_options'}, + multiValuesOptions: { + wire: 'multi_values_options', + children: () => multiValuesOptionsFieldMaskSchema, + }, + values: {wire: 'values'}, +}; + +export function enumValueFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, enumValueFieldMaskSchema); +} + +const getQueryRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function getQueryRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getQueryRequestFieldMaskSchema + ); +} + +const listQueriesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listQueriesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listQueriesRequestFieldMaskSchema + ); +} + +const listQueriesResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + results: {wire: 'results'}, +}; + +export function listQueriesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listQueriesResponseFieldMaskSchema + ); +} + +const listQueryObjectsResponseQueryFieldMaskSchema: FieldMaskSchema = { + applyAutoLimit: {wire: 'apply_auto_limit'}, + catalog: {wire: 'catalog'}, + createTime: {wire: 'create_time'}, + description: {wire: 'description'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, + lastModifierUserName: {wire: 'last_modifier_user_name'}, + lifecycleState: {wire: 'lifecycle_state'}, + ownerUserName: {wire: 'owner_user_name'}, + parameters: {wire: 'parameters'}, + parentPath: {wire: 'parent_path'}, + queryText: {wire: 'query_text'}, + runAsMode: {wire: 'run_as_mode'}, + schema: {wire: 'schema'}, + tags: {wire: 'tags'}, + updateTime: {wire: 'update_time'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function listQueryObjectsResponseQueryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listQueryObjectsResponseQueryFieldMaskSchema + ); +} + +const listVisualizationsForQueryRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listVisualizationsForQueryRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listVisualizationsForQueryRequestFieldMaskSchema + ); +} + +const listVisualizationsForQueryResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + results: {wire: 'results'}, +}; + +export function listVisualizationsForQueryResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listVisualizationsForQueryResponseFieldMaskSchema + ); +} + +const multiValuesOptionsFieldMaskSchema: FieldMaskSchema = { + prefix: {wire: 'prefix'}, + separator: {wire: 'separator'}, + suffix: {wire: 'suffix'}, +}; + +export function multiValuesOptionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + multiValuesOptionsFieldMaskSchema + ); +} + +const numericValueFieldMaskSchema: FieldMaskSchema = { + value: {wire: 'value'}, +}; + +export function numericValueFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, numericValueFieldMaskSchema); +} + +const queryFieldMaskSchema: FieldMaskSchema = { + applyAutoLimit: {wire: 'apply_auto_limit'}, + catalog: {wire: 'catalog'}, + createTime: {wire: 'create_time'}, + description: {wire: 'description'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, + lastModifierUserName: {wire: 'last_modifier_user_name'}, + lifecycleState: {wire: 'lifecycle_state'}, + ownerUserName: {wire: 'owner_user_name'}, + parameters: {wire: 'parameters'}, + parentPath: {wire: 'parent_path'}, + queryText: {wire: 'query_text'}, + runAsMode: {wire: 'run_as_mode'}, + schema: {wire: 'schema'}, + tags: {wire: 'tags'}, + updateTime: {wire: 'update_time'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function queryFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, queryFieldMaskSchema); +} + +const queryBackedValueFieldMaskSchema: FieldMaskSchema = { + multiValuesOptions: { + wire: 'multi_values_options', + children: () => multiValuesOptionsFieldMaskSchema, + }, + queryId: {wire: 'query_id'}, + values: {wire: 'values'}, +}; + +export function queryBackedValueFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + queryBackedValueFieldMaskSchema + ); +} + +const queryParameterFieldMaskSchema: FieldMaskSchema = { + dateRangeValue: { + wire: 'date_range_value', + children: () => dateRangeValueFieldMaskSchema, + }, + dateValue: {wire: 'date_value', children: () => dateValueFieldMaskSchema}, + enumValue: {wire: 'enum_value', children: () => enumValueFieldMaskSchema}, + name: {wire: 'name'}, + numericValue: { + wire: 'numeric_value', + children: () => numericValueFieldMaskSchema, + }, + queryBackedValue: { + wire: 'query_backed_value', + children: () => queryBackedValueFieldMaskSchema, + }, + textValue: {wire: 'text_value', children: () => textValueFieldMaskSchema}, + title: {wire: 'title'}, +}; + +export function queryParameterFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, queryParameterFieldMaskSchema); +} + +const textValueFieldMaskSchema: FieldMaskSchema = { + value: {wire: 'value'}, +}; + +export function textValueFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, textValueFieldMaskSchema); +} + +const trashQueryRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function trashQueryRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + trashQueryRequestFieldMaskSchema + ); +} + +const updateQueryRequestFieldMaskSchema: FieldMaskSchema = { + autoResolveDisplayName: {wire: 'auto_resolve_display_name'}, + id: {wire: 'id'}, + query: { + wire: 'query', + children: () => updateQueryRequestQueryFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateQueryRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateQueryRequestFieldMaskSchema + ); +} + +const updateQueryRequestQueryFieldMaskSchema: FieldMaskSchema = { + applyAutoLimit: {wire: 'apply_auto_limit'}, + catalog: {wire: 'catalog'}, + createTime: {wire: 'create_time'}, + description: {wire: 'description'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, + lastModifierUserName: {wire: 'last_modifier_user_name'}, + lifecycleState: {wire: 'lifecycle_state'}, + ownerUserName: {wire: 'owner_user_name'}, + parameters: {wire: 'parameters'}, + parentPath: {wire: 'parent_path'}, + queryText: {wire: 'query_text'}, + runAsMode: {wire: 'run_as_mode'}, + schema: {wire: 'schema'}, + tags: {wire: 'tags'}, + updateTime: {wire: 'update_time'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function updateQueryRequestQueryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateQueryRequestQueryFieldMaskSchema + ); +} + +const visualizationFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + displayName: {wire: 'display_name'}, + id: {wire: 'id'}, + queryId: {wire: 'query_id'}, + serializedOptions: {wire: 'serialized_options'}, + serializedQueryPlan: {wire: 'serialized_query_plan'}, + type: {wire: 'type'}, + updateTime: {wire: 'update_time'}, +}; + +export function visualizationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, visualizationFieldMaskSchema); +} diff --git a/packages/queryhistory/src/v1/model.ts b/packages/queryhistory/src/v1/model.ts index bf8a4ff7..9e881548 100644 --- a/packages/queryhistory/src/v1/model.ts +++ b/packages/queryhistory/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ChannelName { @@ -850,3 +852,230 @@ export const marshalTimeRangeSchema: z.ZodType = z start_time_ms: d.startTimeMs, end_time_ms: d.endTimeMs, })); + +const channelInfoFieldMaskSchema: FieldMaskSchema = { + dbsqlVersion: {wire: 'dbsql_version'}, + name: {wire: 'name'}, +}; + +export function channelInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, channelInfoFieldMaskSchema); +} + +const externalQuerySourceFieldMaskSchema: FieldMaskSchema = { + alertId: {wire: 'alert_id'}, + dashboardId: {wire: 'dashboard_id'}, + genieSpaceId: {wire: 'genie_space_id'}, + jobInfo: { + wire: 'job_info', + children: () => externalQuerySource_JobInfoFieldMaskSchema, + }, + legacyDashboardId: {wire: 'legacy_dashboard_id'}, + notebookId: {wire: 'notebook_id'}, + sqlQueryId: {wire: 'sql_query_id'}, +}; + +export function externalQuerySourceFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + externalQuerySourceFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const externalQuerySource_JobInfoFieldMaskSchema: FieldMaskSchema = { + jobId: {wire: 'job_id'}, + jobRunId: {wire: 'job_run_id'}, + jobTaskRunId: {wire: 'job_task_run_id'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function externalQuerySource_JobInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + externalQuerySource_JobInfoFieldMaskSchema + ); +} + +const listQueriesFieldMaskSchema: FieldMaskSchema = { + filterBy: {wire: 'filter_by', children: () => queryFilterFieldMaskSchema}, + includeMetrics: {wire: 'include_metrics'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listQueriesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listQueriesFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listQueries_ResponseFieldMaskSchema: FieldMaskSchema = { + hasNextPage: {wire: 'has_next_page'}, + nextPageToken: {wire: 'next_page_token'}, + res: {wire: 'res'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listQueries_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listQueries_ResponseFieldMaskSchema + ); +} + +const queryFilterFieldMaskSchema: FieldMaskSchema = { + queryStartTimeRange: { + wire: 'query_start_time_range', + children: () => timeRangeFieldMaskSchema, + }, + statementIds: {wire: 'statement_ids'}, + statuses: {wire: 'statuses'}, + userIds: {wire: 'user_ids'}, + warehouseIds: {wire: 'warehouse_ids'}, +}; + +export function queryFilterFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, queryFilterFieldMaskSchema); +} + +const queryInfoFieldMaskSchema: FieldMaskSchema = { + cacheQueryId: {wire: 'cache_query_id'}, + channelUsed: { + wire: 'channel_used', + children: () => channelInfoFieldMaskSchema, + }, + clientApplication: {wire: 'client_application'}, + duration: {wire: 'duration'}, + endpointId: {wire: 'endpoint_id'}, + errorMessage: {wire: 'error_message'}, + executedAsUserId: {wire: 'executed_as_user_id'}, + executedAsUserName: {wire: 'executed_as_user_name'}, + executionEndTimeMs: {wire: 'execution_end_time_ms'}, + isFinal: {wire: 'is_final'}, + lookupKey: {wire: 'lookup_key'}, + metrics: {wire: 'metrics', children: () => queryMetricsFieldMaskSchema}, + plansState: {wire: 'plans_state'}, + queryEndTimeMs: {wire: 'query_end_time_ms'}, + queryId: {wire: 'query_id'}, + querySource: { + wire: 'query_source', + children: () => externalQuerySourceFieldMaskSchema, + }, + queryStartTimeMs: {wire: 'query_start_time_ms'}, + queryTags: {wire: 'query_tags'}, + queryText: {wire: 'query_text'}, + rowsProduced: {wire: 'rows_produced'}, + sessionId: {wire: 'session_id'}, + sparkUiUrl: {wire: 'spark_ui_url'}, + statementType: {wire: 'statement_type'}, + status: {wire: 'status'}, + userId: {wire: 'user_id'}, + userName: {wire: 'user_name'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function queryInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, queryInfoFieldMaskSchema); +} + +const queryMetricsFieldMaskSchema: FieldMaskSchema = { + compilationTimeMs: {wire: 'compilation_time_ms'}, + executionTimeMs: {wire: 'execution_time_ms'}, + networkSentBytes: {wire: 'network_sent_bytes'}, + overloadingQueueStartTimestamp: {wire: 'overloading_queue_start_timestamp'}, + photonTotalTimeMs: {wire: 'photon_total_time_ms'}, + projectedRemainingTaskTotalTimeMs: { + wire: 'projected_remaining_task_total_time_ms', + }, + projectedRemainingWallclockTimeMs: { + wire: 'projected_remaining_wallclock_time_ms', + }, + provisioningQueueStartTimestamp: {wire: 'provisioning_queue_start_timestamp'}, + prunedBytes: {wire: 'pruned_bytes'}, + prunedFilesCount: {wire: 'pruned_files_count'}, + queryCompilationStartTimestamp: {wire: 'query_compilation_start_timestamp'}, + readBytes: {wire: 'read_bytes'}, + readCacheBytes: {wire: 'read_cache_bytes'}, + readFilesBytes: {wire: 'read_files_bytes'}, + readFilesCount: {wire: 'read_files_count'}, + readPartitionsCount: {wire: 'read_partitions_count'}, + readRemoteBytes: {wire: 'read_remote_bytes'}, + remainingTaskCount: {wire: 'remaining_task_count'}, + resultFetchTimeMs: {wire: 'result_fetch_time_ms'}, + resultFromCache: {wire: 'result_from_cache'}, + rowsProducedCount: {wire: 'rows_produced_count'}, + rowsReadCount: {wire: 'rows_read_count'}, + runnableTasks: {wire: 'runnable_tasks'}, + spillToDiskBytes: {wire: 'spill_to_disk_bytes'}, + taskTimeOverTimeRange: { + wire: 'task_time_over_time_range', + children: () => taskTimeOverRangeFieldMaskSchema, + }, + taskTotalTimeMs: {wire: 'task_total_time_ms'}, + totalTimeMs: {wire: 'total_time_ms'}, + workToBeDone: {wire: 'work_to_be_done'}, + writeRemoteBytes: {wire: 'write_remote_bytes'}, +}; + +export function queryMetricsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, queryMetricsFieldMaskSchema); +} + +const queryTagFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +export function queryTagFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, queryTagFieldMaskSchema); +} + +const taskTimeOverRangeFieldMaskSchema: FieldMaskSchema = { + entries: {wire: 'entries'}, + interval: {wire: 'interval'}, +}; + +export function taskTimeOverRangeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + taskTimeOverRangeFieldMaskSchema + ); +} + +const taskTimeOverRangeEntryFieldMaskSchema: FieldMaskSchema = { + taskCompletedTimeMs: {wire: 'task_completed_time_ms'}, +}; + +export function taskTimeOverRangeEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + taskTimeOverRangeEntryFieldMaskSchema + ); +} + +const timeRangeFieldMaskSchema: FieldMaskSchema = { + endTimeMs: {wire: 'end_time_ms'}, + startTimeMs: {wire: 'start_time_ms'}, +}; + +export function timeRangeFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, timeRangeFieldMaskSchema); +} diff --git a/packages/registeredmodels/src/v1/model.ts b/packages/registeredmodels/src/v1/model.ts index f6aa1a67..a84c4e66 100644 --- a/packages/registeredmodels/src/v1/model.ts +++ b/packages/registeredmodels/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ModelVersionStatus { @@ -1127,3 +1129,485 @@ export const marshalVolumeDependencySchema: z.ZodType = z .transform(d => ({ volume_full_name: d.volumeFullName, })); + +const connectionDependencyFieldMaskSchema: FieldMaskSchema = { + connectionName: {wire: 'connection_name'}, +}; + +export function connectionDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + connectionDependencyFieldMaskSchema + ); +} + +const createRegisteredModelFieldMaskSchema: FieldMaskSchema = { + aliases: {wire: 'aliases'}, + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + schemaName: {wire: 'schema_name'}, + storageLocation: {wire: 'storage_location'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function createRegisteredModelFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createRegisteredModelFieldMaskSchema + ); +} + +const credentialDependencyFieldMaskSchema: FieldMaskSchema = { + credentialName: {wire: 'credential_name'}, +}; + +export function credentialDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + credentialDependencyFieldMaskSchema + ); +} + +const deleteModelVersionFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, + versionArg: {wire: 'version_arg'}, +}; + +export function deleteModelVersionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteModelVersionFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteModelVersion_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteModelVersion_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteModelVersion_ResponseFieldMaskSchema + ); +} + +const deleteRegisteredModelFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, +}; + +export function deleteRegisteredModelFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteRegisteredModelFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteRegisteredModel_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteRegisteredModel_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteRegisteredModel_ResponseFieldMaskSchema + ); +} + +const deleteRegisteredModelAliasFieldMaskSchema: FieldMaskSchema = { + aliasArg: {wire: 'alias_arg'}, + fullNameArg: {wire: 'full_name_arg'}, +}; + +export function deleteRegisteredModelAliasFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteRegisteredModelAliasFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteRegisteredModelAlias_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteRegisteredModelAlias_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteRegisteredModelAlias_ResponseFieldMaskSchema + ); +} + +const dependencyFieldMaskSchema: FieldMaskSchema = { + connection: { + wire: 'connection', + children: () => connectionDependencyFieldMaskSchema, + }, + credential: { + wire: 'credential', + children: () => credentialDependencyFieldMaskSchema, + }, + function: { + wire: 'function', + children: () => functionDependencyFieldMaskSchema, + }, + secret: {wire: 'secret', children: () => secretDependencyFieldMaskSchema}, + table: {wire: 'table', children: () => tableDependencyFieldMaskSchema}, + volume: {wire: 'volume', children: () => volumeDependencyFieldMaskSchema}, +}; + +export function dependencyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, dependencyFieldMaskSchema); +} + +const dependencyListFieldMaskSchema: FieldMaskSchema = { + dependencies: {wire: 'dependencies'}, +}; + +export function dependencyListFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, dependencyListFieldMaskSchema); +} + +const functionDependencyFieldMaskSchema: FieldMaskSchema = { + functionFullName: {wire: 'function_full_name'}, +}; + +export function functionDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + functionDependencyFieldMaskSchema + ); +} + +const getModelVersionFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, + includeAliases: {wire: 'include_aliases'}, + includeBrowse: {wire: 'include_browse'}, + versionArg: {wire: 'version_arg'}, +}; + +export function getModelVersionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getModelVersionFieldMaskSchema + ); +} + +const getModelVersionByAliasFieldMaskSchema: FieldMaskSchema = { + aliasArg: {wire: 'alias_arg'}, + fullNameArg: {wire: 'full_name_arg'}, + includeAliases: {wire: 'include_aliases'}, +}; + +export function getModelVersionByAliasFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getModelVersionByAliasFieldMaskSchema + ); +} + +const getRegisteredModelFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, + includeAliases: {wire: 'include_aliases'}, + includeBrowse: {wire: 'include_browse'}, +}; + +export function getRegisteredModelFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getRegisteredModelFieldMaskSchema + ); +} + +const listModelVersionsFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, + includeBrowse: {wire: 'include_browse'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listModelVersionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listModelVersionsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listModelVersions_ResponseFieldMaskSchema: FieldMaskSchema = { + modelVersions: {wire: 'model_versions'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listModelVersions_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listModelVersions_ResponseFieldMaskSchema + ); +} + +const listRegisteredModelsFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, + includeBrowse: {wire: 'include_browse'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, + schemaName: {wire: 'schema_name'}, +}; + +export function listRegisteredModelsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listRegisteredModelsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listRegisteredModels_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + registeredModels: {wire: 'registered_models'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listRegisteredModels_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listRegisteredModels_ResponseFieldMaskSchema + ); +} + +const modelVersionInfoFieldMaskSchema: FieldMaskSchema = { + aliases: {wire: 'aliases'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + id: {wire: 'id'}, + metastoreId: {wire: 'metastore_id'}, + modelName: {wire: 'model_name'}, + modelVersionDependencies: { + wire: 'model_version_dependencies', + children: () => dependencyListFieldMaskSchema, + }, + runId: {wire: 'run_id'}, + runWorkspaceId: {wire: 'run_workspace_id'}, + schemaName: {wire: 'schema_name'}, + source: {wire: 'source'}, + status: {wire: 'status'}, + storageLocation: {wire: 'storage_location'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + version: {wire: 'version'}, +}; + +export function modelVersionInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + modelVersionInfoFieldMaskSchema + ); +} + +const registeredModelAliasInfoFieldMaskSchema: FieldMaskSchema = { + aliasName: {wire: 'alias_name'}, + catalogName: {wire: 'catalog_name'}, + id: {wire: 'id'}, + modelName: {wire: 'model_name'}, + schemaName: {wire: 'schema_name'}, + versionNum: {wire: 'version_num'}, +}; + +export function registeredModelAliasInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + registeredModelAliasInfoFieldMaskSchema + ); +} + +const registeredModelInfoFieldMaskSchema: FieldMaskSchema = { + aliases: {wire: 'aliases'}, + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + schemaName: {wire: 'schema_name'}, + storageLocation: {wire: 'storage_location'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function registeredModelInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + registeredModelInfoFieldMaskSchema + ); +} + +const secretDependencyFieldMaskSchema: FieldMaskSchema = { + secretFullName: {wire: 'secret_full_name'}, +}; + +export function secretDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + secretDependencyFieldMaskSchema + ); +} + +const setRegisteredModelAliasFieldMaskSchema: FieldMaskSchema = { + aliasArg: {wire: 'alias_arg'}, + fullNameArg: {wire: 'full_name_arg'}, + versionNum: {wire: 'version_num'}, +}; + +export function setRegisteredModelAliasFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + setRegisteredModelAliasFieldMaskSchema + ); +} + +const tableDependencyFieldMaskSchema: FieldMaskSchema = { + tableFullName: {wire: 'table_full_name'}, +}; + +export function tableDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + tableDependencyFieldMaskSchema + ); +} + +const updateModelVersionFieldMaskSchema: FieldMaskSchema = { + aliases: {wire: 'aliases'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + fullNameArg: {wire: 'full_name_arg'}, + id: {wire: 'id'}, + metastoreId: {wire: 'metastore_id'}, + modelName: {wire: 'model_name'}, + modelVersionDependencies: { + wire: 'model_version_dependencies', + children: () => dependencyListFieldMaskSchema, + }, + runId: {wire: 'run_id'}, + runWorkspaceId: {wire: 'run_workspace_id'}, + schemaName: {wire: 'schema_name'}, + source: {wire: 'source'}, + status: {wire: 'status'}, + storageLocation: {wire: 'storage_location'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + version: {wire: 'version'}, + versionArg: {wire: 'version_arg'}, +}; + +export function updateModelVersionFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateModelVersionFieldMaskSchema + ); +} + +const updateRegisteredModelFieldMaskSchema: FieldMaskSchema = { + aliases: {wire: 'aliases'}, + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + fullName: {wire: 'full_name'}, + fullNameArg: {wire: 'full_name_arg'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + newName: {wire: 'new_name'}, + owner: {wire: 'owner'}, + schemaName: {wire: 'schema_name'}, + storageLocation: {wire: 'storage_location'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function updateRegisteredModelFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateRegisteredModelFieldMaskSchema + ); +} + +const volumeDependencyFieldMaskSchema: FieldMaskSchema = { + volumeFullName: {wire: 'volume_full_name'}, +}; + +export function volumeDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + volumeDependencyFieldMaskSchema + ); +} diff --git a/packages/resourcequotas/src/v1/model.ts b/packages/resourcequotas/src/v1/model.ts index 2fe9c0b8..8783e972 100644 --- a/packages/resourcequotas/src/v1/model.ts +++ b/packages/resourcequotas/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The type of Unity Catalog securable. */ @@ -148,3 +150,66 @@ export const marshalQuotaInfoSchema: z.ZodType = z quota_limit: d.quotaLimit, last_refreshed_at: d.lastRefreshedAt, })); + +const getQuotaFieldMaskSchema: FieldMaskSchema = { + parentFullName: {wire: 'parent_full_name'}, + parentSecurableType: {wire: 'parent_securable_type'}, + quotaName: {wire: 'quota_name'}, +}; + +export function getQuotaFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getQuotaFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getQuota_ResponseFieldMaskSchema: FieldMaskSchema = { + quotaInfo: {wire: 'quota_info', children: () => quotaInfoFieldMaskSchema}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getQuota_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getQuota_ResponseFieldMaskSchema + ); +} + +const listQuotasFieldMaskSchema: FieldMaskSchema = { + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listQuotasFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, listQuotasFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listQuotas_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + quotas: {wire: 'quotas'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listQuotas_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listQuotas_ResponseFieldMaskSchema + ); +} + +const quotaInfoFieldMaskSchema: FieldMaskSchema = { + lastRefreshedAt: {wire: 'last_refreshed_at'}, + parentFullName: {wire: 'parent_full_name'}, + parentSecurableType: {wire: 'parent_securable_type'}, + quotaCount: {wire: 'quota_count'}, + quotaLimit: {wire: 'quota_limit'}, + quotaName: {wire: 'quota_name'}, +}; + +export function quotaInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, quotaInfoFieldMaskSchema); +} diff --git a/packages/rfa/src/v1/model.ts b/packages/rfa/src/v1/model.ts index 51e64a8f..a35d52db 100644 --- a/packages/rfa/src/v1/model.ts +++ b/packages/rfa/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum DestinationType { @@ -412,3 +414,158 @@ export const marshalSecurablePermissionsSchema: z.ZodType = z securable: d.securable, permissions: d.permissions, })); + +const accessRequestDestinationsFieldMaskSchema: FieldMaskSchema = { + areAnyDestinationsHidden: {wire: 'are_any_destinations_hidden'}, + destinationSourceSecurable: { + wire: 'destination_source_securable', + children: () => securableFieldMaskSchema, + }, + destinations: {wire: 'destinations'}, + fullName: {wire: 'full_name'}, + securable: {wire: 'securable', children: () => securableFieldMaskSchema}, + securableType: {wire: 'securable_type'}, +}; + +export function accessRequestDestinationsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + accessRequestDestinationsFieldMaskSchema + ); +} + +const batchCreateAccessRequestsRequestFieldMaskSchema: FieldMaskSchema = { + requests: {wire: 'requests'}, +}; + +export function batchCreateAccessRequestsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + batchCreateAccessRequestsRequestFieldMaskSchema + ); +} + +const batchCreateAccessRequestsResponseFieldMaskSchema: FieldMaskSchema = { + responses: {wire: 'responses'}, +}; + +export function batchCreateAccessRequestsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + batchCreateAccessRequestsResponseFieldMaskSchema + ); +} + +const createAccessRequestFieldMaskSchema: FieldMaskSchema = { + behalfOf: {wire: 'behalf_of', children: () => principalFieldMaskSchema}, + comment: {wire: 'comment'}, + securablePermissions: {wire: 'securable_permissions'}, +}; + +export function createAccessRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createAccessRequestFieldMaskSchema + ); +} + +const createAccessRequestResponseFieldMaskSchema: FieldMaskSchema = { + behalfOf: {wire: 'behalf_of', children: () => principalFieldMaskSchema}, + requestDestinations: {wire: 'request_destinations'}, +}; + +export function createAccessRequestResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createAccessRequestResponseFieldMaskSchema + ); +} + +const getAccessRequestDestinationsRequestFieldMaskSchema: FieldMaskSchema = { + fullName: {wire: 'full_name'}, + securableType: {wire: 'securable_type'}, +}; + +export function getAccessRequestDestinationsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getAccessRequestDestinationsRequestFieldMaskSchema + ); +} + +const notificationDestinationFieldMaskSchema: FieldMaskSchema = { + destinationId: {wire: 'destination_id'}, + destinationType: {wire: 'destination_type'}, + specialDestination: {wire: 'special_destination'}, +}; + +export function notificationDestinationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + notificationDestinationFieldMaskSchema + ); +} + +const principalFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, + principalType: {wire: 'principal_type'}, +}; + +export function principalFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, principalFieldMaskSchema); +} + +const securableFieldMaskSchema: FieldMaskSchema = { + fullName: {wire: 'full_name'}, + providerShare: {wire: 'provider_share'}, + type: {wire: 'type'}, +}; + +export function securableFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, securableFieldMaskSchema); +} + +const securablePermissionsFieldMaskSchema: FieldMaskSchema = { + permissions: {wire: 'permissions'}, + securable: {wire: 'securable', children: () => securableFieldMaskSchema}, +}; + +export function securablePermissionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + securablePermissionsFieldMaskSchema + ); +} + +const updateAccessRequestDestinationsRequestFieldMaskSchema: FieldMaskSchema = { + accessRequestDestinations: { + wire: 'access_request_destinations', + children: () => accessRequestDestinationsFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateAccessRequestDestinationsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateAccessRequestDestinationsRequestFieldMaskSchema + ); +} diff --git a/packages/schemas/src/v1/model.ts b/packages/schemas/src/v1/model.ts index 088f0001..a4ab175c 100644 --- a/packages/schemas/src/v1/model.ts +++ b/packages/schemas/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The type of the catalog. */ @@ -577,3 +579,269 @@ export const marshalUpdateSchemaSchema: z.ZodType = z properties: d.properties, options: d.options, })); + +const createSchemaFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + catalogType: {wire: 'catalog_type'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + effectivePredictiveOptimizationFlag: { + wire: 'effective_predictive_optimization_flag', + children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, + }, + enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + options: {wire: 'options'}, + owner: {wire: 'owner'}, + properties: {wire: 'properties'}, + schemaId: {wire: 'schema_id'}, + storageLocation: {wire: 'storage_location'}, + storageRoot: {wire: 'storage_root'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function createSchemaFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createSchemaFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createSchema_OptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createSchema_OptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createSchema_OptionsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createSchema_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createSchema_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createSchema_PropertiesEntryFieldMaskSchema + ); +} + +const deleteSchemaFieldMaskSchema: FieldMaskSchema = { + force: {wire: 'force'}, + fullNameArg: {wire: 'full_name_arg'}, +}; + +export function deleteSchemaFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deleteSchemaFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteSchema_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteSchema_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteSchema_ResponseFieldMaskSchema + ); +} + +const effectivePredictiveOptimizationFlagFieldMaskSchema: FieldMaskSchema = { + inheritedFromName: {wire: 'inherited_from_name'}, + inheritedFromType: {wire: 'inherited_from_type'}, + value: {wire: 'value'}, +}; + +export function effectivePredictiveOptimizationFlagFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + effectivePredictiveOptimizationFlagFieldMaskSchema + ); +} + +const getSchemaFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, + includeBrowse: {wire: 'include_browse'}, +}; + +export function getSchemaFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getSchemaFieldMaskSchema); +} + +const listSchemasFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, + includeBrowse: {wire: 'include_browse'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, +}; + +export function listSchemasFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listSchemasFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listSchemas_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + schemas: {wire: 'schemas'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listSchemas_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listSchemas_ResponseFieldMaskSchema + ); +} + +const schemaInfoFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + catalogType: {wire: 'catalog_type'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + effectivePredictiveOptimizationFlag: { + wire: 'effective_predictive_optimization_flag', + children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, + }, + enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + options: {wire: 'options'}, + owner: {wire: 'owner'}, + properties: {wire: 'properties'}, + schemaId: {wire: 'schema_id'}, + storageLocation: {wire: 'storage_location'}, + storageRoot: {wire: 'storage_root'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function schemaInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, schemaInfoFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const schemaInfo_OptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function schemaInfo_OptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + schemaInfo_OptionsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const schemaInfo_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function schemaInfo_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + schemaInfo_PropertiesEntryFieldMaskSchema + ); +} + +const updateSchemaFieldMaskSchema: FieldMaskSchema = { + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + catalogType: {wire: 'catalog_type'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + effectivePredictiveOptimizationFlag: { + wire: 'effective_predictive_optimization_flag', + children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, + }, + enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, + fullName: {wire: 'full_name'}, + fullNameArg: {wire: 'full_name_arg'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + newName: {wire: 'new_name'}, + options: {wire: 'options'}, + owner: {wire: 'owner'}, + properties: {wire: 'properties'}, + schemaId: {wire: 'schema_id'}, + storageLocation: {wire: 'storage_location'}, + storageRoot: {wire: 'storage_root'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, +}; + +export function updateSchemaFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, updateSchemaFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateSchema_OptionsEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateSchema_OptionsEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateSchema_OptionsEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateSchema_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateSchema_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateSchema_PropertiesEntryFieldMaskSchema + ); +} diff --git a/packages/sdk/src/model.ts b/packages/sdk/src/model.ts index 7578b542..66c5db6f 100644 --- a/packages/sdk/src/model.ts +++ b/packages/sdk/src/model.ts @@ -1,5 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; + /** * LaunchStage represent the lifecycle stage of an API component. Every API * component is expected to progress through these stages in the following @@ -421,3 +424,200 @@ export interface WaitForState_StateInfo { */ messagePath?: string[] | undefined; } + +const fieldMetadataFieldMaskSchema: FieldMaskSchema = { + isMultiSegment: {wire: 'is_multi_segment'}, + isStream: {wire: 'is_stream'}, + updateMaskRoot: {wire: 'update_mask_root'}, +}; + +export function fieldMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, fieldMetadataFieldMaskSchema); +} + +const longRunningOperationFieldMaskSchema: FieldMaskSchema = { + operationInfo: { + wire: 'operation_info', + children: () => longRunningOperation_OperationInfoFieldMaskSchema, + }, + operationMethods: { + wire: 'operation_methods', + children: () => longRunningOperation_OperationMethodsFieldMaskSchema, + }, +}; + +export function longRunningOperationFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + longRunningOperationFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const longRunningOperation_OperationInfoFieldMaskSchema: FieldMaskSchema = { + metadataType: {wire: 'metadata_type'}, + responseType: {wire: 'response_type'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function longRunningOperation_OperationInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + longRunningOperation_OperationInfoFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const longRunningOperation_OperationMethodsFieldMaskSchema: FieldMaskSchema = { + cancel: {wire: 'cancel'}, + delete: {wire: 'delete'}, + get: {wire: 'get'}, + list: {wire: 'list'}, + wait: {wire: 'wait'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function longRunningOperation_OperationMethodsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + longRunningOperation_OperationMethodsFieldMaskSchema + ); +} + +const methodMetadataFieldMaskSchema: FieldMaskSchema = { + requestHeaders: {wire: 'request_headers'}, + responseHeaders: {wire: 'response_headers'}, +}; + +export function methodMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, methodMetadataFieldMaskSchema); +} + +const paginationFieldMaskSchema: FieldMaskSchema = { + offsetInfo: { + wire: 'offset_info', + children: () => pagination_OffsetInfoFieldMaskSchema, + }, + results: {wire: 'results'}, + tokenInfo: { + wire: 'token_info', + children: () => pagination_PageTokenInfoFieldMaskSchema, + }, +}; + +export function paginationFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, paginationFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const pagination_OffsetInfoFieldMaskSchema: FieldMaskSchema = { + defaultMaxResults: {wire: 'default_max_results'}, + maxResults: {wire: 'max_results'}, + offset: {wire: 'offset'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function pagination_OffsetInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + pagination_OffsetInfoFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const pagination_PageTokenInfoFieldMaskSchema: FieldMaskSchema = { + defaultMaxResults: {wire: 'default_max_results'}, + maxResults: {wire: 'max_results'}, + request: {wire: 'request'}, + response: {wire: 'response'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function pagination_PageTokenInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + pagination_PageTokenInfoFieldMaskSchema + ); +} + +const waitForStateFieldMaskSchema: FieldMaskSchema = { + binding: { + wire: 'binding', + children: () => waitForState_BindingFieldMaskSchema, + }, + methodToPoll: {wire: 'method_to_poll'}, + stateInfo: { + wire: 'state_info', + children: () => waitForState_StateInfoFieldMaskSchema, + }, +}; + +export function waitForStateFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, waitForStateFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const waitForState_BindingFieldMaskSchema: FieldMaskSchema = { + pairs: {wire: 'pairs'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function waitForState_BindingFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + waitForState_BindingFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const waitForState_Binding_BindingPairFieldMaskSchema: FieldMaskSchema = { + pollMethodField: {wire: 'poll_method_field'}, + requestField: {wire: 'request_field'}, + responseField: {wire: 'response_field'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function waitForState_Binding_BindingPairFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + waitForState_Binding_BindingPairFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const waitForState_StateInfoFieldMaskSchema: FieldMaskSchema = { + failureStates: {wire: 'failure_states'}, + messagePath: {wire: 'message_path'}, + statePath: {wire: 'state_path'}, + successStates: {wire: 'success_states'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function waitForState_StateInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + waitForState_StateInfoFieldMaskSchema + ); +} diff --git a/packages/secrets/src/v1/model.ts b/packages/secrets/src/v1/model.ts index 0f1a5df3..31731a57 100644 --- a/packages/secrets/src/v1/model.ts +++ b/packages/secrets/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The ACL permission levels for Secret ACLs applied to secret scopes. */ @@ -559,3 +561,300 @@ export const marshalSecretScopeSchema: z.ZodType = z backend_type: d.backendType, keyvault_metadata: d.keyvaultMetadata, })); + +const aclItemFieldMaskSchema: FieldMaskSchema = { + permission: {wire: 'permission'}, + principal: {wire: 'principal'}, +}; + +export function aclItemFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, aclItemFieldMaskSchema); +} + +const azureKeyVaultSecretScopeMetadataFieldMaskSchema: FieldMaskSchema = { + dnsName: {wire: 'dns_name'}, + resourceId: {wire: 'resource_id'}, +}; + +export function azureKeyVaultSecretScopeMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + azureKeyVaultSecretScopeMetadataFieldMaskSchema + ); +} + +const createScopeFieldMaskSchema: FieldMaskSchema = { + backendAzureKeyvault: { + wire: 'backend_azure_keyvault', + children: () => azureKeyVaultSecretScopeMetadataFieldMaskSchema, + }, + initialManagePrincipal: {wire: 'initial_manage_principal'}, + scope: {wire: 'scope'}, + scopeBackendType: {wire: 'scope_backend_type'}, +}; + +export function createScopeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createScopeFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createScope_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createScope_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createScope_ResponseFieldMaskSchema + ); +} + +const deleteAclFieldMaskSchema: FieldMaskSchema = { + principal: {wire: 'principal'}, + scope: {wire: 'scope'}, +}; + +export function deleteAclFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, deleteAclFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteAcl_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteAcl_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteAcl_ResponseFieldMaskSchema + ); +} + +const deleteScopeFieldMaskSchema: FieldMaskSchema = { + scope: {wire: 'scope'}, +}; + +export function deleteScopeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deleteScopeFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteScope_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteScope_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteScope_ResponseFieldMaskSchema + ); +} + +const deleteSecretFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + scope: {wire: 'scope'}, +}; + +export function deleteSecretFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deleteSecretFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteSecret_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteSecret_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteSecret_ResponseFieldMaskSchema + ); +} + +const getAclFieldMaskSchema: FieldMaskSchema = { + principal: {wire: 'principal'}, + scope: {wire: 'scope'}, +}; + +export function getAclFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getAclFieldMaskSchema); +} + +const getSecretFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + scope: {wire: 'scope'}, +}; + +export function getSecretFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getSecretFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getSecret_ResponseFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getSecret_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getSecret_ResponseFieldMaskSchema + ); +} + +const listAclsFieldMaskSchema: FieldMaskSchema = { + scope: {wire: 'scope'}, +}; + +export function listAclsFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, listAclsFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listAcls_ResponseFieldMaskSchema: FieldMaskSchema = { + items: {wire: 'items'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listAcls_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAcls_ResponseFieldMaskSchema + ); +} + +const listScopesFieldMaskSchema: FieldMaskSchema = {}; + +export function listScopesFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, listScopesFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listScopes_ResponseFieldMaskSchema: FieldMaskSchema = { + scopes: {wire: 'scopes'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listScopes_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listScopes_ResponseFieldMaskSchema + ); +} + +const listSecretsFieldMaskSchema: FieldMaskSchema = { + scope: {wire: 'scope'}, +}; + +export function listSecretsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listSecretsFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listSecrets_ResponseFieldMaskSchema: FieldMaskSchema = { + secrets: {wire: 'secrets'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listSecrets_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listSecrets_ResponseFieldMaskSchema + ); +} + +const putAclFieldMaskSchema: FieldMaskSchema = { + permission: {wire: 'permission'}, + principal: {wire: 'principal'}, + scope: {wire: 'scope'}, +}; + +export function putAclFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, putAclFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const putAcl_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function putAcl_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + putAcl_ResponseFieldMaskSchema + ); +} + +const putSecretFieldMaskSchema: FieldMaskSchema = { + bytesValue: {wire: 'bytes_value'}, + key: {wire: 'key'}, + scope: {wire: 'scope'}, + stringValue: {wire: 'string_value'}, +}; + +export function putSecretFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, putSecretFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const putSecret_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function putSecret_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + putSecret_ResponseFieldMaskSchema + ); +} + +const secretMetadataFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, +}; + +export function secretMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, secretMetadataFieldMaskSchema); +} + +const secretScopeFieldMaskSchema: FieldMaskSchema = { + backendType: {wire: 'backend_type'}, + keyvaultMetadata: { + wire: 'keyvault_metadata', + children: () => azureKeyVaultSecretScopeMetadataFieldMaskSchema, + }, + name: {wire: 'name'}, +}; + +export function secretScopeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, secretScopeFieldMaskSchema); +} diff --git a/packages/serviceprincipalsecrets/src/v1/model.ts b/packages/serviceprincipalsecrets/src/v1/model.ts index 2599833f..4a5dc302 100644 --- a/packages/serviceprincipalsecrets/src/v1/model.ts +++ b/packages/serviceprincipalsecrets/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface CreateServicePrincipalSecret { @@ -239,3 +241,117 @@ export const marshalServicePrincipalSecretSchema: z.ZodType = z status: d.status, expire_time: d.expireTime, })); + +const createServicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + lifetime: {wire: 'lifetime'}, + servicePrincipal: {wire: 'service_principal'}, +}; + +export function createServicePrincipalSecretFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createServicePrincipalSecretFieldMaskSchema + ); +} + +const createServicePrincipalSecretResponseFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + expireTime: {wire: 'expire_time'}, + id: {wire: 'id'}, + secret: {wire: 'secret'}, + secretHash: {wire: 'secret_hash'}, + status: {wire: 'status'}, + updateTime: {wire: 'update_time'}, +}; + +export function createServicePrincipalSecretResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createServicePrincipalSecretResponseFieldMaskSchema + ); +} + +const deleteServicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + secretId: {wire: 'secret_id'}, + servicePrincipal: {wire: 'service_principal'}, +}; + +export function deleteServicePrincipalSecretFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteServicePrincipalSecretFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteServicePrincipalSecret_ResponseFieldMaskSchema: FieldMaskSchema = + {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteServicePrincipalSecret_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteServicePrincipalSecret_ResponseFieldMaskSchema + ); +} + +const listServicePrincipalSecretsFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + servicePrincipal: {wire: 'service_principal'}, +}; + +export function listServicePrincipalSecretsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listServicePrincipalSecretsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listServicePrincipalSecrets_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + secrets: {wire: 'secrets'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listServicePrincipalSecrets_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listServicePrincipalSecrets_ResponseFieldMaskSchema + ); +} + +const servicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + expireTime: {wire: 'expire_time'}, + id: {wire: 'id'}, + secret: {wire: 'secret'}, + secretHash: {wire: 'secret_hash'}, + status: {wire: 'status'}, + updateTime: {wire: 'update_time'}, +}; + +export function servicePrincipalSecretFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + servicePrincipalSecretFieldMaskSchema + ); +} diff --git a/packages/serviceprincipalsecretsproxy/src/v1/model.ts b/packages/serviceprincipalsecretsproxy/src/v1/model.ts index 2599833f..4a5dc302 100644 --- a/packages/serviceprincipalsecretsproxy/src/v1/model.ts +++ b/packages/serviceprincipalsecretsproxy/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface CreateServicePrincipalSecret { @@ -239,3 +241,117 @@ export const marshalServicePrincipalSecretSchema: z.ZodType = z status: d.status, expire_time: d.expireTime, })); + +const createServicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + lifetime: {wire: 'lifetime'}, + servicePrincipal: {wire: 'service_principal'}, +}; + +export function createServicePrincipalSecretFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createServicePrincipalSecretFieldMaskSchema + ); +} + +const createServicePrincipalSecretResponseFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + expireTime: {wire: 'expire_time'}, + id: {wire: 'id'}, + secret: {wire: 'secret'}, + secretHash: {wire: 'secret_hash'}, + status: {wire: 'status'}, + updateTime: {wire: 'update_time'}, +}; + +export function createServicePrincipalSecretResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createServicePrincipalSecretResponseFieldMaskSchema + ); +} + +const deleteServicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + secretId: {wire: 'secret_id'}, + servicePrincipal: {wire: 'service_principal'}, +}; + +export function deleteServicePrincipalSecretFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteServicePrincipalSecretFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteServicePrincipalSecret_ResponseFieldMaskSchema: FieldMaskSchema = + {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteServicePrincipalSecret_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteServicePrincipalSecret_ResponseFieldMaskSchema + ); +} + +const listServicePrincipalSecretsFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + servicePrincipal: {wire: 'service_principal'}, +}; + +export function listServicePrincipalSecretsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listServicePrincipalSecretsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listServicePrincipalSecrets_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + secrets: {wire: 'secrets'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listServicePrincipalSecrets_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listServicePrincipalSecrets_ResponseFieldMaskSchema + ); +} + +const servicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + expireTime: {wire: 'expire_time'}, + id: {wire: 'id'}, + secret: {wire: 'secret'}, + secretHash: {wire: 'secret_hash'}, + status: {wire: 'status'}, + updateTime: {wire: 'update_time'}, +}; + +export function servicePrincipalSecretFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + servicePrincipalSecretFieldMaskSchema + ); +} diff --git a/packages/settings/src/v2/model.ts b/packages/settings/src/v2/model.ts index 2e6d8efa..dfbc9623 100644 --- a/packages/settings/src/v2/model.ts +++ b/packages/settings/src/v2/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** @@ -958,3 +960,480 @@ export const marshalUserPreferenceSchema: z.ZodType = z effective_boolean_val: d.effectiveBooleanVal, effective_string_val: d.effectiveStringVal, })); + +const aibiDashboardEmbeddingAccessPolicyFieldMaskSchema: FieldMaskSchema = { + accessPolicyType: {wire: 'access_policy_type'}, +}; + +export function aibiDashboardEmbeddingAccessPolicyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + aibiDashboardEmbeddingAccessPolicyFieldMaskSchema + ); +} + +const aibiDashboardEmbeddingApprovedDomainsFieldMaskSchema: FieldMaskSchema = { + approvedDomains: {wire: 'approved_domains'}, +}; + +export function aibiDashboardEmbeddingApprovedDomainsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + aibiDashboardEmbeddingApprovedDomainsFieldMaskSchema + ); +} + +const booleanMessageFieldMaskSchema: FieldMaskSchema = { + value: {wire: 'value'}, +}; + +export function booleanMessageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, booleanMessageFieldMaskSchema); +} + +const clusterAutoRestartMessageFieldMaskSchema: FieldMaskSchema = { + canToggle: {wire: 'can_toggle'}, + enabled: {wire: 'enabled'}, + enablementDetails: { + wire: 'enablement_details', + children: () => clusterAutoRestartMessage_EnablementDetailsFieldMaskSchema, + }, + maintenanceWindow: { + wire: 'maintenance_window', + children: () => clusterAutoRestartMessage_MaintenanceWindowFieldMaskSchema, + }, + restartEvenIfNoUpdatesAvailable: { + wire: 'restart_even_if_no_updates_available', + }, +}; + +export function clusterAutoRestartMessageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + clusterAutoRestartMessageFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const clusterAutoRestartMessage_EnablementDetailsFieldMaskSchema: FieldMaskSchema = + { + forcedForComplianceMode: {wire: 'forced_for_compliance_mode'}, + unavailableForDisabledEntitlement: { + wire: 'unavailable_for_disabled_entitlement', + }, + unavailableForNonEnterpriseTier: { + wire: 'unavailable_for_non_enterprise_tier', + }, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function clusterAutoRestartMessage_EnablementDetailsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + clusterAutoRestartMessage_EnablementDetailsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const clusterAutoRestartMessage_MaintenanceWindowFieldMaskSchema: FieldMaskSchema = + { + weekDayBasedSchedule: { + wire: 'week_day_based_schedule', + children: () => + clusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleFieldMaskSchema, + }, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function clusterAutoRestartMessage_MaintenanceWindowFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + clusterAutoRestartMessage_MaintenanceWindowFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const clusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleFieldMaskSchema: FieldMaskSchema = + { + dayOfWeek: {wire: 'day_of_week'}, + frequency: {wire: 'frequency'}, + windowStartTime: { + wire: 'window_start_time', + children: () => + clusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeFieldMaskSchema, + }, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function clusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + clusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const clusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeFieldMaskSchema: FieldMaskSchema = + { + hours: {wire: 'hours'}, + minutes: {wire: 'minutes'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function clusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + clusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeFieldMaskSchema + ); +} + +const getPublicAccountSettingRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + name: {wire: 'name'}, +}; + +export function getPublicAccountSettingRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getPublicAccountSettingRequestFieldMaskSchema + ); +} + +const getPublicAccountUserPreferenceRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + name: {wire: 'name'}, + userId: {wire: 'user_id'}, +}; + +export function getPublicAccountUserPreferenceRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getPublicAccountUserPreferenceRequestFieldMaskSchema + ); +} + +const getPublicWorkspaceSettingRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getPublicWorkspaceSettingRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getPublicWorkspaceSettingRequestFieldMaskSchema + ); +} + +const integerMessageFieldMaskSchema: FieldMaskSchema = { + value: {wire: 'value'}, +}; + +export function integerMessageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, integerMessageFieldMaskSchema); +} + +const listAccountSettingsMetadataRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listAccountSettingsMetadataRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAccountSettingsMetadataRequestFieldMaskSchema + ); +} + +const listAccountSettingsMetadataResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + settingsMetadata: {wire: 'settings_metadata'}, +}; + +export function listAccountSettingsMetadataResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAccountSettingsMetadataResponseFieldMaskSchema + ); +} + +const listAccountUserPreferencesMetadataRequestFieldMaskSchema: FieldMaskSchema = + { + accountId: {wire: 'account_id'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + userId: {wire: 'user_id'}, + }; + +export function listAccountUserPreferencesMetadataRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAccountUserPreferencesMetadataRequestFieldMaskSchema + ); +} + +const listAccountUserPreferencesMetadataResponseFieldMaskSchema: FieldMaskSchema = + { + nextPageToken: {wire: 'next_page_token'}, + settingsMetadata: {wire: 'settings_metadata'}, + }; + +export function listAccountUserPreferencesMetadataResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listAccountUserPreferencesMetadataResponseFieldMaskSchema + ); +} + +const listWorkspaceSettingsMetadataRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listWorkspaceSettingsMetadataRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceSettingsMetadataRequestFieldMaskSchema + ); +} + +const listWorkspaceSettingsMetadataResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + settingsMetadata: {wire: 'settings_metadata'}, +}; + +export function listWorkspaceSettingsMetadataResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspaceSettingsMetadataResponseFieldMaskSchema + ); +} + +const patchPublicAccountSettingRequestFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + name: {wire: 'name'}, + setting: {wire: 'setting', children: () => settingFieldMaskSchema}, +}; + +export function patchPublicAccountSettingRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + patchPublicAccountSettingRequestFieldMaskSchema + ); +} + +const patchPublicAccountUserPreferenceRequestFieldMaskSchema: FieldMaskSchema = + { + accountId: {wire: 'account_id'}, + name: {wire: 'name'}, + setting: {wire: 'setting', children: () => userPreferenceFieldMaskSchema}, + userId: {wire: 'user_id'}, + }; + +export function patchPublicAccountUserPreferenceRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + patchPublicAccountUserPreferenceRequestFieldMaskSchema + ); +} + +const patchPublicWorkspaceSettingRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + setting: {wire: 'setting', children: () => settingFieldMaskSchema}, +}; + +export function patchPublicWorkspaceSettingRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + patchPublicWorkspaceSettingRequestFieldMaskSchema + ); +} + +const personalComputeMessageFieldMaskSchema: FieldMaskSchema = { + value: {wire: 'value'}, +}; + +export function personalComputeMessageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + personalComputeMessageFieldMaskSchema + ); +} + +const restrictWorkspaceAdminsMessageFieldMaskSchema: FieldMaskSchema = { + disableGovTagCreation: {wire: 'disable_gov_tag_creation'}, + status: {wire: 'status'}, +}; + +export function restrictWorkspaceAdminsMessageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + restrictWorkspaceAdminsMessageFieldMaskSchema + ); +} + +const settingFieldMaskSchema: FieldMaskSchema = { + aibiDashboardEmbeddingAccessPolicy: { + wire: 'aibi_dashboard_embedding_access_policy', + children: () => aibiDashboardEmbeddingAccessPolicyFieldMaskSchema, + }, + aibiDashboardEmbeddingApprovedDomains: { + wire: 'aibi_dashboard_embedding_approved_domains', + children: () => aibiDashboardEmbeddingApprovedDomainsFieldMaskSchema, + }, + automaticClusterUpdateWorkspace: { + wire: 'automatic_cluster_update_workspace', + children: () => clusterAutoRestartMessageFieldMaskSchema, + }, + booleanVal: { + wire: 'boolean_val', + children: () => booleanMessageFieldMaskSchema, + }, + effectiveAibiDashboardEmbeddingAccessPolicy: { + wire: 'effective_aibi_dashboard_embedding_access_policy', + children: () => aibiDashboardEmbeddingAccessPolicyFieldMaskSchema, + }, + effectiveAibiDashboardEmbeddingApprovedDomains: { + wire: 'effective_aibi_dashboard_embedding_approved_domains', + children: () => aibiDashboardEmbeddingApprovedDomainsFieldMaskSchema, + }, + effectiveAutomaticClusterUpdateWorkspace: { + wire: 'effective_automatic_cluster_update_workspace', + children: () => clusterAutoRestartMessageFieldMaskSchema, + }, + effectiveBooleanVal: { + wire: 'effective_boolean_val', + children: () => booleanMessageFieldMaskSchema, + }, + effectiveIntegerVal: { + wire: 'effective_integer_val', + children: () => integerMessageFieldMaskSchema, + }, + effectivePersonalCompute: { + wire: 'effective_personal_compute', + children: () => personalComputeMessageFieldMaskSchema, + }, + effectiveRestrictWorkspaceAdmins: { + wire: 'effective_restrict_workspace_admins', + children: () => restrictWorkspaceAdminsMessageFieldMaskSchema, + }, + effectiveStringVal: { + wire: 'effective_string_val', + children: () => stringMessageFieldMaskSchema, + }, + integerVal: { + wire: 'integer_val', + children: () => integerMessageFieldMaskSchema, + }, + name: {wire: 'name'}, + personalCompute: { + wire: 'personal_compute', + children: () => personalComputeMessageFieldMaskSchema, + }, + restrictWorkspaceAdmins: { + wire: 'restrict_workspace_admins', + children: () => restrictWorkspaceAdminsMessageFieldMaskSchema, + }, + stringVal: {wire: 'string_val', children: () => stringMessageFieldMaskSchema}, +}; + +export function settingFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, settingFieldMaskSchema); +} + +const settingsMetadataFieldMaskSchema: FieldMaskSchema = { + description: {wire: 'description'}, + displayName: {wire: 'display_name'}, + docsLink: {wire: 'docs_link'}, + name: {wire: 'name'}, + previewPhase: {wire: 'preview_phase'}, + type: {wire: 'type'}, +}; + +export function settingsMetadataFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + settingsMetadataFieldMaskSchema + ); +} + +const stringMessageFieldMaskSchema: FieldMaskSchema = { + value: {wire: 'value'}, +}; + +export function stringMessageFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, stringMessageFieldMaskSchema); +} + +const userPreferenceFieldMaskSchema: FieldMaskSchema = { + booleanVal: { + wire: 'boolean_val', + children: () => booleanMessageFieldMaskSchema, + }, + effectiveBooleanVal: { + wire: 'effective_boolean_val', + children: () => booleanMessageFieldMaskSchema, + }, + effectiveStringVal: { + wire: 'effective_string_val', + children: () => stringMessageFieldMaskSchema, + }, + name: {wire: 'name'}, + stringVal: {wire: 'string_val', children: () => stringMessageFieldMaskSchema}, + userId: {wire: 'user_id'}, +}; + +export function userPreferenceFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, userPreferenceFieldMaskSchema); +} diff --git a/packages/statementexecution/src/v1/model.ts b/packages/statementexecution/src/v1/model.ts index cb58e30e..59c26b97 100644 --- a/packages/statementexecution/src/v1/model.ts +++ b/packages/statementexecution/src/v1/model.ts @@ -1,6 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import type {JsonValue} from '@databricks/sdk-core/wkt'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema, JsonValue} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; const jsonValueSchema: z.ZodType = z.lazy(() => @@ -955,3 +956,245 @@ export const marshalStatementStatusSchema: z.ZodType = z error: d.error, sql_state: d.sqlState, })); + +const cancelStatementRequestFieldMaskSchema: FieldMaskSchema = { + statementId: {wire: 'statement_id'}, +}; + +export function cancelStatementRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + cancelStatementRequestFieldMaskSchema + ); +} + +const cancelStatementResponseFieldMaskSchema: FieldMaskSchema = {}; + +export function cancelStatementResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + cancelStatementResponseFieldMaskSchema + ); +} + +const chunkInfoFieldMaskSchema: FieldMaskSchema = { + byteCount: {wire: 'byte_count'}, + chunkIndex: {wire: 'chunk_index'}, + nextChunkIndex: {wire: 'next_chunk_index'}, + nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, + rowCount: {wire: 'row_count'}, + rowOffset: {wire: 'row_offset'}, +}; + +export function chunkInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, chunkInfoFieldMaskSchema); +} + +const columnInfoFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + position: {wire: 'position'}, + typeIntervalType: {wire: 'type_interval_type'}, + typeName: {wire: 'type_name'}, + typePrecision: {wire: 'type_precision'}, + typeScale: {wire: 'type_scale'}, + typeText: {wire: 'type_text'}, +}; + +export function columnInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, columnInfoFieldMaskSchema); +} + +const executeStatementRequestFieldMaskSchema: FieldMaskSchema = { + byteLimit: {wire: 'byte_limit'}, + catalog: {wire: 'catalog'}, + disposition: {wire: 'disposition'}, + format: {wire: 'format'}, + onWaitTimeout: {wire: 'on_wait_timeout'}, + parameters: {wire: 'parameters'}, + queryTags: {wire: 'query_tags'}, + rowLimit: {wire: 'row_limit'}, + schema: {wire: 'schema'}, + statement: {wire: 'statement'}, + waitTimeout: {wire: 'wait_timeout'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function executeStatementRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + executeStatementRequestFieldMaskSchema + ); +} + +const externalLinkFieldMaskSchema: FieldMaskSchema = { + byteCount: {wire: 'byte_count'}, + chunkIndex: {wire: 'chunk_index'}, + expiration: {wire: 'expiration'}, + externalLink: {wire: 'external_link'}, + httpHeaders: {wire: 'http_headers'}, + nextChunkIndex: {wire: 'next_chunk_index'}, + nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, + rowCount: {wire: 'row_count'}, + rowOffset: {wire: 'row_offset'}, +}; + +export function externalLinkFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, externalLinkFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const externalLink_HttpHeadersEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function externalLink_HttpHeadersEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + externalLink_HttpHeadersEntryFieldMaskSchema + ); +} + +const getResultDataRequestFieldMaskSchema: FieldMaskSchema = { + chunkIndex: {wire: 'chunk_index'}, + statementId: {wire: 'statement_id'}, +}; + +export function getResultDataRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getResultDataRequestFieldMaskSchema + ); +} + +const getStatementResultRequestFieldMaskSchema: FieldMaskSchema = { + statementId: {wire: 'statement_id'}, +}; + +export function getStatementResultRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getStatementResultRequestFieldMaskSchema + ); +} + +const queryTagFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +export function queryTagFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, queryTagFieldMaskSchema); +} + +const resultDataFieldMaskSchema: FieldMaskSchema = { + byteCount: {wire: 'byte_count'}, + chunkIndex: {wire: 'chunk_index'}, + dataArray: {wire: 'data_array'}, + externalLinks: {wire: 'external_links'}, + nextChunkIndex: {wire: 'next_chunk_index'}, + nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, + rowCount: {wire: 'row_count'}, + rowOffset: {wire: 'row_offset'}, +}; + +export function resultDataFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, resultDataFieldMaskSchema); +} + +const resultManifestFieldMaskSchema: FieldMaskSchema = { + chunks: {wire: 'chunks'}, + format: {wire: 'format'}, + schema: {wire: 'schema', children: () => schemaFieldMaskSchema}, + totalByteCount: {wire: 'total_byte_count'}, + totalChunkCount: {wire: 'total_chunk_count'}, + totalRowCount: {wire: 'total_row_count'}, + truncated: {wire: 'truncated'}, +}; + +export function resultManifestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, resultManifestFieldMaskSchema); +} + +const schemaFieldMaskSchema: FieldMaskSchema = { + columnCount: {wire: 'column_count'}, + columns: {wire: 'columns'}, +}; + +export function schemaFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, schemaFieldMaskSchema); +} + +const serviceErrorFieldMaskSchema: FieldMaskSchema = { + errorCode: {wire: 'error_code'}, + message: {wire: 'message'}, +}; + +export function serviceErrorFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, serviceErrorFieldMaskSchema); +} + +const statementParameterFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, + type: {wire: 'type'}, + value: {wire: 'value'}, +}; + +export function statementParameterFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + statementParameterFieldMaskSchema + ); +} + +const statementResponseFieldMaskSchema: FieldMaskSchema = { + manifest: {wire: 'manifest', children: () => resultManifestFieldMaskSchema}, + result: {wire: 'result', children: () => resultDataFieldMaskSchema}, + statementId: {wire: 'statement_id'}, + status: {wire: 'status', children: () => statementStatusFieldMaskSchema}, +}; + +export function statementResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + statementResponseFieldMaskSchema + ); +} + +const statementStatusFieldMaskSchema: FieldMaskSchema = { + error: {wire: 'error', children: () => serviceErrorFieldMaskSchema}, + sqlState: {wire: 'sql_state'}, + state: {wire: 'state'}, +}; + +export function statementStatusFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + statementStatusFieldMaskSchema + ); +} diff --git a/packages/systemschemas/src/v1/model.ts b/packages/systemschemas/src/v1/model.ts index 6b5d9256..98a5b3f5 100644 --- a/packages/systemschemas/src/v1/model.ts +++ b/packages/systemschemas/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface DisableSystemSchema { @@ -145,3 +147,103 @@ export const marshalSystemSchemaInfoSchema: z.ZodType = z schema: d.schema, state: d.state, })); + +const disableSystemSchemaFieldMaskSchema: FieldMaskSchema = { + metastoreId: {wire: 'metastore_id'}, + schema: {wire: 'schema'}, +}; + +export function disableSystemSchemaFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + disableSystemSchemaFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const disableSystemSchema_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function disableSystemSchema_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + disableSystemSchema_ResponseFieldMaskSchema + ); +} + +const enableSystemSchemaFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, + metastoreId: {wire: 'metastore_id'}, + schema: {wire: 'schema'}, +}; + +export function enableSystemSchemaFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + enableSystemSchemaFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const enableSystemSchema_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function enableSystemSchema_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + enableSystemSchema_ResponseFieldMaskSchema + ); +} + +const listSystemSchemasFieldMaskSchema: FieldMaskSchema = { + maxResults: {wire: 'max_results'}, + metastoreId: {wire: 'metastore_id'}, + pageToken: {wire: 'page_token'}, +}; + +export function listSystemSchemasFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listSystemSchemasFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listSystemSchemas_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + schemas: {wire: 'schemas'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listSystemSchemas_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listSystemSchemas_ResponseFieldMaskSchema + ); +} + +const systemSchemaInfoFieldMaskSchema: FieldMaskSchema = { + schema: {wire: 'schema'}, + state: {wire: 'state'}, +}; + +export function systemSchemaInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + systemSchemaInfoFieldMaskSchema + ); +} diff --git a/packages/tables/src/v1/model.ts b/packages/tables/src/v1/model.ts index bd75f023..4324572b 100644 --- a/packages/tables/src/v1/model.ts +++ b/packages/tables/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ColumnTypeName { @@ -2151,3 +2153,783 @@ export const marshalVolumeDependencySchema: z.ZodType = z .transform(d => ({ volume_full_name: d.volumeFullName, })); + +const columnInfoFieldMaskSchema: FieldMaskSchema = { + comment: {wire: 'comment'}, + mask: {wire: 'mask', children: () => columnMaskFieldMaskSchema}, + name: {wire: 'name'}, + nullable: {wire: 'nullable'}, + partitionIndex: {wire: 'partition_index'}, + position: {wire: 'position'}, + typeIntervalType: {wire: 'type_interval_type'}, + typeJson: {wire: 'type_json'}, + typeName: {wire: 'type_name'}, + typePrecision: {wire: 'type_precision'}, + typeScale: {wire: 'type_scale'}, + typeText: {wire: 'type_text'}, +}; + +export function columnInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, columnInfoFieldMaskSchema); +} + +const columnMaskFieldMaskSchema: FieldMaskSchema = { + functionName: {wire: 'function_name'}, + usingArguments: {wire: 'using_arguments'}, + usingColumnNames: {wire: 'using_column_names'}, +}; + +export function columnMaskFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, columnMaskFieldMaskSchema); +} + +const conditionalDisplayFieldMaskSchema: FieldMaskSchema = { + dependsOnOption: {wire: 'depends_on_option'}, + hiddenWhenValues: {wire: 'hidden_when_values'}, +}; + +export function conditionalDisplayFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + conditionalDisplayFieldMaskSchema + ); +} + +const connectionDependencyFieldMaskSchema: FieldMaskSchema = { + connectionName: {wire: 'connection_name'}, +}; + +export function connectionDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + connectionDependencyFieldMaskSchema + ); +} + +const createTableFieldMaskSchema: FieldMaskSchema = { + accessPoint: {wire: 'access_point'}, + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + columns: {wire: 'columns'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + dataAccessConfigurationId: {wire: 'data_access_configuration_id'}, + dataSourceFormat: {wire: 'data_source_format'}, + deletedAt: {wire: 'deleted_at'}, + deltaRuntimePropertiesKvpairs: { + wire: 'delta_runtime_properties_kvpairs', + children: () => deltaRuntimePropertiesKvPairsFieldMaskSchema, + }, + effectivePredictiveOptimizationFlag: { + wire: 'effective_predictive_optimization_flag', + children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, + }, + enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, + encryptionDetails: { + wire: 'encryption_details', + children: () => encryptionDetailsFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + pipelineId: {wire: 'pipeline_id'}, + properties: {wire: 'properties'}, + rowFilter: {wire: 'row_filter', children: () => rowFilterFieldMaskSchema}, + schemaName: {wire: 'schema_name'}, + securableKindManifest: { + wire: 'securable_kind_manifest', + children: () => securableKindManifestFieldMaskSchema, + }, + sqlPath: {wire: 'sql_path'}, + storageCredentialName: {wire: 'storage_credential_name'}, + storageLocation: {wire: 'storage_location'}, + tableConstraints: {wire: 'table_constraints'}, + tableId: {wire: 'table_id'}, + tableType: {wire: 'table_type'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + viewDefinition: {wire: 'view_definition'}, + viewDependencies: { + wire: 'view_dependencies', + children: () => dependencyListFieldMaskSchema, + }, +}; + +export function createTableFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createTableFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createTable_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createTable_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createTable_PropertiesEntryFieldMaskSchema + ); +} + +const createTableConstraintFieldMaskSchema: FieldMaskSchema = { + constraint: { + wire: 'constraint', + children: () => tableConstraintFieldMaskSchema, + }, + fullNameArg: {wire: 'full_name_arg'}, +}; + +export function createTableConstraintFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createTableConstraintFieldMaskSchema + ); +} + +const credentialDependencyFieldMaskSchema: FieldMaskSchema = { + credentialName: {wire: 'credential_name'}, +}; + +export function credentialDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + credentialDependencyFieldMaskSchema + ); +} + +const deleteTableFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, +}; + +export function deleteTableFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deleteTableFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteTable_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteTable_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteTable_ResponseFieldMaskSchema + ); +} + +const deleteTableConstraintFieldMaskSchema: FieldMaskSchema = { + cascade: {wire: 'cascade'}, + constraintName: {wire: 'constraint_name'}, + fullNameArg: {wire: 'full_name_arg'}, +}; + +export function deleteTableConstraintFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteTableConstraintFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteTableConstraint_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteTableConstraint_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteTableConstraint_ResponseFieldMaskSchema + ); +} + +const deltaRuntimePropertiesKvPairsFieldMaskSchema: FieldMaskSchema = { + deltaRuntimeProperties: {wire: 'delta_runtime_properties'}, +}; + +export function deltaRuntimePropertiesKvPairsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deltaRuntimePropertiesKvPairsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deltaRuntimePropertiesKvPairs_DeltaRuntimePropertiesEntryFieldMaskSchema: FieldMaskSchema = + { + key: {wire: 'key'}, + value: {wire: 'value'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deltaRuntimePropertiesKvPairs_DeltaRuntimePropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deltaRuntimePropertiesKvPairs_DeltaRuntimePropertiesEntryFieldMaskSchema + ); +} + +const dependencyFieldMaskSchema: FieldMaskSchema = { + connection: { + wire: 'connection', + children: () => connectionDependencyFieldMaskSchema, + }, + credential: { + wire: 'credential', + children: () => credentialDependencyFieldMaskSchema, + }, + function: { + wire: 'function', + children: () => functionDependencyFieldMaskSchema, + }, + secret: {wire: 'secret', children: () => secretDependencyFieldMaskSchema}, + table: {wire: 'table', children: () => tableDependencyFieldMaskSchema}, + volume: {wire: 'volume', children: () => volumeDependencyFieldMaskSchema}, +}; + +export function dependencyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, dependencyFieldMaskSchema); +} + +const dependencyListFieldMaskSchema: FieldMaskSchema = { + dependencies: {wire: 'dependencies'}, +}; + +export function dependencyListFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, dependencyListFieldMaskSchema); +} + +const effectivePredictiveOptimizationFlagFieldMaskSchema: FieldMaskSchema = { + inheritedFromName: {wire: 'inherited_from_name'}, + inheritedFromType: {wire: 'inherited_from_type'}, + value: {wire: 'value'}, +}; + +export function effectivePredictiveOptimizationFlagFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + effectivePredictiveOptimizationFlagFieldMaskSchema + ); +} + +const encryptionDetailsFieldMaskSchema: FieldMaskSchema = { + sseEncryptionDetails: { + wire: 'sse_encryption_details', + children: () => sseEncryptionDetailsFieldMaskSchema, + }, +}; + +export function encryptionDetailsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + encryptionDetailsFieldMaskSchema + ); +} + +const foreignKeyConstraintFieldMaskSchema: FieldMaskSchema = { + childColumns: {wire: 'child_columns'}, + name: {wire: 'name'}, + parentColumns: {wire: 'parent_columns'}, + parentTable: {wire: 'parent_table'}, + rely: {wire: 'rely'}, +}; + +export function foreignKeyConstraintFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + foreignKeyConstraintFieldMaskSchema + ); +} + +const functionDependencyFieldMaskSchema: FieldMaskSchema = { + functionFullName: {wire: 'function_full_name'}, +}; + +export function functionDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + functionDependencyFieldMaskSchema + ); +} + +const getTableFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, + includeBrowse: {wire: 'include_browse'}, + includeDeltaMetadata: {wire: 'include_delta_metadata'}, + includeManifestCapabilities: {wire: 'include_manifest_capabilities'}, +}; + +export function getTableFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getTableFieldMaskSchema); +} + +const listTableSummariesFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, + includeManifestCapabilities: {wire: 'include_manifest_capabilities'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, + schemaNamePattern: {wire: 'schema_name_pattern'}, + tableNamePattern: {wire: 'table_name_pattern'}, +}; + +export function listTableSummariesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTableSummariesFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listTableSummaries_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + tables: {wire: 'tables'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listTableSummaries_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTableSummaries_ResponseFieldMaskSchema + ); +} + +const listTablesFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, + includeBrowse: {wire: 'include_browse'}, + includeManifestCapabilities: {wire: 'include_manifest_capabilities'}, + maxResults: {wire: 'max_results'}, + omitColumns: {wire: 'omit_columns'}, + omitProperties: {wire: 'omit_properties'}, + omitUsername: {wire: 'omit_username'}, + pageToken: {wire: 'page_token'}, + schemaName: {wire: 'schema_name'}, +}; + +export function listTablesFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, listTablesFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listTables_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + tables: {wire: 'tables'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listTables_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTables_ResponseFieldMaskSchema + ); +} + +const namedTableConstraintFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function namedTableConstraintFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + namedTableConstraintFieldMaskSchema + ); +} + +const optionSpecFieldMaskSchema: FieldMaskSchema = { + allowedValues: {wire: 'allowed_values'}, + conditionalDisplay: { + wire: 'conditional_display', + children: () => conditionalDisplayFieldMaskSchema, + }, + defaultValue: {wire: 'default_value'}, + description: {wire: 'description'}, + hint: {wire: 'hint'}, + isCopiable: {wire: 'is_copiable'}, + isCreatable: {wire: 'is_creatable'}, + isHidden: {wire: 'is_hidden'}, + isLoggable: {wire: 'is_loggable'}, + isRequired: {wire: 'is_required'}, + isSecret: {wire: 'is_secret'}, + isUpdatable: {wire: 'is_updatable'}, + name: {wire: 'name'}, + oauthStage: {wire: 'oauth_stage'}, + type: {wire: 'type'}, +}; + +export function optionSpecFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, optionSpecFieldMaskSchema); +} + +const policyFunctionArgumentFieldMaskSchema: FieldMaskSchema = { + column: {wire: 'column'}, + constant: {wire: 'constant'}, +}; + +export function policyFunctionArgumentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + policyFunctionArgumentFieldMaskSchema + ); +} + +const primaryKeyConstraintFieldMaskSchema: FieldMaskSchema = { + childColumns: {wire: 'child_columns'}, + name: {wire: 'name'}, + rely: {wire: 'rely'}, + timeseriesColumns: {wire: 'timeseries_columns'}, +}; + +export function primaryKeyConstraintFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + primaryKeyConstraintFieldMaskSchema + ); +} + +const rowFilterFieldMaskSchema: FieldMaskSchema = { + functionName: {wire: 'function_name'}, + inputArguments: {wire: 'input_arguments'}, + inputColumnNames: {wire: 'input_column_names'}, +}; + +export function rowFilterFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, rowFilterFieldMaskSchema); +} + +const secretDependencyFieldMaskSchema: FieldMaskSchema = { + secretFullName: {wire: 'secret_full_name'}, +}; + +export function secretDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + secretDependencyFieldMaskSchema + ); +} + +const securableKindManifestFieldMaskSchema: FieldMaskSchema = { + assignablePrivileges: {wire: 'assignable_privileges'}, + capabilities: {wire: 'capabilities'}, + options: {wire: 'options'}, + securableKind: {wire: 'securable_kind'}, + securableType: {wire: 'securable_type'}, +}; + +export function securableKindManifestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + securableKindManifestFieldMaskSchema + ); +} + +const sseEncryptionDetailsFieldMaskSchema: FieldMaskSchema = { + algorithm: {wire: 'algorithm'}, + awsKmsKeyArn: {wire: 'aws_kms_key_arn'}, +}; + +export function sseEncryptionDetailsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + sseEncryptionDetailsFieldMaskSchema + ); +} + +const tableConstraintFieldMaskSchema: FieldMaskSchema = { + foreignKeyConstraint: { + wire: 'foreign_key_constraint', + children: () => foreignKeyConstraintFieldMaskSchema, + }, + namedTableConstraint: { + wire: 'named_table_constraint', + children: () => namedTableConstraintFieldMaskSchema, + }, + primaryKeyConstraint: { + wire: 'primary_key_constraint', + children: () => primaryKeyConstraintFieldMaskSchema, + }, +}; + +export function tableConstraintFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + tableConstraintFieldMaskSchema + ); +} + +const tableDependencyFieldMaskSchema: FieldMaskSchema = { + tableFullName: {wire: 'table_full_name'}, +}; + +export function tableDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + tableDependencyFieldMaskSchema + ); +} + +const tableExistsFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, +}; + +export function tableExistsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, tableExistsFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const tableExists_ResponseFieldMaskSchema: FieldMaskSchema = { + tableExists: {wire: 'table_exists'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function tableExists_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + tableExists_ResponseFieldMaskSchema + ); +} + +const tableInfoFieldMaskSchema: FieldMaskSchema = { + accessPoint: {wire: 'access_point'}, + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + columns: {wire: 'columns'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + dataAccessConfigurationId: {wire: 'data_access_configuration_id'}, + dataSourceFormat: {wire: 'data_source_format'}, + deletedAt: {wire: 'deleted_at'}, + deltaRuntimePropertiesKvpairs: { + wire: 'delta_runtime_properties_kvpairs', + children: () => deltaRuntimePropertiesKvPairsFieldMaskSchema, + }, + effectivePredictiveOptimizationFlag: { + wire: 'effective_predictive_optimization_flag', + children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, + }, + enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, + encryptionDetails: { + wire: 'encryption_details', + children: () => encryptionDetailsFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + pipelineId: {wire: 'pipeline_id'}, + properties: {wire: 'properties'}, + rowFilter: {wire: 'row_filter', children: () => rowFilterFieldMaskSchema}, + schemaName: {wire: 'schema_name'}, + securableKindManifest: { + wire: 'securable_kind_manifest', + children: () => securableKindManifestFieldMaskSchema, + }, + sqlPath: {wire: 'sql_path'}, + storageCredentialName: {wire: 'storage_credential_name'}, + storageLocation: {wire: 'storage_location'}, + tableConstraints: {wire: 'table_constraints'}, + tableId: {wire: 'table_id'}, + tableType: {wire: 'table_type'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + viewDefinition: {wire: 'view_definition'}, + viewDependencies: { + wire: 'view_dependencies', + children: () => dependencyListFieldMaskSchema, + }, +}; + +export function tableInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, tableInfoFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const tableInfo_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function tableInfo_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + tableInfo_PropertiesEntryFieldMaskSchema + ); +} + +const tableSummaryFieldMaskSchema: FieldMaskSchema = { + fullName: {wire: 'full_name'}, + securableKindManifest: { + wire: 'securable_kind_manifest', + children: () => securableKindManifestFieldMaskSchema, + }, + tableType: {wire: 'table_type'}, +}; + +export function tableSummaryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, tableSummaryFieldMaskSchema); +} + +const updateTableFieldMaskSchema: FieldMaskSchema = { + accessPoint: {wire: 'access_point'}, + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + columns: {wire: 'columns'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + dataAccessConfigurationId: {wire: 'data_access_configuration_id'}, + dataSourceFormat: {wire: 'data_source_format'}, + deletedAt: {wire: 'deleted_at'}, + deltaRuntimePropertiesKvpairs: { + wire: 'delta_runtime_properties_kvpairs', + children: () => deltaRuntimePropertiesKvPairsFieldMaskSchema, + }, + effectivePredictiveOptimizationFlag: { + wire: 'effective_predictive_optimization_flag', + children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, + }, + enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, + encryptionDetails: { + wire: 'encryption_details', + children: () => encryptionDetailsFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + fullNameArg: {wire: 'full_name_arg'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + pipelineId: {wire: 'pipeline_id'}, + properties: {wire: 'properties'}, + rowFilter: {wire: 'row_filter', children: () => rowFilterFieldMaskSchema}, + schemaName: {wire: 'schema_name'}, + securableKindManifest: { + wire: 'securable_kind_manifest', + children: () => securableKindManifestFieldMaskSchema, + }, + sqlPath: {wire: 'sql_path'}, + storageCredentialName: {wire: 'storage_credential_name'}, + storageLocation: {wire: 'storage_location'}, + tableConstraints: {wire: 'table_constraints'}, + tableId: {wire: 'table_id'}, + tableType: {wire: 'table_type'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + viewDefinition: {wire: 'view_definition'}, + viewDependencies: { + wire: 'view_dependencies', + children: () => dependencyListFieldMaskSchema, + }, +}; + +export function updateTableFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, updateTableFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateTable_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateTable_PropertiesEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateTable_PropertiesEntryFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateTable_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateTable_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateTable_ResponseFieldMaskSchema + ); +} + +const volumeDependencyFieldMaskSchema: FieldMaskSchema = { + volumeFullName: {wire: 'volume_full_name'}, +}; + +export function volumeDependencyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + volumeDependencyFieldMaskSchema + ); +} diff --git a/packages/tagassignments/src/v1/model.ts b/packages/tagassignments/src/v1/model.ts index 2f36407c..a967bcd2 100644 --- a/packages/tagassignments/src/v1/model.ts +++ b/packages/tagassignments/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface CreateTagAssignmentRequest { @@ -109,3 +111,109 @@ export const marshalTagAssignmentSchema: z.ZodType = z tag_key: d.tagKey, tag_value: d.tagValue, })); + +const createTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { + tagAssignment: { + wire: 'tag_assignment', + children: () => tagAssignmentFieldMaskSchema, + }, +}; + +export function createTagAssignmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createTagAssignmentRequestFieldMaskSchema + ); +} + +const deleteTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { + entityId: {wire: 'entity_id'}, + entityType: {wire: 'entity_type'}, + tagKey: {wire: 'tag_key'}, +}; + +export function deleteTagAssignmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteTagAssignmentRequestFieldMaskSchema + ); +} + +const getTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { + entityId: {wire: 'entity_id'}, + entityType: {wire: 'entity_type'}, + tagKey: {wire: 'tag_key'}, +}; + +export function getTagAssignmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getTagAssignmentRequestFieldMaskSchema + ); +} + +const listTagAssignmentsRequestFieldMaskSchema: FieldMaskSchema = { + entityId: {wire: 'entity_id'}, + entityType: {wire: 'entity_type'}, + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listTagAssignmentsRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTagAssignmentsRequestFieldMaskSchema + ); +} + +const listTagAssignmentsResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + tagAssignments: {wire: 'tag_assignments'}, +}; + +export function listTagAssignmentsResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTagAssignmentsResponseFieldMaskSchema + ); +} + +const tagAssignmentFieldMaskSchema: FieldMaskSchema = { + entityId: {wire: 'entity_id'}, + entityType: {wire: 'entity_type'}, + tagKey: {wire: 'tag_key'}, + tagValue: {wire: 'tag_value'}, +}; + +export function tagAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, tagAssignmentFieldMaskSchema); +} + +const updateTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { + tagAssignment: { + wire: 'tag_assignment', + children: () => tagAssignmentFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateTagAssignmentRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateTagAssignmentRequestFieldMaskSchema + ); +} diff --git a/packages/tagpolicies/src/v1/model.ts b/packages/tagpolicies/src/v1/model.ts index c8a116ac..8400be3f 100644 --- a/packages/tagpolicies/src/v1/model.ts +++ b/packages/tagpolicies/src/v1/model.ts @@ -1,6 +1,8 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Policy that determines how to resolve conflicts when multiple upstream sources have different tag values. */ @@ -231,3 +233,156 @@ export const marshalValueSchema: z.ZodType = z .transform(d => ({ name: d.name, })); + +const conflictResolutionPolicyFieldMaskSchema: FieldMaskSchema = { + defaultValueOverride: { + wire: 'default_value_override', + children: () => defaultValueOverridePolicyFieldMaskSchema, + }, +}; + +export function conflictResolutionPolicyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + conflictResolutionPolicyFieldMaskSchema + ); +} + +const createTagPolicyRequestFieldMaskSchema: FieldMaskSchema = { + tagPolicy: {wire: 'tag_policy', children: () => tagPolicyFieldMaskSchema}, +}; + +export function createTagPolicyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createTagPolicyRequestFieldMaskSchema + ); +} + +const defaultValueOverridePolicyFieldMaskSchema: FieldMaskSchema = { + defaultValue: {wire: 'default_value'}, +}; + +export function defaultValueOverridePolicyFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + defaultValueOverridePolicyFieldMaskSchema + ); +} + +const deleteTagPolicyRequestFieldMaskSchema: FieldMaskSchema = { + tagKey: {wire: 'tag_key'}, +}; + +export function deleteTagPolicyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteTagPolicyRequestFieldMaskSchema + ); +} + +const getTagPolicyRequestFieldMaskSchema: FieldMaskSchema = { + tagKey: {wire: 'tag_key'}, +}; + +export function getTagPolicyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getTagPolicyRequestFieldMaskSchema + ); +} + +const listTagPoliciesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listTagPoliciesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTagPoliciesRequestFieldMaskSchema + ); +} + +const listTagPoliciesResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + tagPolicies: {wire: 'tag_policies'}, +}; + +export function listTagPoliciesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTagPoliciesResponseFieldMaskSchema + ); +} + +const propagationConfigFieldMaskSchema: FieldMaskSchema = { + conflictResolution: { + wire: 'conflict_resolution', + children: () => conflictResolutionPolicyFieldMaskSchema, + }, + enabled: {wire: 'enabled'}, +}; + +export function propagationConfigFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + propagationConfigFieldMaskSchema + ); +} + +const tagPolicyFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + createTime: {wire: 'create_time'}, + description: {wire: 'description'}, + id: {wire: 'id'}, + propagationConfig: { + wire: 'propagation_config', + children: () => propagationConfigFieldMaskSchema, + }, + tagKey: {wire: 'tag_key'}, + updateTime: {wire: 'update_time'}, + values: {wire: 'values'}, +}; + +export function tagPolicyFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, tagPolicyFieldMaskSchema); +} + +const updateTagPolicyRequestFieldMaskSchema: FieldMaskSchema = { + tagPolicy: {wire: 'tag_policy', children: () => tagPolicyFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateTagPolicyRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateTagPolicyRequestFieldMaskSchema + ); +} + +const valueFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function valueFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, valueFieldMaskSchema); +} diff --git a/packages/tokenmanagement/src/v1/model.ts b/packages/tokenmanagement/src/v1/model.ts index 9c6dd4ea..e97352d5 100644 --- a/packages/tokenmanagement/src/v1/model.ts +++ b/packages/tokenmanagement/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** @@ -296,3 +298,143 @@ export const marshalUpdateTokenSchema: z.ZodType = z token: d.token, update_mask: d.updateMask, })); + +const adminTokenInfoFieldMaskSchema: FieldMaskSchema = { + autoscopeState: {wire: 'autoscope_state'}, + comment: {wire: 'comment'}, + createdById: {wire: 'created_by_id'}, + createdByUsername: {wire: 'created_by_username'}, + creationTime: {wire: 'creation_time'}, + expiryTime: {wire: 'expiry_time'}, + lastUsedDay: {wire: 'last_used_day'}, + ownerId: {wire: 'owner_id'}, + scopes: {wire: 'scopes'}, + tokenId: {wire: 'token_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function adminTokenInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, adminTokenInfoFieldMaskSchema); +} + +const createOnBehalfOfTokenFieldMaskSchema: FieldMaskSchema = { + applicationId: {wire: 'application_id'}, + autoscopeEnabled: {wire: 'autoscope_enabled'}, + comment: {wire: 'comment'}, + lifetimeSeconds: {wire: 'lifetime_seconds'}, + scopes: {wire: 'scopes'}, +}; + +export function createOnBehalfOfTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createOnBehalfOfTokenFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createOnBehalfOfToken_ResponseFieldMaskSchema: FieldMaskSchema = { + tokenInfo: { + wire: 'token_info', + children: () => adminTokenInfoFieldMaskSchema, + }, + tokenValue: {wire: 'token_value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createOnBehalfOfToken_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createOnBehalfOfToken_ResponseFieldMaskSchema + ); +} + +const getTokenFieldMaskSchema: FieldMaskSchema = { + tokenId: {wire: 'token_id'}, +}; + +export function getTokenFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getTokenFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getToken_ResponseFieldMaskSchema: FieldMaskSchema = { + tokenInfo: { + wire: 'token_info', + children: () => adminTokenInfoFieldMaskSchema, + }, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getToken_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getToken_ResponseFieldMaskSchema + ); +} + +const listTokensFieldMaskSchema: FieldMaskSchema = { + createdById: {wire: 'created_by_id'}, + createdByUsername: {wire: 'created_by_username'}, +}; + +export function listTokensFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, listTokensFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listTokens_ResponseFieldMaskSchema: FieldMaskSchema = { + tokenInfos: {wire: 'token_infos'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listTokens_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTokens_ResponseFieldMaskSchema + ); +} + +const revokeTokenFieldMaskSchema: FieldMaskSchema = { + tokenId: {wire: 'token_id'}, +}; + +export function revokeTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, revokeTokenFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const revokeToken_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function revokeToken_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + revokeToken_ResponseFieldMaskSchema + ); +} + +const updateTokenFieldMaskSchema: FieldMaskSchema = { + token: {wire: 'token', children: () => adminTokenInfoFieldMaskSchema}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, updateTokenFieldMaskSchema); +} diff --git a/packages/tokens/src/v1/model.ts b/packages/tokens/src/v1/model.ts index f4f89c9b..76b39123 100644 --- a/packages/tokens/src/v1/model.ts +++ b/packages/tokens/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** @@ -264,3 +266,123 @@ export const marshalUpdateTokenSchema: z.ZodType = z })); export const marshalUpdateTokenResponseSchema: z.ZodType = z.object({}); + +const createTokenFieldMaskSchema: FieldMaskSchema = { + autoscopeEnabled: {wire: 'autoscope_enabled'}, + comment: {wire: 'comment'}, + lifetimeSeconds: {wire: 'lifetime_seconds'}, + scopes: {wire: 'scopes'}, +}; + +export function createTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createTokenFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createToken_ResponseFieldMaskSchema: FieldMaskSchema = { + tokenInfo: { + wire: 'token_info', + children: () => publicTokenInfoFieldMaskSchema, + }, + tokenValue: {wire: 'token_value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createToken_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createToken_ResponseFieldMaskSchema + ); +} + +const listTokensFieldMaskSchema: FieldMaskSchema = {}; + +export function listTokensFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, listTokensFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listTokens_ResponseFieldMaskSchema: FieldMaskSchema = { + tokenInfos: {wire: 'token_infos'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listTokens_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listTokens_ResponseFieldMaskSchema + ); +} + +const publicTokenInfoFieldMaskSchema: FieldMaskSchema = { + autoscopeState: {wire: 'autoscope_state'}, + backfillScopes: {wire: 'backfill_scopes'}, + comment: {wire: 'comment'}, + creationTime: {wire: 'creation_time'}, + expiryTime: {wire: 'expiry_time'}, + inferredScopes: {wire: 'inferred_scopes'}, + lastAccessedTime: {wire: 'last_accessed_time'}, + scopes: {wire: 'scopes'}, + tokenId: {wire: 'token_id'}, +}; + +export function publicTokenInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + publicTokenInfoFieldMaskSchema + ); +} + +const revokeTokenFieldMaskSchema: FieldMaskSchema = { + tokenId: {wire: 'token_id'}, +}; + +export function revokeTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, revokeTokenFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const revokeToken_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function revokeToken_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + revokeToken_ResponseFieldMaskSchema + ); +} + +const updateTokenFieldMaskSchema: FieldMaskSchema = { + token: {wire: 'token', children: () => publicTokenInfoFieldMaskSchema}, + tokenId: {wire: 'token_id'}, + updateMask: {wire: 'update_mask'}, +}; + +export function updateTokenFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, updateTokenFieldMaskSchema); +} + +const updateTokenResponseFieldMaskSchema: FieldMaskSchema = {}; + +export function updateTokenResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateTokenResponseFieldMaskSchema + ); +} diff --git a/packages/volumes/src/v1/model.ts b/packages/volumes/src/v1/model.ts index 0c2d579b..02f125b8 100644 --- a/packages/volumes/src/v1/model.ts +++ b/packages/volumes/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum SseEncryptionAlgorithm { @@ -520,3 +522,182 @@ export const marshalVolumeInfoSchema: z.ZodType = z encryption_details: d.encryptionDetails, browse_only: d.browseOnly, })); + +const createVolumeFieldMaskSchema: FieldMaskSchema = { + accessPoint: {wire: 'access_point'}, + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + encryptionDetails: { + wire: 'encryption_details', + children: () => encryptionDetailsFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + schemaName: {wire: 'schema_name'}, + storageLocation: {wire: 'storage_location'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + volumeId: {wire: 'volume_id'}, + volumeType: {wire: 'volume_type'}, +}; + +export function createVolumeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, createVolumeFieldMaskSchema); +} + +const deleteVolumeFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, +}; + +export function deleteVolumeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, deleteVolumeFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteVolume_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteVolume_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteVolume_ResponseFieldMaskSchema + ); +} + +const encryptionDetailsFieldMaskSchema: FieldMaskSchema = { + sseEncryptionDetails: { + wire: 'sse_encryption_details', + children: () => sseEncryptionDetailsFieldMaskSchema, + }, +}; + +export function encryptionDetailsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + encryptionDetailsFieldMaskSchema + ); +} + +const getVolumeFieldMaskSchema: FieldMaskSchema = { + fullNameArg: {wire: 'full_name_arg'}, + includeBrowse: {wire: 'include_browse'}, +}; + +export function getVolumeFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, getVolumeFieldMaskSchema); +} + +const listVolumesFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, + includeBrowse: {wire: 'include_browse'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, + schemaName: {wire: 'schema_name'}, +}; + +export function listVolumesFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, listVolumesFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listVolumes_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + volumes: {wire: 'volumes'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listVolumes_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listVolumes_ResponseFieldMaskSchema + ); +} + +const sseEncryptionDetailsFieldMaskSchema: FieldMaskSchema = { + algorithm: {wire: 'algorithm'}, + awsKmsKeyArn: {wire: 'aws_kms_key_arn'}, +}; + +export function sseEncryptionDetailsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + sseEncryptionDetailsFieldMaskSchema + ); +} + +const updateVolumeFieldMaskSchema: FieldMaskSchema = { + accessPoint: {wire: 'access_point'}, + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + encryptionDetails: { + wire: 'encryption_details', + children: () => encryptionDetailsFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + fullNameArg: {wire: 'full_name_arg'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + newName: {wire: 'new_name'}, + owner: {wire: 'owner'}, + schemaName: {wire: 'schema_name'}, + storageLocation: {wire: 'storage_location'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + volumeId: {wire: 'volume_id'}, + volumeType: {wire: 'volume_type'}, +}; + +export function updateVolumeFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, updateVolumeFieldMaskSchema); +} + +const volumeInfoFieldMaskSchema: FieldMaskSchema = { + accessPoint: {wire: 'access_point'}, + browseOnly: {wire: 'browse_only'}, + catalogName: {wire: 'catalog_name'}, + comment: {wire: 'comment'}, + createdAt: {wire: 'created_at'}, + createdBy: {wire: 'created_by'}, + encryptionDetails: { + wire: 'encryption_details', + children: () => encryptionDetailsFieldMaskSchema, + }, + fullName: {wire: 'full_name'}, + metastoreId: {wire: 'metastore_id'}, + name: {wire: 'name'}, + owner: {wire: 'owner'}, + schemaName: {wire: 'schema_name'}, + storageLocation: {wire: 'storage_location'}, + updatedAt: {wire: 'updated_at'}, + updatedBy: {wire: 'updated_by'}, + volumeId: {wire: 'volume_id'}, + volumeType: {wire: 'volume_type'}, +}; + +export function volumeInfoFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, volumeInfoFieldMaskSchema); +} diff --git a/packages/warehouses/src/v1/model.ts b/packages/warehouses/src/v1/model.ts index ec66dbd5..319656a1 100644 --- a/packages/warehouses/src/v1/model.ts +++ b/packages/warehouses/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ChannelName { @@ -2348,3 +2350,587 @@ export const marshalStopRequestSchema: z.ZodType = z // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const marshalStopRequest_ResponseSchema: z.ZodType = z.object({}); + +const channelFieldMaskSchema: FieldMaskSchema = { + dbsqlVersion: {wire: 'dbsql_version'}, + name: {wire: 'name'}, +}; + +export function channelFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, channelFieldMaskSchema); +} + +const createDefaultWarehouseOverrideRequestFieldMaskSchema: FieldMaskSchema = { + defaultWarehouseOverride: { + wire: 'default_warehouse_override', + children: () => defaultWarehouseOverrideFieldMaskSchema, + }, + defaultWarehouseOverrideId: {wire: 'default_warehouse_override_id'}, +}; + +export function createDefaultWarehouseOverrideRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createDefaultWarehouseOverrideRequestFieldMaskSchema + ); +} + +const createWarehouseFieldMaskSchema: FieldMaskSchema = { + autoStopMins: {wire: 'auto_stop_mins'}, + channel: {wire: 'channel', children: () => channelFieldMaskSchema}, + clusterSize: {wire: 'cluster_size'}, + creatorName: {wire: 'creator_name'}, + enablePhoton: {wire: 'enable_photon'}, + enableServerlessCompute: {wire: 'enable_serverless_compute'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + maxNumClusters: {wire: 'max_num_clusters'}, + minNumClusters: {wire: 'min_num_clusters'}, + name: {wire: 'name'}, + spotInstancePolicy: {wire: 'spot_instance_policy'}, + tags: {wire: 'tags', children: () => endpointTagsFieldMaskSchema}, + warehouseType: {wire: 'warehouse_type'}, +}; + +export function createWarehouseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createWarehouseFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const createWarehouse_ResponseFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function createWarehouse_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + createWarehouse_ResponseFieldMaskSchema + ); +} + +const defaultWarehouseOverrideFieldMaskSchema: FieldMaskSchema = { + defaultWarehouseOverrideId: {wire: 'default_warehouse_override_id'}, + name: {wire: 'name'}, + type: {wire: 'type'}, + warehouseId: {wire: 'warehouse_id'}, +}; + +export function defaultWarehouseOverrideFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + defaultWarehouseOverrideFieldMaskSchema + ); +} + +const deleteDefaultWarehouseOverrideRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function deleteDefaultWarehouseOverrideRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteDefaultWarehouseOverrideRequestFieldMaskSchema + ); +} + +const editWarehouseRequestFieldMaskSchema: FieldMaskSchema = { + autoStopMins: {wire: 'auto_stop_mins'}, + channel: {wire: 'channel', children: () => channelFieldMaskSchema}, + clusterSize: {wire: 'cluster_size'}, + creatorName: {wire: 'creator_name'}, + enablePhoton: {wire: 'enable_photon'}, + enableServerlessCompute: {wire: 'enable_serverless_compute'}, + id: {wire: 'id'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + maxNumClusters: {wire: 'max_num_clusters'}, + minNumClusters: {wire: 'min_num_clusters'}, + name: {wire: 'name'}, + spotInstancePolicy: {wire: 'spot_instance_policy'}, + tags: {wire: 'tags', children: () => endpointTagsFieldMaskSchema}, + warehouseType: {wire: 'warehouse_type'}, +}; + +export function editWarehouseRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + editWarehouseRequestFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const editWarehouseRequest_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function editWarehouseRequest_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + editWarehouseRequest_ResponseFieldMaskSchema + ); +} + +const endpointConfPairFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +export function endpointConfPairFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + endpointConfPairFieldMaskSchema + ); +} + +const endpointHealthFieldMaskSchema: FieldMaskSchema = { + details: {wire: 'details'}, + failureReason: { + wire: 'failure_reason', + children: () => terminationReasonFieldMaskSchema, + }, + message: {wire: 'message'}, + status: {wire: 'status'}, + summary: {wire: 'summary'}, +}; + +export function endpointHealthFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, endpointHealthFieldMaskSchema); +} + +const endpointInfoFieldMaskSchema: FieldMaskSchema = { + autoStopMins: {wire: 'auto_stop_mins'}, + channel: {wire: 'channel', children: () => channelFieldMaskSchema}, + clusterSize: {wire: 'cluster_size'}, + creatorName: {wire: 'creator_name'}, + enablePhoton: {wire: 'enable_photon'}, + enableServerlessCompute: {wire: 'enable_serverless_compute'}, + health: {wire: 'health', children: () => endpointHealthFieldMaskSchema}, + id: {wire: 'id'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + jdbcUrl: {wire: 'jdbc_url'}, + maxNumClusters: {wire: 'max_num_clusters'}, + minNumClusters: {wire: 'min_num_clusters'}, + name: {wire: 'name'}, + numActiveSessions: {wire: 'num_active_sessions'}, + numClusters: {wire: 'num_clusters'}, + odbcParams: {wire: 'odbc_params', children: () => odbcParamsFieldMaskSchema}, + spotInstancePolicy: {wire: 'spot_instance_policy'}, + state: {wire: 'state'}, + tags: {wire: 'tags', children: () => endpointTagsFieldMaskSchema}, + warehouseType: {wire: 'warehouse_type'}, +}; + +export function endpointInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, endpointInfoFieldMaskSchema); +} + +const endpointTagPairFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +export function endpointTagPairFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + endpointTagPairFieldMaskSchema + ); +} + +const endpointTagsFieldMaskSchema: FieldMaskSchema = { + customTags: {wire: 'custom_tags'}, +}; + +export function endpointTagsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, endpointTagsFieldMaskSchema); +} + +const getDefaultWarehouseOverrideRequestFieldMaskSchema: FieldMaskSchema = { + name: {wire: 'name'}, +}; + +export function getDefaultWarehouseOverrideRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getDefaultWarehouseOverrideRequestFieldMaskSchema + ); +} + +const getWarehouseFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function getWarehouseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, getWarehouseFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getWarehouse_ResponseFieldMaskSchema: FieldMaskSchema = { + autoStopMins: {wire: 'auto_stop_mins'}, + channel: {wire: 'channel', children: () => channelFieldMaskSchema}, + clusterSize: {wire: 'cluster_size'}, + creatorName: {wire: 'creator_name'}, + enablePhoton: {wire: 'enable_photon'}, + enableServerlessCompute: {wire: 'enable_serverless_compute'}, + health: {wire: 'health', children: () => endpointHealthFieldMaskSchema}, + id: {wire: 'id'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + jdbcUrl: {wire: 'jdbc_url'}, + maxNumClusters: {wire: 'max_num_clusters'}, + minNumClusters: {wire: 'min_num_clusters'}, + name: {wire: 'name'}, + numActiveSessions: {wire: 'num_active_sessions'}, + numClusters: {wire: 'num_clusters'}, + odbcParams: {wire: 'odbc_params', children: () => odbcParamsFieldMaskSchema}, + spotInstancePolicy: {wire: 'spot_instance_policy'}, + state: {wire: 'state'}, + tags: {wire: 'tags', children: () => endpointTagsFieldMaskSchema}, + warehouseType: {wire: 'warehouse_type'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getWarehouse_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWarehouse_ResponseFieldMaskSchema + ); +} + +const getWorkspaceWarehouseConfigRequestFieldMaskSchema: FieldMaskSchema = {}; + +export function getWorkspaceWarehouseConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceWarehouseConfigRequestFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getWorkspaceWarehouseConfigRequest_ResponseFieldMaskSchema: FieldMaskSchema = + { + channel: {wire: 'channel', children: () => channelFieldMaskSchema}, + configParam: { + wire: 'config_param', + children: () => repeatedEndpointConfPairsFieldMaskSchema, + }, + dataAccessConfig: {wire: 'data_access_config'}, + enableServerlessCompute: {wire: 'enable_serverless_compute'}, + enabledWarehouseTypes: {wire: 'enabled_warehouse_types'}, + globalParam: { + wire: 'global_param', + children: () => repeatedEndpointConfPairsFieldMaskSchema, + }, + googleServiceAccount: {wire: 'google_service_account'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + securityPolicy: {wire: 'security_policy'}, + sqlConfigurationParameters: { + wire: 'sql_configuration_parameters', + children: () => repeatedEndpointConfPairsFieldMaskSchema, + }, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getWorkspaceWarehouseConfigRequest_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceWarehouseConfigRequest_ResponseFieldMaskSchema + ); +} + +const listDefaultWarehouseOverridesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, +}; + +export function listDefaultWarehouseOverridesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listDefaultWarehouseOverridesRequestFieldMaskSchema + ); +} + +const listDefaultWarehouseOverridesResponseFieldMaskSchema: FieldMaskSchema = { + defaultWarehouseOverrides: {wire: 'default_warehouse_overrides'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +export function listDefaultWarehouseOverridesResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listDefaultWarehouseOverridesResponseFieldMaskSchema + ); +} + +const odbcParamsFieldMaskSchema: FieldMaskSchema = { + hostname: {wire: 'hostname'}, + path: {wire: 'path'}, + port: {wire: 'port'}, + protocol: {wire: 'protocol'}, +}; + +export function odbcParamsFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, odbcParamsFieldMaskSchema); +} + +const repeatedEndpointConfPairsFieldMaskSchema: FieldMaskSchema = { + configPair: {wire: 'config_pair'}, + configurationPairs: {wire: 'configuration_pairs'}, +}; + +export function repeatedEndpointConfPairsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + repeatedEndpointConfPairsFieldMaskSchema + ); +} + +const setWorkspaceWarehouseConfigRequestFieldMaskSchema: FieldMaskSchema = { + channel: {wire: 'channel', children: () => channelFieldMaskSchema}, + configParam: { + wire: 'config_param', + children: () => repeatedEndpointConfPairsFieldMaskSchema, + }, + dataAccessConfig: {wire: 'data_access_config'}, + enableServerlessCompute: {wire: 'enable_serverless_compute'}, + enabledWarehouseTypes: {wire: 'enabled_warehouse_types'}, + globalParam: { + wire: 'global_param', + children: () => repeatedEndpointConfPairsFieldMaskSchema, + }, + googleServiceAccount: {wire: 'google_service_account'}, + instanceProfileArn: {wire: 'instance_profile_arn'}, + securityPolicy: {wire: 'security_policy'}, + sqlConfigurationParameters: { + wire: 'sql_configuration_parameters', + children: () => repeatedEndpointConfPairsFieldMaskSchema, + }, +}; + +export function setWorkspaceWarehouseConfigRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + setWorkspaceWarehouseConfigRequestFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const setWorkspaceWarehouseConfigRequest_ResponseFieldMaskSchema: FieldMaskSchema = + {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function setWorkspaceWarehouseConfigRequest_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + setWorkspaceWarehouseConfigRequest_ResponseFieldMaskSchema + ); +} + +const terminationReasonFieldMaskSchema: FieldMaskSchema = { + code: {wire: 'code'}, + parameters: {wire: 'parameters'}, + type: {wire: 'type'}, +}; + +export function terminationReasonFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + terminationReasonFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const terminationReason_ParametersEntryFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function terminationReason_ParametersEntryFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + terminationReason_ParametersEntryFieldMaskSchema + ); +} + +const updateDefaultWarehouseOverrideRequestFieldMaskSchema: FieldMaskSchema = { + allowMissing: {wire: 'allow_missing'}, + defaultWarehouseOverride: { + wire: 'default_warehouse_override', + children: () => defaultWarehouseOverrideFieldMaskSchema, + }, + updateMask: {wire: 'update_mask'}, +}; + +export function updateDefaultWarehouseOverrideRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateDefaultWarehouseOverrideRequestFieldMaskSchema + ); +} + +const warehouseTypePairFieldMaskSchema: FieldMaskSchema = { + enabled: {wire: 'enabled'}, + warehouseType: {wire: 'warehouse_type'}, +}; + +export function warehouseTypePairFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + warehouseTypePairFieldMaskSchema + ); +} + +const deleteWarehouseRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function deleteWarehouseRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteWarehouseRequestFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteWarehouseRequest_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteWarehouseRequest_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteWarehouseRequest_ResponseFieldMaskSchema + ); +} + +const listWarehousesRequestFieldMaskSchema: FieldMaskSchema = { + pageSize: {wire: 'page_size'}, + pageToken: {wire: 'page_token'}, + runAsUserId: {wire: 'run_as_user_id'}, +}; + +export function listWarehousesRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWarehousesRequestFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listWarehousesRequest_ResponseFieldMaskSchema: FieldMaskSchema = { + nextPageToken: {wire: 'next_page_token'}, + warehouses: {wire: 'warehouses'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listWarehousesRequest_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWarehousesRequest_ResponseFieldMaskSchema + ); +} + +const startRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function startRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, startRequestFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const startRequest_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function startRequest_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + startRequest_ResponseFieldMaskSchema + ); +} + +const stopRequestFieldMaskSchema: FieldMaskSchema = { + id: {wire: 'id'}, +}; + +export function stopRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, stopRequestFieldMaskSchema); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const stopRequest_ResponseFieldMaskSchema: FieldMaskSchema = {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function stopRequest_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + stopRequest_ResponseFieldMaskSchema + ); +} diff --git a/packages/workspaceassignment/src/v1/model.ts b/packages/workspaceassignment/src/v1/model.ts index 6ec49387..87816448 100644 --- a/packages/workspaceassignment/src/v1/model.ts +++ b/packages/workspaceassignment/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum Permission { @@ -278,3 +280,161 @@ export const marshalWorkspacePermissionAssignmentOutputSchema: z.ZodType = z permissions: d.permissions, error: d.error, })); + +const deleteWorkspacePermissionAssignmentFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + principalId: {wire: 'principal_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function deleteWorkspacePermissionAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteWorkspacePermissionAssignmentFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const deleteWorkspacePermissionAssignment_ResponseFieldMaskSchema: FieldMaskSchema = + {}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function deleteWorkspacePermissionAssignment_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + deleteWorkspacePermissionAssignment_ResponseFieldMaskSchema + ); +} + +const getWorkspacePermissionAssignmentsFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + filter: {wire: 'filter'}, + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function getWorkspacePermissionAssignmentsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspacePermissionAssignmentsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getWorkspacePermissionAssignments_ResponseFieldMaskSchema: FieldMaskSchema = + { + nextPageToken: {wire: 'next_page_token'}, + permissionAssignments: {wire: 'permission_assignments'}, + prevPageToken: {wire: 'prev_page_token'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getWorkspacePermissionAssignments_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspacePermissionAssignments_ResponseFieldMaskSchema + ); +} + +const listWorkspacePermissionsFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function listWorkspacePermissionsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspacePermissionsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const listWorkspacePermissions_ResponseFieldMaskSchema: FieldMaskSchema = { + permissions: {wire: 'permissions'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function listWorkspacePermissions_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + listWorkspacePermissions_ResponseFieldMaskSchema + ); +} + +const permissionOutputFieldMaskSchema: FieldMaskSchema = { + description: {wire: 'description'}, + permissionLevel: {wire: 'permission_level'}, +}; + +export function permissionOutputFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + permissionOutputFieldMaskSchema + ); +} + +const principalOutputFieldMaskSchema: FieldMaskSchema = { + displayName: {wire: 'display_name'}, + groupName: {wire: 'group_name'}, + principalId: {wire: 'principal_id'}, + servicePrincipalName: {wire: 'service_principal_name'}, + userName: {wire: 'user_name'}, +}; + +export function principalOutputFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + principalOutputFieldMaskSchema + ); +} + +const updateWorkspacePermissionAssignmentFieldMaskSchema: FieldMaskSchema = { + accountId: {wire: 'account_id'}, + permissions: {wire: 'permissions'}, + principalId: {wire: 'principal_id'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function updateWorkspacePermissionAssignmentFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateWorkspacePermissionAssignmentFieldMaskSchema + ); +} + +const workspacePermissionAssignmentOutputFieldMaskSchema: FieldMaskSchema = { + error: {wire: 'error'}, + permissions: {wire: 'permissions'}, + principal: { + wire: 'principal', + children: () => principalOutputFieldMaskSchema, + }, +}; + +export function workspacePermissionAssignmentOutputFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + workspacePermissionAssignmentOutputFieldMaskSchema + ); +} diff --git a/packages/workspacebindings/src/v1/model.ts b/packages/workspacebindings/src/v1/model.ts index 102952c3..886d0a87 100644 --- a/packages/workspacebindings/src/v1/model.ts +++ b/packages/workspacebindings/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Using `BINDING_TYPE_` prefix here to avoid conflict with `TableOperation` enum in `credentials_common.proto`. */ @@ -258,3 +260,139 @@ export const marshalWorkspaceBindingInfoSchema: z.ZodType = z workspace_id: d.workspaceId, binding_type: d.bindingType, })); + +const getCatalogWorkspaceBindingsFieldMaskSchema: FieldMaskSchema = { + catalogName: {wire: 'catalog_name'}, +}; + +export function getCatalogWorkspaceBindingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getCatalogWorkspaceBindingsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getCatalogWorkspaceBindings_ResponseFieldMaskSchema: FieldMaskSchema = { + workspaces: {wire: 'workspaces'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getCatalogWorkspaceBindings_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getCatalogWorkspaceBindings_ResponseFieldMaskSchema + ); +} + +const getWorkspaceBindingsFieldMaskSchema: FieldMaskSchema = { + maxResults: {wire: 'max_results'}, + pageToken: {wire: 'page_token'}, + securableFullName: {wire: 'securable_full_name'}, + securableType: {wire: 'securable_type'}, +}; + +export function getWorkspaceBindingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceBindingsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const getWorkspaceBindings_ResponseFieldMaskSchema: FieldMaskSchema = { + bindings: {wire: 'bindings'}, + nextPageToken: {wire: 'next_page_token'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function getWorkspaceBindings_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceBindings_ResponseFieldMaskSchema + ); +} + +const updateCatalogWorkspaceBindingsFieldMaskSchema: FieldMaskSchema = { + assignWorkspaces: {wire: 'assign_workspaces'}, + catalogName: {wire: 'catalog_name'}, + unassignWorkspaces: {wire: 'unassign_workspaces'}, +}; + +export function updateCatalogWorkspaceBindingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateCatalogWorkspaceBindingsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateCatalogWorkspaceBindings_ResponseFieldMaskSchema: FieldMaskSchema = + { + workspaces: {wire: 'workspaces'}, + }; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateCatalogWorkspaceBindings_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateCatalogWorkspaceBindings_ResponseFieldMaskSchema + ); +} + +const updateWorkspaceBindingsFieldMaskSchema: FieldMaskSchema = { + add: {wire: 'add'}, + remove: {wire: 'remove'}, + securableFullName: {wire: 'securable_full_name'}, + securableType: {wire: 'securable_type'}, +}; + +export function updateWorkspaceBindingsFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateWorkspaceBindingsFieldMaskSchema + ); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const updateWorkspaceBindings_ResponseFieldMaskSchema: FieldMaskSchema = { + bindings: {wire: 'bindings'}, +}; + +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export function updateWorkspaceBindings_ResponseFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + updateWorkspaceBindings_ResponseFieldMaskSchema + ); +} + +const workspaceBindingInfoFieldMaskSchema: FieldMaskSchema = { + bindingType: {wire: 'binding_type'}, + workspaceId: {wire: 'workspace_id'}, +}; + +export function workspaceBindingInfoFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + workspaceBindingInfoFieldMaskSchema + ); +} diff --git a/packages/workspaceconf/src/v1/model.ts b/packages/workspaceconf/src/v1/model.ts index 57664973..bc6c8ded 100644 --- a/packages/workspaceconf/src/v1/model.ts +++ b/packages/workspaceconf/src/v1/model.ts @@ -1,5 +1,7 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. +import {FieldMask} from '@databricks/sdk-core/wkt'; +import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface GetWorkspaceConfRequest { @@ -30,3 +32,27 @@ export const marshalWorkspaceConfSchema: z.ZodType = z key: d.key, value: d.value, })); + +const getWorkspaceConfRequestFieldMaskSchema: FieldMaskSchema = { + keys: {wire: 'keys'}, +}; + +export function getWorkspaceConfRequestFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build( + paths, + getWorkspaceConfRequestFieldMaskSchema + ); +} + +const workspaceConfFieldMaskSchema: FieldMaskSchema = { + key: {wire: 'key'}, + value: {wire: 'value'}, +}; + +export function workspaceConfFieldMask( + ...paths: string[] +): FieldMask { + return FieldMask.build(paths, workspaceConfFieldMaskSchema); +} From 7b206bc649bc57d0915f922997954ce0323ff8ef Mon Sep 17 00:00:00 2001 From: Parth Bansal Date: Wed, 22 Apr 2026 13:24:48 +0000 Subject: [PATCH 3/4] update --- .github/workflows/tagging.yml | 23 +++---- README.md | 117 ++++++++++++++++++++++++++++++++++ tagging.py | 25 +++++++- 3 files changed, 150 insertions(+), 15 deletions(-) diff --git a/.github/workflows/tagging.yml b/.github/workflows/tagging.yml index 4e4a9a52..e22f794e 100755 --- a/.github/workflows/tagging.yml +++ b/.github/workflows/tagging.yml @@ -4,12 +4,7 @@ name: tagging on: # Manual dispatch. workflow_dispatch: - inputs: - package: - description: 'Package to tag (leave empty to tag all packages with pending releases).' - required: false - type: string - default: '' + # No inputs are required for the manual dispatch. # NOTE: Temporarily disable automated releases. # @@ -66,10 +61,12 @@ jobs: env: GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} GITHUB_REPOSITORY: ${{ github.repository }} - PACKAGE: ${{ inputs.package }} - run: | - if [ -n "$PACKAGE" ]; then - uv run --locked tagging.py --package "$PACKAGE" - else - uv run --locked tagging.py - fi + run: uv run --locked tagging.py + + - name: Upload created tags artifact + if: always() + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + with: + name: created-tags + path: created_tags.json + if-no-files-found: ignore diff --git a/README.md b/README.md index ffbaa11d..2434cba8 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,120 @@ > - **Breaking changes may occur at any time** > - **APIs are experimental and unstable** > - **Use for development and testing only** + +## Design Notes + +### FieldMask — Deferred Ergonomics Decisions + +The current `FieldMask` implementation validates paths against a per-message +schema inside `FieldMask.build`, throws on mismatch, and stores the +wire-format paths privately so `toString()` produces the server-facing +comma-separated string. Construction entry point today is a **per-message +factory function** generated alongside each message — e.g. +`alertFieldMask('displayName', 'condition.op')` — which supplies the schema +and message name and delegates to `FieldMask.build`. This section records +two refinements we've discussed but deferred; they do not change the +validation semantics, only the call-site shape. + +#### Q1 — Call-site ergonomics + +**Current (Option C, per-message factory):** + +```ts +import {alertFieldMask} from '@databricks/sdk-alerts/v1'; +const mask = alertFieldMask('displayName', 'condition.op'); +``` + +- Pros: best discoverability (auto-complete on import), single-argument call, + error messages name the target message, and users never think about + schemas or message names. +- Cons: one generated factory per message (~60+ across the SDK). Each is a + thin one-liner, but they multiply with every new message. + +**Option A — raw `FieldMask.build` at the call site:** + +```ts +import {FieldMask} from '@databricks/sdk-core/wkt'; +import {Alert, alertFieldMaskSchema} from '@databricks/sdk-alerts/v1'; + +const mask = FieldMask.build( + ['displayName', 'condition.op'], + alertFieldMaskSchema, +); +``` + +- Pros: zero helper functions anywhere. Only `FieldMask.build` exists. +- Cons: two-argument low-level call at every usage site. Users must + import the schema explicitly and know which schema pairs with which + type. + +**Option B — one generic helper in `sdk-core`:** + +```ts +import {fieldMask} from '@databricks/sdk-core/wkt'; +import {Alert} from '@databricks/sdk-alerts/v1'; + +const mask = fieldMask(Alert, 'displayName', 'condition.op'); +``` + +- Pros: a single `fieldMask(...)` replaces the ~60+ per-message factories. + `Alert` supplies both the schema and the message name as properties on + itself, so the call site stays one argument plus paths. +- Cons: requires `Alert` the import to be **both** a TypeScript type and a + runtime descriptor value on the same name. See Q2 below. + +#### Q2 — Interface + const declaration merging on the message name + +A TypeScript pattern that lets one exported identifier occupy both the +type-space and the value-space: + +```ts +// Type — describes instance shape. Zero runtime cost. +export interface Alert { + displayName?: string; + condition?: Condition; +} + +// Runtime value — carries the schema under the same name. +export const Alert: MessageDescriptor = { + fieldMaskSchema: { + displayName: {wire: 'display_name'}, + condition: {wire: 'condition', children: () => Condition.fieldMaskSchema}, + }, +}; +``` + +Usage after this change: + +```ts +const a: Alert = {displayName: 'foo'}; // Alert as a type (literal shape) +const s = Alert.fieldMaskSchema; // Alert as a value (runtime) +const mask = fieldMask(Alert, 'displayName'); // Option B unblocked +``` + +TypeScript supports this via +[declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html). +`interface X` occupies type-space, `const X` occupies value-space; they do +not collide. The same pattern shows up in `lib.dom.d.ts`, `Promise`, and +various DI libraries. + +- Pros: single import, natural `Alert.fieldMaskSchema` access, enables + Option B without asking users to remember a separate `AlertSchema` name. +- Cons: the pattern is less common in everyday TS and can surprise readers + who expect classes for anything with static-like members. The alternative + is to use a distinct name — e.g. `AlertSchema` or `AlertDescriptor` — for + the runtime value, at the cost of one extra identifier to learn per + message. + +#### Why we haven't landed Q1/Q2 yet + +Both are call-site ergonomics refactors; neither changes the validation +semantics or the per-message schema generation. We want the current +`FieldMask.build` path (validate, translate, store wire paths privately, +`toString()` joins) to settle before adjusting the call-site shape, so +the two axes of change don't churn simultaneously. When we revisit, the +likely landing is **Option B + Option Q2** together — one generic +`fieldMask()` plus the interface+const merge, which most closely matches +what similar TypeScript validation libraries (Zod, Valibot, TypeBox, etc.) +expose while staying consistent with the SDK's existing interface-first +convention for message types. diff --git a/tagging.py b/tagging.py index 56e57781..79f2894c 100755 --- a/tagging.py +++ b/tagging.py @@ -18,6 +18,7 @@ CHANGELOG_FILE_NAME = "CHANGELOG.md" PACKAGE_FILE_NAME = ".package.json" CODEGEN_FILE_NAME = ".codegen.json" +CREATED_TAGS_FILE_NAME = "created_tags.json" """ This script tags the release of the SDKs using a combination of the GitHub API and Git commands. It reads the local repository to determine necessary changes, updates changelogs, and creates tags. @@ -467,9 +468,29 @@ def update_changelogs(packages: List[Package]) -> List[TagInfo]: def push_tags(tag_infos: List[TagInfo]) -> None: """ Creates and pushes tags to the repository. + + As a side effect, writes the names of successfully created tags to + ``./created_tags.json`` so that workflows triggering this script can + discover what was produced (the GitHub Actions workflow uploads this + file as the ``created-tags`` artifact). + + Schema: + {"tags": ["service-a/v1.2.3", "service-b/v0.4.0"]} + + The manifest is written even if tag creation fails partway through: + tags that succeeded before the failure are flushed before the + exception is re-raised, so recovery-mode runs still surface their + output. """ - for tag_info in tag_infos: - gh.tag(tag_info.tag_name(), tag_info.content) + created: List[str] = [] + try: + for tag_info in tag_infos: + gh.tag(tag_info.tag_name(), tag_info.content) + created.append(tag_info.tag_name()) + finally: + manifest_path = os.path.join(os.getcwd(), CREATED_TAGS_FILE_NAME) + with open(manifest_path, "w") as f: + json.dump({"tags": created}, f) def run_command(command: List[str]) -> str: From 505e35a0ca26da5a43533713af0f087de5459c48 Mon Sep 17 00:00:00 2001 From: Parth Bansal Date: Wed, 22 Apr 2026 16:29:18 +0000 Subject: [PATCH 4/4] update --- packages/abacpolicies/src/v1/client.ts | 2 +- packages/abacpolicies/src/v1/model.ts | 105 +- packages/accountaccesscontrol/src/v1/model.ts | 158 -- .../accountaccesscontrolproxy/src/v1/model.ts | 158 -- packages/alerts/src/v1/model.ts | 401 +--- packages/alerts/src/v2/client.ts | 2 +- packages/alerts/src/v2/model.ts | 102 +- packages/artifactallowlists/src/v1/model.ts | 97 - .../billableusagedownload/src/v1/model.ts | 39 - packages/catalogs/src/v1/model.ts | 609 ----- packages/clusterpolicies/src/v2/model.ts | 289 --- packages/connections/src/v1/model.ts | 518 ----- packages/credentials/src/v1/model.ts | 1700 +------------- packages/dataclassification/src/v1/client.ts | 2 +- packages/dataclassification/src/v1/model.ts | 62 +- packages/dataquality/src/v1/client.ts | 4 +- packages/dataquality/src/v1/model.ts | 248 +- .../entitytagassignments/src/v1/client.ts | 2 +- packages/entitytagassignments/src/v1/model.ts | 109 +- packages/environments/src/v1/client.ts | 2 +- packages/environments/src/v1/model.ts | 285 +-- packages/externallocations/src/v1/model.ts | 477 ---- packages/features/src/v1/client.ts | 6 +- packages/features/src/v1/model.ts | 369 +-- packages/featurestore/src/v1/client.ts | 2 +- packages/featurestore/src/v1/model.ts | 188 +- packages/files/src/v2/model.ts | 386 ---- packages/functions/src/v1/model.ts | 610 ----- packages/genie/src/v1/model.ts | 2036 +---------------- packages/globalinitscripts/src/v2/model.ts | 238 -- packages/grants/src/v1/model.ts | 346 --- packages/iam/src/v2/client.ts | 18 +- packages/iam/src/v2/model.ts | 1494 +----------- packages/instancepools/src/v2/model.ts | 822 ------- packages/instanceprofiles/src/v2/model.ts | 199 -- .../materializedfeatures/src/v1/client.ts | 2 +- packages/materializedfeatures/src/v1/model.ts | 223 +- packages/metastores/src/v1/model.ts | 579 ----- .../notificationdestinations/src/v1/model.ts | 289 --- .../oauthcustomappintegration/src/v1/model.ts | 551 ----- packages/oauthpublishedapp/src/v1/model.ts | 83 - packages/permissions/src/v1/model.ts | 255 --- packages/policyfamilies/src/v2/model.ts | 84 - packages/postgres/src/v1/client.ts | 10 +- packages/postgres/src/v1/model.ts | 1771 +------------- packages/qualitymonitor/src/v2/model.ts | 274 --- packages/qualitymonitors/src/v1/model.ts | 623 ----- packages/queries/src/v1/model.ts | 499 +--- packages/queryhistory/src/v1/model.ts | 467 ---- packages/registeredmodels/src/v1/model.ts | 746 ------ packages/resourcequotas/src/v1/model.ts | 103 - packages/rfa/src/v1/client.ts | 2 +- packages/rfa/src/v1/model.ts | 170 +- packages/schemas/src/v1/model.ts | 427 ---- packages/sdk/src/model.ts | 200 -- packages/secrets/src/v1/model.ts | 467 ---- .../serviceprincipalsecrets/src/v1/model.ts | 195 -- .../src/v1/model.ts | 195 -- packages/settings/src/v2/model.ts | 534 ----- packages/statementexecution/src/v1/model.ts | 462 +--- packages/systemschemas/src/v1/model.ts | 144 -- packages/tables/src/v1/model.ts | 1098 --------- packages/tagassignments/src/v1/client.ts | 2 +- packages/tagassignments/src/v1/model.ts | 107 +- packages/tagpolicies/src/v1/client.ts | 2 +- packages/tagpolicies/src/v1/model.ts | 93 +- packages/tokenmanagement/src/v1/model.ts | 186 +- packages/tokens/src/v1/model.ts | 165 +- packages/volumes/src/v1/model.ts | 323 --- packages/warehouses/src/v1/client.ts | 2 +- packages/warehouses/src/v1/model.ts | 921 +------- packages/workspaceassignment/src/v1/model.ts | 244 -- packages/workspacebindings/src/v1/model.ts | 212 -- packages/workspaceconf/src/v1/model.ts | 26 - 74 files changed, 234 insertions(+), 24587 deletions(-) diff --git a/packages/abacpolicies/src/v1/client.ts b/packages/abacpolicies/src/v1/client.ts index c4b896a9..e48468ce 100644 --- a/packages/abacpolicies/src/v1/client.ts +++ b/packages/abacpolicies/src/v1/client.ts @@ -189,7 +189,7 @@ export class Client { const url = `${this.host}/api/2.1/unity-catalog/policies/${req.onSecurableType ?? ''}/${req.onSecurableFullname ?? ''}/${req.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/abacpolicies/src/v1/model.ts b/packages/abacpolicies/src/v1/model.ts index 03179d51..b44b60de 100644 --- a/packages/abacpolicies/src/v1/model.ts +++ b/packages/abacpolicies/src/v1/model.ts @@ -294,7 +294,7 @@ export interface UpdatePolicy { * Optional. The update mask field for specifying user intentions on which * fields to update in the request. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalColumnMaskOptionsSchema: z.ZodType = z @@ -476,9 +476,6 @@ export const marshalColumnTagValueExtractionSchema: z.ZodType = z tag_key: d.tagKey, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeletePolicy_ResponseSchema: z.ZodType = z.object({}); - export const marshalDenyOptionsSchema: z.ZodType = z .object({ privileges: z.array(z.string()).optional(), @@ -509,17 +506,6 @@ export const marshalGrantOptionsSchema: z.ZodType = z privileges: d.privileges, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListPolicies_ResponseSchema: z.ZodType = z - .object({ - policies: z.array(z.lazy(() => marshalPolicyInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - policies: d.policies, - next_page_token: d.nextPageToken, - })); - export const marshalMatchColumnSchema: z.ZodType = z .object({ condition: z.string().optional(), @@ -635,41 +621,6 @@ export function columnTagValueExtractionFieldMask( ); } -const createPolicyFieldMaskSchema: FieldMaskSchema = { - policyInfo: {wire: 'policy_info', children: () => policyInfoFieldMaskSchema}, -}; - -export function createPolicyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createPolicyFieldMaskSchema); -} - -const deletePolicyFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - onSecurableFullname: {wire: 'on_securable_fullname'}, - onSecurableType: {wire: 'on_securable_type'}, -}; - -export function deletePolicyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deletePolicyFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deletePolicy_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deletePolicy_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deletePolicy_ResponseFieldMaskSchema - ); -} - const denyOptionsFieldMaskSchema: FieldMaskSchema = { privileges: {wire: 'privileges'}, }; @@ -698,16 +649,6 @@ export function functionArgumentFieldMask( ); } -const getPolicyFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - onSecurableFullname: {wire: 'on_securable_fullname'}, - onSecurableType: {wire: 'on_securable_type'}, -}; - -export function getPolicyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getPolicyFieldMaskSchema); -} - const grantOptionsFieldMaskSchema: FieldMaskSchema = { privileges: {wire: 'privileges'}, }; @@ -718,36 +659,6 @@ export function grantOptionsFieldMask( return FieldMask.build(paths, grantOptionsFieldMaskSchema); } -const listPoliciesFieldMaskSchema: FieldMaskSchema = { - includeInherited: {wire: 'include_inherited'}, - maxResults: {wire: 'max_results'}, - onSecurableFullname: {wire: 'on_securable_fullname'}, - onSecurableType: {wire: 'on_securable_type'}, - pageToken: {wire: 'page_token'}, -}; - -export function listPoliciesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listPoliciesFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listPolicies_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - policies: {wire: 'policies'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listPolicies_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPolicies_ResponseFieldMaskSchema - ); -} - const matchColumnFieldMaskSchema: FieldMaskSchema = { alias: {wire: 'alias'}, condition: {wire: 'condition'}, @@ -838,17 +749,3 @@ export function tagValueExtractionFieldMask( tagValueExtractionFieldMaskSchema ); } - -const updatePolicyFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - onSecurableFullname: {wire: 'on_securable_fullname'}, - onSecurableType: {wire: 'on_securable_type'}, - policyInfo: {wire: 'policy_info', children: () => policyInfoFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updatePolicyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, updatePolicyFieldMaskSchema); -} diff --git a/packages/accountaccesscontrol/src/v1/model.ts b/packages/accountaccesscontrol/src/v1/model.ts index ec3879f3..c58549af 100644 --- a/packages/accountaccesscontrol/src/v1/model.ts +++ b/packages/accountaccesscontrol/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface GetAssignableRolesForResourceRequest { @@ -151,40 +149,6 @@ export const unmarshalRuleSetSchema: z.ZodType = z grantRules: d.grant_rules, })); -export const unmarshalRuleSetUpdateRequestSchema: z.ZodType = - z - .object({ - name: z.string().optional(), - etag: z.string().optional(), - grant_rules: z.array(z.lazy(() => unmarshalGrantRuleSchema)).optional(), - }) - .transform(d => ({ - name: d.name, - etag: d.etag, - grantRules: d.grant_rules, - })); - -export const unmarshalUpdateRuleSetRequestSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - name: z.string().optional(), - rule_set: z.lazy(() => unmarshalRuleSetUpdateRequestSchema).optional(), - }) - .transform(d => ({ - accountId: d.account_id, - name: d.name, - ruleSet: d.rule_set, - })); - -export const marshalGetAssignableRolesForResourceResponseSchema: z.ZodType = z - .object({ - roles: z.array(z.lazy(() => marshalRoleSchema)).optional(), - }) - .transform(d => ({ - roles: d.roles, - })); - export const marshalGrantRuleSchema: z.ZodType = z .object({ principals: z.array(z.string()).optional(), @@ -195,26 +159,6 @@ export const marshalGrantRuleSchema: z.ZodType = z role: d.role, })); -export const marshalRoleSchema: z.ZodType = z - .object({ - name: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - })); - -export const marshalRuleSetSchema: z.ZodType = z - .object({ - name: z.string().optional(), - etag: z.string().optional(), - grantRules: z.array(z.lazy(() => marshalGrantRuleSchema)).optional(), - }) - .transform(d => ({ - name: d.name, - etag: d.etag, - grant_rules: d.grantRules, - })); - export const marshalRuleSetUpdateRequestSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -238,105 +182,3 @@ export const marshalUpdateRuleSetRequestSchema: z.ZodType = z name: d.name, rule_set: d.ruleSet, })); - -const getAssignableRolesForResourceRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - resource: {wire: 'resource'}, -}; - -export function getAssignableRolesForResourceRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getAssignableRolesForResourceRequestFieldMaskSchema - ); -} - -const getAssignableRolesForResourceResponseFieldMaskSchema: FieldMaskSchema = { - roles: {wire: 'roles'}, -}; - -export function getAssignableRolesForResourceResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getAssignableRolesForResourceResponseFieldMaskSchema - ); -} - -const getRuleSetRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - etag: {wire: 'etag'}, - name: {wire: 'name'}, -}; - -export function getRuleSetRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getRuleSetRequestFieldMaskSchema - ); -} - -const grantRuleFieldMaskSchema: FieldMaskSchema = { - principals: {wire: 'principals'}, - role: {wire: 'role'}, -}; - -export function grantRuleFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, grantRuleFieldMaskSchema); -} - -const roleFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function roleFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, roleFieldMaskSchema); -} - -const ruleSetFieldMaskSchema: FieldMaskSchema = { - etag: {wire: 'etag'}, - grantRules: {wire: 'grant_rules'}, - name: {wire: 'name'}, -}; - -export function ruleSetFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, ruleSetFieldMaskSchema); -} - -const ruleSetUpdateRequestFieldMaskSchema: FieldMaskSchema = { - etag: {wire: 'etag'}, - grantRules: {wire: 'grant_rules'}, - name: {wire: 'name'}, -}; - -export function ruleSetUpdateRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - ruleSetUpdateRequestFieldMaskSchema - ); -} - -const updateRuleSetRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - name: {wire: 'name'}, - ruleSet: { - wire: 'rule_set', - children: () => ruleSetUpdateRequestFieldMaskSchema, - }, -}; - -export function updateRuleSetRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateRuleSetRequestFieldMaskSchema - ); -} diff --git a/packages/accountaccesscontrolproxy/src/v1/model.ts b/packages/accountaccesscontrolproxy/src/v1/model.ts index ec3879f3..c58549af 100644 --- a/packages/accountaccesscontrolproxy/src/v1/model.ts +++ b/packages/accountaccesscontrolproxy/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface GetAssignableRolesForResourceRequest { @@ -151,40 +149,6 @@ export const unmarshalRuleSetSchema: z.ZodType = z grantRules: d.grant_rules, })); -export const unmarshalRuleSetUpdateRequestSchema: z.ZodType = - z - .object({ - name: z.string().optional(), - etag: z.string().optional(), - grant_rules: z.array(z.lazy(() => unmarshalGrantRuleSchema)).optional(), - }) - .transform(d => ({ - name: d.name, - etag: d.etag, - grantRules: d.grant_rules, - })); - -export const unmarshalUpdateRuleSetRequestSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - name: z.string().optional(), - rule_set: z.lazy(() => unmarshalRuleSetUpdateRequestSchema).optional(), - }) - .transform(d => ({ - accountId: d.account_id, - name: d.name, - ruleSet: d.rule_set, - })); - -export const marshalGetAssignableRolesForResourceResponseSchema: z.ZodType = z - .object({ - roles: z.array(z.lazy(() => marshalRoleSchema)).optional(), - }) - .transform(d => ({ - roles: d.roles, - })); - export const marshalGrantRuleSchema: z.ZodType = z .object({ principals: z.array(z.string()).optional(), @@ -195,26 +159,6 @@ export const marshalGrantRuleSchema: z.ZodType = z role: d.role, })); -export const marshalRoleSchema: z.ZodType = z - .object({ - name: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - })); - -export const marshalRuleSetSchema: z.ZodType = z - .object({ - name: z.string().optional(), - etag: z.string().optional(), - grantRules: z.array(z.lazy(() => marshalGrantRuleSchema)).optional(), - }) - .transform(d => ({ - name: d.name, - etag: d.etag, - grant_rules: d.grantRules, - })); - export const marshalRuleSetUpdateRequestSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -238,105 +182,3 @@ export const marshalUpdateRuleSetRequestSchema: z.ZodType = z name: d.name, rule_set: d.ruleSet, })); - -const getAssignableRolesForResourceRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - resource: {wire: 'resource'}, -}; - -export function getAssignableRolesForResourceRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getAssignableRolesForResourceRequestFieldMaskSchema - ); -} - -const getAssignableRolesForResourceResponseFieldMaskSchema: FieldMaskSchema = { - roles: {wire: 'roles'}, -}; - -export function getAssignableRolesForResourceResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getAssignableRolesForResourceResponseFieldMaskSchema - ); -} - -const getRuleSetRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - etag: {wire: 'etag'}, - name: {wire: 'name'}, -}; - -export function getRuleSetRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getRuleSetRequestFieldMaskSchema - ); -} - -const grantRuleFieldMaskSchema: FieldMaskSchema = { - principals: {wire: 'principals'}, - role: {wire: 'role'}, -}; - -export function grantRuleFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, grantRuleFieldMaskSchema); -} - -const roleFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function roleFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, roleFieldMaskSchema); -} - -const ruleSetFieldMaskSchema: FieldMaskSchema = { - etag: {wire: 'etag'}, - grantRules: {wire: 'grant_rules'}, - name: {wire: 'name'}, -}; - -export function ruleSetFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, ruleSetFieldMaskSchema); -} - -const ruleSetUpdateRequestFieldMaskSchema: FieldMaskSchema = { - etag: {wire: 'etag'}, - grantRules: {wire: 'grant_rules'}, - name: {wire: 'name'}, -}; - -export function ruleSetUpdateRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - ruleSetUpdateRequestFieldMaskSchema - ); -} - -const updateRuleSetRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - name: {wire: 'name'}, - ruleSet: { - wire: 'rule_set', - children: () => ruleSetUpdateRequestFieldMaskSchema, - }, -}; - -export function updateRuleSetRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateRuleSetRequestFieldMaskSchema - ); -} diff --git a/packages/alerts/src/v1/model.ts b/packages/alerts/src/v1/model.ts index 683e67fd..11378e94 100644 --- a/packages/alerts/src/v1/model.ts +++ b/packages/alerts/src/v1/model.ts @@ -184,7 +184,7 @@ export interface TrashAlertRequest { export interface UpdateAlertRequest { alert?: UpdateAlertRequestAlert | undefined; - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; id?: string | undefined; /** If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert's display name conflicts with an existing alert's display name. */ autoResolveDisplayName?: boolean | undefined; @@ -313,63 +313,6 @@ export const unmarshalAlertOperandValueSchema: z.ZodType = z boolValue: d.bool_value, })); -export const unmarshalCreateAlertRequestSchema: z.ZodType = - z - .object({ - alert: z.lazy(() => unmarshalCreateAlertRequestAlertSchema).optional(), - auto_resolve_display_name: z.boolean().optional(), - }) - .transform(d => ({ - alert: d.alert, - autoResolveDisplayName: d.auto_resolve_display_name, - })); - -export const unmarshalCreateAlertRequestAlertSchema: z.ZodType = - z - .object({ - id: z.string().optional(), - display_name: z.string().optional(), - query_id: z.string().optional(), - state: z.enum(AlertState).optional(), - seconds_to_retrigger: z.number().optional(), - lifecycle_state: z.enum(LifecycleState).optional(), - trigger_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - custom_body: z.string().optional(), - custom_subject: z.string().optional(), - condition: z.lazy(() => unmarshalAlertConditionSchema).optional(), - owner_user_name: z.string().optional(), - parent_path: z.string().optional(), - create_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - update_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - notify_on_ok: z.boolean().optional(), - }) - .transform(d => ({ - id: d.id, - displayName: d.display_name, - queryId: d.query_id, - state: d.state, - secondsToRetrigger: d.seconds_to_retrigger, - lifecycleState: d.lifecycle_state, - triggerTime: d.trigger_time, - customBody: d.custom_body, - customSubject: d.custom_subject, - condition: d.condition, - ownerUserName: d.owner_user_name, - parentPath: d.parent_path, - createTime: d.create_time, - updateTime: d.update_time, - notifyOnOk: d.notify_on_ok, - })); - export const unmarshalEmptySchema: z.ZodType = z.object({}); export const unmarshalListAlertsResponseSchema: z.ZodType = @@ -431,112 +374,6 @@ export const unmarshalListAlertsResponseAlertSchema: z.ZodType = - z - .object({ - alert: z.lazy(() => unmarshalUpdateAlertRequestAlertSchema).optional(), - update_mask: z.string().optional(), - id: z.string().optional(), - auto_resolve_display_name: z.boolean().optional(), - }) - .transform(d => ({ - alert: d.alert, - updateMask: d.update_mask, - id: d.id, - autoResolveDisplayName: d.auto_resolve_display_name, - })); - -export const unmarshalUpdateAlertRequestAlertSchema: z.ZodType = - z - .object({ - id: z.string().optional(), - display_name: z.string().optional(), - query_id: z.string().optional(), - state: z.enum(AlertState).optional(), - seconds_to_retrigger: z.number().optional(), - lifecycle_state: z.enum(LifecycleState).optional(), - trigger_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - custom_body: z.string().optional(), - custom_subject: z.string().optional(), - condition: z.lazy(() => unmarshalAlertConditionSchema).optional(), - owner_user_name: z.string().optional(), - parent_path: z.string().optional(), - create_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - update_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - notify_on_ok: z.boolean().optional(), - }) - .transform(d => ({ - id: d.id, - displayName: d.display_name, - queryId: d.query_id, - state: d.state, - secondsToRetrigger: d.seconds_to_retrigger, - lifecycleState: d.lifecycle_state, - triggerTime: d.trigger_time, - customBody: d.custom_body, - customSubject: d.custom_subject, - condition: d.condition, - ownerUserName: d.owner_user_name, - parentPath: d.parent_path, - createTime: d.create_time, - updateTime: d.update_time, - notifyOnOk: d.notify_on_ok, - })); - -export const marshalAlertSchema: z.ZodType = z - .object({ - id: z.string().optional(), - displayName: z.string().optional(), - queryId: z.string().optional(), - state: z.enum(AlertState).optional(), - secondsToRetrigger: z.number().optional(), - lifecycleState: z.enum(LifecycleState).optional(), - triggerTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - customBody: z.string().optional(), - customSubject: z.string().optional(), - condition: z.lazy(() => marshalAlertConditionSchema).optional(), - ownerUserName: z.string().optional(), - parentPath: z.string().optional(), - createTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - updateTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - notifyOnOk: z.boolean().optional(), - }) - .transform(d => ({ - id: d.id, - display_name: d.displayName, - query_id: d.queryId, - state: d.state, - seconds_to_retrigger: d.secondsToRetrigger, - lifecycle_state: d.lifecycleState, - trigger_time: d.triggerTime, - custom_body: d.customBody, - custom_subject: d.customSubject, - condition: d.condition, - owner_user_name: d.ownerUserName, - parent_path: d.parentPath, - create_time: d.createTime, - update_time: d.updateTime, - notify_on_ok: d.notifyOnOk, - })); - export const marshalAlertConditionSchema: z.ZodType = z .object({ op: z.enum(AlertOperator).optional(), @@ -636,69 +473,13 @@ export const marshalCreateAlertRequestAlertSchema: z.ZodType = z notify_on_ok: d.notifyOnOk, })); -export const marshalEmptySchema: z.ZodType = z.object({}); - -export const marshalListAlertsResponseSchema: z.ZodType = z - .object({ - results: z - .array(z.lazy(() => marshalListAlertsResponseAlertSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - results: d.results, - next_page_token: d.nextPageToken, - })); - -export const marshalListAlertsResponseAlertSchema: z.ZodType = z - .object({ - id: z.string().optional(), - displayName: z.string().optional(), - queryId: z.string().optional(), - state: z.enum(AlertState).optional(), - secondsToRetrigger: z.number().optional(), - lifecycleState: z.enum(LifecycleState).optional(), - triggerTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - customBody: z.string().optional(), - customSubject: z.string().optional(), - condition: z.lazy(() => marshalAlertConditionSchema).optional(), - ownerUserName: z.string().optional(), - parentPath: z.string().optional(), - createTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - updateTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - notifyOnOk: z.boolean().optional(), - }) - .transform(d => ({ - id: d.id, - display_name: d.displayName, - query_id: d.queryId, - state: d.state, - seconds_to_retrigger: d.secondsToRetrigger, - lifecycle_state: d.lifecycleState, - trigger_time: d.triggerTime, - custom_body: d.customBody, - custom_subject: d.customSubject, - condition: d.condition, - owner_user_name: d.ownerUserName, - parent_path: d.parentPath, - create_time: d.createTime, - update_time: d.updateTime, - notify_on_ok: d.notifyOnOk, - })); - export const marshalUpdateAlertRequestSchema: z.ZodType = z .object({ alert: z.lazy(() => marshalUpdateAlertRequestAlertSchema).optional(), - updateMask: z.string().optional(), + updateMask: z + .any() + .transform((m: FieldMask) => m.toString()) + .optional(), id: z.string().optional(), autoResolveDisplayName: z.boolean().optional(), }) @@ -754,28 +535,6 @@ export const marshalUpdateAlertRequestAlertSchema: z.ZodType = z notify_on_ok: d.notifyOnOk, })); -const alertFieldMaskSchema: FieldMaskSchema = { - condition: {wire: 'condition', children: () => alertConditionFieldMaskSchema}, - createTime: {wire: 'create_time'}, - customBody: {wire: 'custom_body'}, - customSubject: {wire: 'custom_subject'}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, - lifecycleState: {wire: 'lifecycle_state'}, - notifyOnOk: {wire: 'notify_on_ok'}, - ownerUserName: {wire: 'owner_user_name'}, - parentPath: {wire: 'parent_path'}, - queryId: {wire: 'query_id'}, - secondsToRetrigger: {wire: 'seconds_to_retrigger'}, - state: {wire: 'state'}, - triggerTime: {wire: 'trigger_time'}, - updateTime: {wire: 'update_time'}, -}; - -export function alertFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, alertFieldMaskSchema); -} - const alertConditionFieldMaskSchema: FieldMaskSchema = { emptyResultState: {wire: 'empty_result_state'}, op: {wire: 'op'}, @@ -828,156 +587,6 @@ export function alertOperandValueFieldMask( ); } -const createAlertRequestFieldMaskSchema: FieldMaskSchema = { - alert: { - wire: 'alert', - children: () => createAlertRequestAlertFieldMaskSchema, - }, - autoResolveDisplayName: {wire: 'auto_resolve_display_name'}, -}; - -export function createAlertRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createAlertRequestFieldMaskSchema - ); -} - -const createAlertRequestAlertFieldMaskSchema: FieldMaskSchema = { - condition: {wire: 'condition', children: () => alertConditionFieldMaskSchema}, - createTime: {wire: 'create_time'}, - customBody: {wire: 'custom_body'}, - customSubject: {wire: 'custom_subject'}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, - lifecycleState: {wire: 'lifecycle_state'}, - notifyOnOk: {wire: 'notify_on_ok'}, - ownerUserName: {wire: 'owner_user_name'}, - parentPath: {wire: 'parent_path'}, - queryId: {wire: 'query_id'}, - secondsToRetrigger: {wire: 'seconds_to_retrigger'}, - state: {wire: 'state'}, - triggerTime: {wire: 'trigger_time'}, - updateTime: {wire: 'update_time'}, -}; - -export function createAlertRequestAlertFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createAlertRequestAlertFieldMaskSchema - ); -} - -const emptyFieldMaskSchema: FieldMaskSchema = {}; - -export function emptyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, emptyFieldMaskSchema); -} - -const getAlertRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function getAlertRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getAlertRequestFieldMaskSchema - ); -} - -const listAlertsRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listAlertsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAlertsRequestFieldMaskSchema - ); -} - -const listAlertsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - results: {wire: 'results'}, -}; - -export function listAlertsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAlertsResponseFieldMaskSchema - ); -} - -const listAlertsResponseAlertFieldMaskSchema: FieldMaskSchema = { - condition: {wire: 'condition', children: () => alertConditionFieldMaskSchema}, - createTime: {wire: 'create_time'}, - customBody: {wire: 'custom_body'}, - customSubject: {wire: 'custom_subject'}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, - lifecycleState: {wire: 'lifecycle_state'}, - notifyOnOk: {wire: 'notify_on_ok'}, - ownerUserName: {wire: 'owner_user_name'}, - parentPath: {wire: 'parent_path'}, - queryId: {wire: 'query_id'}, - secondsToRetrigger: {wire: 'seconds_to_retrigger'}, - state: {wire: 'state'}, - triggerTime: {wire: 'trigger_time'}, - updateTime: {wire: 'update_time'}, -}; - -export function listAlertsResponseAlertFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAlertsResponseAlertFieldMaskSchema - ); -} - -const trashAlertRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function trashAlertRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - trashAlertRequestFieldMaskSchema - ); -} - -const updateAlertRequestFieldMaskSchema: FieldMaskSchema = { - alert: { - wire: 'alert', - children: () => updateAlertRequestAlertFieldMaskSchema, - }, - autoResolveDisplayName: {wire: 'auto_resolve_display_name'}, - id: {wire: 'id'}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateAlertRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateAlertRequestFieldMaskSchema - ); -} - const updateAlertRequestAlertFieldMaskSchema: FieldMaskSchema = { condition: {wire: 'condition', children: () => alertConditionFieldMaskSchema}, createTime: {wire: 'create_time'}, diff --git a/packages/alerts/src/v2/client.ts b/packages/alerts/src/v2/client.ts index 9b60dc21..12c4a405 100644 --- a/packages/alerts/src/v2/client.ts +++ b/packages/alerts/src/v2/client.ts @@ -183,7 +183,7 @@ export class Client { const url = `${this.host}/api/2.0/alerts/${req.alert?.id ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/alerts/src/v2/model.ts b/packages/alerts/src/v2/model.ts index 9310f438..1fa583d5 100644 --- a/packages/alerts/src/v2/model.ts +++ b/packages/alerts/src/v2/model.ts @@ -211,7 +211,7 @@ export interface TrashAlertRequest { export interface UpdateAlertRequest { alert?: Alert | undefined; - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalAlertSchema: z.ZodType = z @@ -530,18 +530,6 @@ export const marshalCronScheduleSchema: z.ZodType = z effective_pause_status: d.effectivePauseStatus, })); -export const marshalEmptySchema: z.ZodType = z.object({}); - -export const marshalListAlertsResponseSchema: z.ZodType = z - .object({ - alerts: z.array(z.lazy(() => marshalAlertSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - alerts: d.alerts, - next_page_token: d.nextPageToken, - })); - const alertFieldMaskSchema: FieldMaskSchema = { createTime: {wire: 'create_time'}, customDescription: {wire: 'custom_description'}, @@ -673,19 +661,6 @@ export function alertSubscriptionFieldMask( ); } -const createAlertRequestFieldMaskSchema: FieldMaskSchema = { - alert: {wire: 'alert', children: () => alertFieldMaskSchema}, -}; - -export function createAlertRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createAlertRequestFieldMaskSchema - ); -} - const cronScheduleFieldMaskSchema: FieldMaskSchema = { effectivePauseStatus: {wire: 'effective_pause_status'}, pauseStatus: {wire: 'pause_status'}, @@ -698,78 +673,3 @@ export function cronScheduleFieldMask( ): FieldMask { return FieldMask.build(paths, cronScheduleFieldMaskSchema); } - -const emptyFieldMaskSchema: FieldMaskSchema = {}; - -export function emptyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, emptyFieldMaskSchema); -} - -const getAlertRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function getAlertRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getAlertRequestFieldMaskSchema - ); -} - -const listAlertsRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listAlertsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAlertsRequestFieldMaskSchema - ); -} - -const listAlertsResponseFieldMaskSchema: FieldMaskSchema = { - alerts: {wire: 'alerts'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listAlertsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAlertsResponseFieldMaskSchema - ); -} - -const trashAlertRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, - purge: {wire: 'purge'}, -}; - -export function trashAlertRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - trashAlertRequestFieldMaskSchema - ); -} - -const updateAlertRequestFieldMaskSchema: FieldMaskSchema = { - alert: {wire: 'alert', children: () => alertFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateAlertRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateAlertRequestFieldMaskSchema - ); -} diff --git a/packages/artifactallowlists/src/v1/model.ts b/packages/artifactallowlists/src/v1/model.ts index 60443d19..ce50e417 100644 --- a/packages/artifactallowlists/src/v1/model.ts +++ b/packages/artifactallowlists/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The artifact type */ @@ -83,41 +81,6 @@ export const unmarshalArtifactMatcherSchema: z.ZodType = z matchType: d.match_type, })); -export const unmarshalSetArtifactAllowlistSchema: z.ZodType = - z - .object({ - artifact_type: z.enum(ArtifactType).optional(), - artifact_matchers: z - .array(z.lazy(() => unmarshalArtifactMatcherSchema)) - .optional(), - metastore_id: z.string().optional(), - created_by: z.string().optional(), - created_at: z.number().optional(), - }) - .transform(d => ({ - artifactType: d.artifact_type, - artifactMatchers: d.artifact_matchers, - metastoreId: d.metastore_id, - createdBy: d.created_by, - createdAt: d.created_at, - })); - -export const marshalArtifactAllowlistInfoSchema: z.ZodType = z - .object({ - artifactMatchers: z - .array(z.lazy(() => marshalArtifactMatcherSchema)) - .optional(), - metastoreId: z.string().optional(), - createdBy: z.string().optional(), - createdAt: z.number().optional(), - }) - .transform(d => ({ - artifact_matchers: d.artifactMatchers, - metastore_id: d.metastoreId, - created_by: d.createdBy, - created_at: d.createdAt, - })); - export const marshalArtifactMatcherSchema: z.ZodType = z .object({ artifact: z.string().optional(), @@ -145,63 +108,3 @@ export const marshalSetArtifactAllowlistSchema: z.ZodType = z created_by: d.createdBy, created_at: d.createdAt, })); - -const artifactAllowlistInfoFieldMaskSchema: FieldMaskSchema = { - artifactMatchers: {wire: 'artifact_matchers'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - metastoreId: {wire: 'metastore_id'}, -}; - -export function artifactAllowlistInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - artifactAllowlistInfoFieldMaskSchema - ); -} - -const artifactMatcherFieldMaskSchema: FieldMaskSchema = { - artifact: {wire: 'artifact'}, - matchType: {wire: 'match_type'}, -}; - -export function artifactMatcherFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - artifactMatcherFieldMaskSchema - ); -} - -const getArtifactAllowlistFieldMaskSchema: FieldMaskSchema = { - artifactType: {wire: 'artifact_type'}, -}; - -export function getArtifactAllowlistFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getArtifactAllowlistFieldMaskSchema - ); -} - -const setArtifactAllowlistFieldMaskSchema: FieldMaskSchema = { - artifactMatchers: {wire: 'artifact_matchers'}, - artifactType: {wire: 'artifact_type'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - metastoreId: {wire: 'metastore_id'}, -}; - -export function setArtifactAllowlistFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - setArtifactAllowlistFieldMaskSchema - ); -} diff --git a/packages/billableusagedownload/src/v1/model.ts b/packages/billableusagedownload/src/v1/model.ts index 7941a16c..fbda5c45 100644 --- a/packages/billableusagedownload/src/v1/model.ts +++ b/packages/billableusagedownload/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface DownloadRequest { @@ -42,40 +40,3 @@ export const unmarshalDownloadResponseSchema: z.ZodType = z .transform(d => ({ content: d.content, })); - -export const marshalDownloadResponseSchema: z.ZodType = z - .object({ - content: z.string().optional(), - }) - .transform(d => ({ - content: d.content, - })); - -const downloadRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - endMonth: {wire: 'end_month'}, - personalData: {wire: 'personal_data'}, - startMonth: {wire: 'start_month'}, -}; - -export function downloadRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - downloadRequestFieldMaskSchema - ); -} - -const downloadResponseFieldMaskSchema: FieldMaskSchema = { - content: {wire: 'content'}, -}; - -export function downloadResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - downloadResponseFieldMaskSchema - ); -} diff --git a/packages/catalogs/src/v1/model.ts b/packages/catalogs/src/v1/model.ts index 46d03aeb..8cff5a14 100644 --- a/packages/catalogs/src/v1/model.ts +++ b/packages/catalogs/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum CatalogIsolationMode { @@ -466,71 +464,6 @@ export const unmarshalConversionInfoSchema: z.ZodType = z state: d.state, })); -export const unmarshalCreateCatalogSchema: z.ZodType = z - .object({ - name: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storage_root: z.string().optional(), - enable_predictive_optimization: z.string().optional(), - catalog_type: z.enum(CatalogType).optional(), - provider_name: z.string().optional(), - share_name: z.string().optional(), - connection_name: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - storage_location: z.string().optional(), - isolation_mode: z.enum(CatalogIsolationMode).optional(), - effective_predictive_optimization_flag: z - .lazy(() => unmarshalEffectivePredictiveOptimizationFlagSchema) - .optional(), - browse_only: z.boolean().optional(), - provisioning_info: z.lazy(() => unmarshalProvisioningInfoSchema).optional(), - full_name: z.string().optional(), - securable_type: z.enum(SecurableType).optional(), - conversion_info: z.lazy(() => unmarshalConversionInfoSchema).optional(), - dr_replication_info: z - .lazy(() => unmarshalDrReplicationInfoSchema) - .optional(), - managed_encryption_settings: z - .lazy(() => unmarshalEncryptionSettingsSchema) - .optional(), - properties: z.record(z.string(), z.string()).optional(), - options: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - name: d.name, - owner: d.owner, - comment: d.comment, - storageRoot: d.storage_root, - enablePredictiveOptimization: d.enable_predictive_optimization, - catalogType: d.catalog_type, - providerName: d.provider_name, - shareName: d.share_name, - connectionName: d.connection_name, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - storageLocation: d.storage_location, - isolationMode: d.isolation_mode, - effectivePredictiveOptimizationFlag: - d.effective_predictive_optimization_flag, - browseOnly: d.browse_only, - provisioningInfo: d.provisioning_info, - fullName: d.full_name, - securableType: d.securable_type, - conversionInfo: d.conversion_info, - drReplicationInfo: d.dr_replication_info, - managedEncryptionSettings: d.managed_encryption_settings, - properties: d.properties, - options: d.options, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeleteCatalog_ResponseSchema: z.ZodType = z.object({}); @@ -598,75 +531,6 @@ export const unmarshalProvisioningInfoSchema: z.ZodType = z state: d.state, })); -export const unmarshalUpdateCatalogSchema: z.ZodType = z - .object({ - name_arg: z.string().optional(), - new_name: z.string().optional(), - name: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storage_root: z.string().optional(), - enable_predictive_optimization: z.string().optional(), - catalog_type: z.enum(CatalogType).optional(), - provider_name: z.string().optional(), - share_name: z.string().optional(), - connection_name: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - storage_location: z.string().optional(), - isolation_mode: z.enum(CatalogIsolationMode).optional(), - effective_predictive_optimization_flag: z - .lazy(() => unmarshalEffectivePredictiveOptimizationFlagSchema) - .optional(), - browse_only: z.boolean().optional(), - provisioning_info: z.lazy(() => unmarshalProvisioningInfoSchema).optional(), - full_name: z.string().optional(), - securable_type: z.enum(SecurableType).optional(), - conversion_info: z.lazy(() => unmarshalConversionInfoSchema).optional(), - dr_replication_info: z - .lazy(() => unmarshalDrReplicationInfoSchema) - .optional(), - managed_encryption_settings: z - .lazy(() => unmarshalEncryptionSettingsSchema) - .optional(), - properties: z.record(z.string(), z.string()).optional(), - options: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - nameArg: d.name_arg, - newName: d.new_name, - name: d.name, - owner: d.owner, - comment: d.comment, - storageRoot: d.storage_root, - enablePredictiveOptimization: d.enable_predictive_optimization, - catalogType: d.catalog_type, - providerName: d.provider_name, - shareName: d.share_name, - connectionName: d.connection_name, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - storageLocation: d.storage_location, - isolationMode: d.isolation_mode, - effectivePredictiveOptimizationFlag: - d.effective_predictive_optimization_flag, - browseOnly: d.browse_only, - provisioningInfo: d.provisioning_info, - fullName: d.full_name, - securableType: d.securable_type, - conversionInfo: d.conversion_info, - drReplicationInfo: d.dr_replication_info, - managedEncryptionSettings: d.managed_encryption_settings, - properties: d.properties, - options: d.options, - })); - export const marshalAzureEncryptionSettingsSchema: z.ZodType = z .object({ azureTenantId: z.string().optional(), @@ -679,69 +543,6 @@ export const marshalAzureEncryptionSettingsSchema: z.ZodType = z azure_cmk_managed_identity_id: d.azureCmkManagedIdentityId, })); -export const marshalCatalogInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storageRoot: z.string().optional(), - enablePredictiveOptimization: z.string().optional(), - catalogType: z.enum(CatalogType).optional(), - providerName: z.string().optional(), - shareName: z.string().optional(), - connectionName: z.string().optional(), - metastoreId: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - storageLocation: z.string().optional(), - isolationMode: z.enum(CatalogIsolationMode).optional(), - effectivePredictiveOptimizationFlag: z - .lazy(() => marshalEffectivePredictiveOptimizationFlagSchema) - .optional(), - browseOnly: z.boolean().optional(), - provisioningInfo: z.lazy(() => marshalProvisioningInfoSchema).optional(), - fullName: z.string().optional(), - securableType: z.enum(SecurableType).optional(), - conversionInfo: z.lazy(() => marshalConversionInfoSchema).optional(), - drReplicationInfo: z.lazy(() => marshalDrReplicationInfoSchema).optional(), - managedEncryptionSettings: z - .lazy(() => marshalEncryptionSettingsSchema) - .optional(), - properties: z.record(z.string(), z.string()).optional(), - options: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - name: d.name, - owner: d.owner, - comment: d.comment, - storage_root: d.storageRoot, - enable_predictive_optimization: d.enablePredictiveOptimization, - catalog_type: d.catalogType, - provider_name: d.providerName, - share_name: d.shareName, - connection_name: d.connectionName, - metastore_id: d.metastoreId, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - storage_location: d.storageLocation, - isolation_mode: d.isolationMode, - effective_predictive_optimization_flag: - d.effectivePredictiveOptimizationFlag, - browse_only: d.browseOnly, - provisioning_info: d.provisioningInfo, - full_name: d.fullName, - securable_type: d.securableType, - conversion_info: d.conversionInfo, - dr_replication_info: d.drReplicationInfo, - managed_encryption_settings: d.managedEncryptionSettings, - properties: d.properties, - options: d.options, - })); - export const marshalConversionInfoSchema: z.ZodType = z .object({ state: z.enum(ConversionInfo_State).optional(), @@ -813,9 +614,6 @@ export const marshalCreateCatalogSchema: z.ZodType = z options: d.options, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteCatalog_ResponseSchema: z.ZodType = z.object({}); - export const marshalDrReplicationInfoSchema: z.ZodType = z .object({ status: z.enum(DrReplicationStatus).optional(), @@ -859,17 +657,6 @@ export const marshalEncryptionSettingsSchema: z.ZodType = z azure_encryption_settings: d.azureEncryptionSettings, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListCatalogs_ResponseSchema: z.ZodType = z - .object({ - catalogs: z.array(z.lazy(() => marshalCatalogInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - catalogs: d.catalogs, - next_page_token: d.nextPageToken, - })); - export const marshalProvisioningInfoSchema: z.ZodType = z .object({ state: z.enum(ProvisioningInfo_State).optional(), @@ -944,399 +731,3 @@ export const marshalUpdateCatalogSchema: z.ZodType = z properties: d.properties, options: d.options, })); - -const azureEncryptionSettingsFieldMaskSchema: FieldMaskSchema = { - azureCmkAccessConnectorId: {wire: 'azure_cmk_access_connector_id'}, - azureCmkManagedIdentityId: {wire: 'azure_cmk_managed_identity_id'}, - azureTenantId: {wire: 'azure_tenant_id'}, -}; - -export function azureEncryptionSettingsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - azureEncryptionSettingsFieldMaskSchema - ); -} - -const catalogInfoFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - catalogType: {wire: 'catalog_type'}, - comment: {wire: 'comment'}, - connectionName: {wire: 'connection_name'}, - conversionInfo: { - wire: 'conversion_info', - children: () => conversionInfoFieldMaskSchema, - }, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - drReplicationInfo: { - wire: 'dr_replication_info', - children: () => drReplicationInfoFieldMaskSchema, - }, - effectivePredictiveOptimizationFlag: { - wire: 'effective_predictive_optimization_flag', - children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, - }, - enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, - fullName: {wire: 'full_name'}, - isolationMode: {wire: 'isolation_mode'}, - managedEncryptionSettings: { - wire: 'managed_encryption_settings', - children: () => encryptionSettingsFieldMaskSchema, - }, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - options: {wire: 'options'}, - owner: {wire: 'owner'}, - properties: {wire: 'properties'}, - providerName: {wire: 'provider_name'}, - provisioningInfo: { - wire: 'provisioning_info', - children: () => provisioningInfoFieldMaskSchema, - }, - securableType: {wire: 'securable_type'}, - shareName: {wire: 'share_name'}, - storageLocation: {wire: 'storage_location'}, - storageRoot: {wire: 'storage_root'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function catalogInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, catalogInfoFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const catalogInfo_OptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function catalogInfo_OptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - catalogInfo_OptionsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const catalogInfo_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function catalogInfo_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - catalogInfo_PropertiesEntryFieldMaskSchema - ); -} - -const conversionInfoFieldMaskSchema: FieldMaskSchema = { - state: {wire: 'state'}, -}; - -export function conversionInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, conversionInfoFieldMaskSchema); -} - -const createCatalogFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - catalogType: {wire: 'catalog_type'}, - comment: {wire: 'comment'}, - connectionName: {wire: 'connection_name'}, - conversionInfo: { - wire: 'conversion_info', - children: () => conversionInfoFieldMaskSchema, - }, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - drReplicationInfo: { - wire: 'dr_replication_info', - children: () => drReplicationInfoFieldMaskSchema, - }, - effectivePredictiveOptimizationFlag: { - wire: 'effective_predictive_optimization_flag', - children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, - }, - enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, - fullName: {wire: 'full_name'}, - isolationMode: {wire: 'isolation_mode'}, - managedEncryptionSettings: { - wire: 'managed_encryption_settings', - children: () => encryptionSettingsFieldMaskSchema, - }, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - options: {wire: 'options'}, - owner: {wire: 'owner'}, - properties: {wire: 'properties'}, - providerName: {wire: 'provider_name'}, - provisioningInfo: { - wire: 'provisioning_info', - children: () => provisioningInfoFieldMaskSchema, - }, - securableType: {wire: 'securable_type'}, - shareName: {wire: 'share_name'}, - storageLocation: {wire: 'storage_location'}, - storageRoot: {wire: 'storage_root'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function createCatalogFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createCatalogFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createCatalog_OptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createCatalog_OptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createCatalog_OptionsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createCatalog_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createCatalog_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createCatalog_PropertiesEntryFieldMaskSchema - ); -} - -const deleteCatalogFieldMaskSchema: FieldMaskSchema = { - force: {wire: 'force'}, - nameArg: {wire: 'name_arg'}, -}; - -export function deleteCatalogFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deleteCatalogFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteCatalog_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteCatalog_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteCatalog_ResponseFieldMaskSchema - ); -} - -const drReplicationInfoFieldMaskSchema: FieldMaskSchema = { - lastFailoverTimeMs: {wire: 'last_failover_time_ms'}, - replicatedEntities: {wire: 'replicated_entities'}, - status: {wire: 'status'}, -}; - -export function drReplicationInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - drReplicationInfoFieldMaskSchema - ); -} - -const effectivePredictiveOptimizationFlagFieldMaskSchema: FieldMaskSchema = { - inheritedFromName: {wire: 'inherited_from_name'}, - inheritedFromType: {wire: 'inherited_from_type'}, - value: {wire: 'value'}, -}; - -export function effectivePredictiveOptimizationFlagFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - effectivePredictiveOptimizationFlagFieldMaskSchema - ); -} - -const encryptionSettingsFieldMaskSchema: FieldMaskSchema = { - azureEncryptionSettings: { - wire: 'azure_encryption_settings', - children: () => azureEncryptionSettingsFieldMaskSchema, - }, - azureKeyVaultKeyId: {wire: 'azure_key_vault_key_id'}, - customerManagedKeyId: {wire: 'customer_managed_key_id'}, -}; - -export function encryptionSettingsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - encryptionSettingsFieldMaskSchema - ); -} - -const getCatalogFieldMaskSchema: FieldMaskSchema = { - includeBrowse: {wire: 'include_browse'}, - nameArg: {wire: 'name_arg'}, -}; - -export function getCatalogFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getCatalogFieldMaskSchema); -} - -const listCatalogsFieldMaskSchema: FieldMaskSchema = { - includeBrowse: {wire: 'include_browse'}, - includeUnbound: {wire: 'include_unbound'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listCatalogsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listCatalogsFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listCatalogs_ResponseFieldMaskSchema: FieldMaskSchema = { - catalogs: {wire: 'catalogs'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listCatalogs_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listCatalogs_ResponseFieldMaskSchema - ); -} - -const provisioningInfoFieldMaskSchema: FieldMaskSchema = { - state: {wire: 'state'}, -}; - -export function provisioningInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - provisioningInfoFieldMaskSchema - ); -} - -const updateCatalogFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - catalogType: {wire: 'catalog_type'}, - comment: {wire: 'comment'}, - connectionName: {wire: 'connection_name'}, - conversionInfo: { - wire: 'conversion_info', - children: () => conversionInfoFieldMaskSchema, - }, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - drReplicationInfo: { - wire: 'dr_replication_info', - children: () => drReplicationInfoFieldMaskSchema, - }, - effectivePredictiveOptimizationFlag: { - wire: 'effective_predictive_optimization_flag', - children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, - }, - enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, - fullName: {wire: 'full_name'}, - isolationMode: {wire: 'isolation_mode'}, - managedEncryptionSettings: { - wire: 'managed_encryption_settings', - children: () => encryptionSettingsFieldMaskSchema, - }, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - nameArg: {wire: 'name_arg'}, - newName: {wire: 'new_name'}, - options: {wire: 'options'}, - owner: {wire: 'owner'}, - properties: {wire: 'properties'}, - providerName: {wire: 'provider_name'}, - provisioningInfo: { - wire: 'provisioning_info', - children: () => provisioningInfoFieldMaskSchema, - }, - securableType: {wire: 'securable_type'}, - shareName: {wire: 'share_name'}, - storageLocation: {wire: 'storage_location'}, - storageRoot: {wire: 'storage_root'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function updateCatalogFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, updateCatalogFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateCatalog_OptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateCatalog_OptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateCatalog_OptionsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateCatalog_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateCatalog_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateCatalog_PropertiesEntryFieldMaskSchema - ); -} diff --git a/packages/clusterpolicies/src/v2/model.ts b/packages/clusterpolicies/src/v2/model.ts index 437f2900..1fd3d7ca 100644 --- a/packages/clusterpolicies/src/v2/model.ts +++ b/packages/clusterpolicies/src/v2/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ListOrder { @@ -247,26 +245,6 @@ export interface RCranLibrary { repo?: string | undefined; } -export const unmarshalCreatePolicySchema: z.ZodType = z - .object({ - name: z.string().optional(), - definition: z.string().optional(), - description: z.string().optional(), - policy_family_id: z.string().optional(), - policy_family_definition_overrides: z.string().optional(), - max_clusters_per_user: z.number().optional(), - libraries: z.array(z.lazy(() => unmarshalLibrarySchema)).optional(), - }) - .transform(d => ({ - name: d.name, - definition: d.definition, - description: d.description, - policyFamilyId: d.policy_family_id, - policyFamilyDefinitionOverrides: d.policy_family_definition_overrides, - maxClustersPerUser: d.max_clusters_per_user, - libraries: d.libraries, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreatePolicy_ResponseSchema: z.ZodType = z @@ -277,40 +255,10 @@ export const unmarshalCreatePolicy_ResponseSchema: z.ZodType = z - .object({ - policy_id: z.string().optional(), - }) - .transform(d => ({ - policyId: d.policy_id, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeletePolicy_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalEditPolicySchema: z.ZodType = z - .object({ - policy_id: z.string().optional(), - name: z.string().optional(), - definition: z.string().optional(), - description: z.string().optional(), - policy_family_id: z.string().optional(), - policy_family_definition_overrides: z.string().optional(), - max_clusters_per_user: z.number().optional(), - libraries: z.array(z.lazy(() => unmarshalLibrarySchema)).optional(), - }) - .transform(d => ({ - policyId: d.policy_id, - name: d.name, - definition: d.definition, - description: d.description, - policyFamilyId: d.policy_family_id, - policyFamilyDefinitionOverrides: d.policy_family_definition_overrides, - maxClustersPerUser: d.max_clusters_per_user, - libraries: d.libraries, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalEditPolicy_ResponseSchema: z.ZodType = z.object({}); @@ -425,15 +373,6 @@ export const marshalCreatePolicySchema: z.ZodType = z libraries: d.libraries, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreatePolicy_ResponseSchema: z.ZodType = z - .object({ - policyId: z.string().optional(), - }) - .transform(d => ({ - policy_id: d.policyId, - })); - export const marshalDeletePolicySchema: z.ZodType = z .object({ policyId: z.string().optional(), @@ -442,9 +381,6 @@ export const marshalDeletePolicySchema: z.ZodType = z policy_id: d.policyId, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeletePolicy_ResponseSchema: z.ZodType = z.object({}); - export const marshalEditPolicySchema: z.ZodType = z .object({ policyId: z.string().optional(), @@ -467,9 +403,6 @@ export const marshalEditPolicySchema: z.ZodType = z libraries: d.libraries, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalEditPolicy_ResponseSchema: z.ZodType = z.object({}); - export const marshalLibrarySchema: z.ZodType = z .object({ jar: z.string().optional(), @@ -490,15 +423,6 @@ export const marshalLibrarySchema: z.ZodType = z requirements: d.requirements, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListPolicies_ResponseSchema: z.ZodType = z - .object({ - policies: z.array(z.lazy(() => marshalPolicySchema)).optional(), - }) - .transform(d => ({ - policies: d.policies, - })); - export const marshalMavenLibrarySchema: z.ZodType = z .object({ coordinates: z.string().optional(), @@ -511,34 +435,6 @@ export const marshalMavenLibrarySchema: z.ZodType = z exclusions: d.exclusions, })); -export const marshalPolicySchema: z.ZodType = z - .object({ - policyId: z.string().optional(), - creatorUserName: z.string().optional(), - createdAtTimestamp: z.number().optional(), - isDefault: z.boolean().optional(), - name: z.string().optional(), - definition: z.string().optional(), - description: z.string().optional(), - policyFamilyId: z.string().optional(), - policyFamilyDefinitionOverrides: z.string().optional(), - maxClustersPerUser: z.number().optional(), - libraries: z.array(z.lazy(() => marshalLibrarySchema)).optional(), - }) - .transform(d => ({ - policy_id: d.policyId, - creator_user_name: d.creatorUserName, - created_at_timestamp: d.createdAtTimestamp, - is_default: d.isDefault, - name: d.name, - definition: d.definition, - description: d.description, - policy_family_id: d.policyFamilyId, - policy_family_definition_overrides: d.policyFamilyDefinitionOverrides, - max_clusters_per_user: d.maxClustersPerUser, - libraries: d.libraries, - })); - export const marshalPythonPyPiLibrarySchema: z.ZodType = z .object({ package: z.string().optional(), @@ -558,188 +454,3 @@ export const marshalRCranLibrarySchema: z.ZodType = z package: d.package, repo: d.repo, })); - -const createPolicyFieldMaskSchema: FieldMaskSchema = { - definition: {wire: 'definition'}, - description: {wire: 'description'}, - libraries: {wire: 'libraries'}, - maxClustersPerUser: {wire: 'max_clusters_per_user'}, - name: {wire: 'name'}, - policyFamilyDefinitionOverrides: {wire: 'policy_family_definition_overrides'}, - policyFamilyId: {wire: 'policy_family_id'}, -}; - -export function createPolicyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createPolicyFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createPolicy_ResponseFieldMaskSchema: FieldMaskSchema = { - policyId: {wire: 'policy_id'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createPolicy_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createPolicy_ResponseFieldMaskSchema - ); -} - -const deletePolicyFieldMaskSchema: FieldMaskSchema = { - policyId: {wire: 'policy_id'}, -}; - -export function deletePolicyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deletePolicyFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deletePolicy_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deletePolicy_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deletePolicy_ResponseFieldMaskSchema - ); -} - -const editPolicyFieldMaskSchema: FieldMaskSchema = { - definition: {wire: 'definition'}, - description: {wire: 'description'}, - libraries: {wire: 'libraries'}, - maxClustersPerUser: {wire: 'max_clusters_per_user'}, - name: {wire: 'name'}, - policyFamilyDefinitionOverrides: {wire: 'policy_family_definition_overrides'}, - policyFamilyId: {wire: 'policy_family_id'}, - policyId: {wire: 'policy_id'}, -}; - -export function editPolicyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, editPolicyFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const editPolicy_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function editPolicy_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - editPolicy_ResponseFieldMaskSchema - ); -} - -const getPolicyFieldMaskSchema: FieldMaskSchema = { - policyId: {wire: 'policy_id'}, -}; - -export function getPolicyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getPolicyFieldMaskSchema); -} - -const libraryFieldMaskSchema: FieldMaskSchema = { - cran: {wire: 'cran', children: () => rCranLibraryFieldMaskSchema}, - egg: {wire: 'egg'}, - jar: {wire: 'jar'}, - maven: {wire: 'maven', children: () => mavenLibraryFieldMaskSchema}, - pypi: {wire: 'pypi', children: () => pythonPyPiLibraryFieldMaskSchema}, - requirements: {wire: 'requirements'}, - whl: {wire: 'whl'}, -}; - -export function libraryFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, libraryFieldMaskSchema); -} - -const listPoliciesFieldMaskSchema: FieldMaskSchema = { - sortColumn: {wire: 'sort_column'}, - sortOrder: {wire: 'sort_order'}, -}; - -export function listPoliciesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listPoliciesFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listPolicies_ResponseFieldMaskSchema: FieldMaskSchema = { - policies: {wire: 'policies'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listPolicies_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPolicies_ResponseFieldMaskSchema - ); -} - -const mavenLibraryFieldMaskSchema: FieldMaskSchema = { - coordinates: {wire: 'coordinates'}, - exclusions: {wire: 'exclusions'}, - repo: {wire: 'repo'}, -}; - -export function mavenLibraryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, mavenLibraryFieldMaskSchema); -} - -const policyFieldMaskSchema: FieldMaskSchema = { - createdAtTimestamp: {wire: 'created_at_timestamp'}, - creatorUserName: {wire: 'creator_user_name'}, - definition: {wire: 'definition'}, - description: {wire: 'description'}, - isDefault: {wire: 'is_default'}, - libraries: {wire: 'libraries'}, - maxClustersPerUser: {wire: 'max_clusters_per_user'}, - name: {wire: 'name'}, - policyFamilyDefinitionOverrides: {wire: 'policy_family_definition_overrides'}, - policyFamilyId: {wire: 'policy_family_id'}, - policyId: {wire: 'policy_id'}, -}; - -export function policyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, policyFieldMaskSchema); -} - -const pythonPyPiLibraryFieldMaskSchema: FieldMaskSchema = { - package: {wire: 'package'}, - repo: {wire: 'repo'}, -}; - -export function pythonPyPiLibraryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - pythonPyPiLibraryFieldMaskSchema - ); -} - -const rCranLibraryFieldMaskSchema: FieldMaskSchema = { - package: {wire: 'package'}, - repo: {wire: 'repo'}, -}; - -export function rCranLibraryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, rCranLibraryFieldMaskSchema); -} diff --git a/packages/connections/src/v1/model.ts b/packages/connections/src/v1/model.ts index cee14c20..219a6da7 100644 --- a/packages/connections/src/v1/model.ts +++ b/packages/connections/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Next Id: 77 */ @@ -380,56 +378,6 @@ export const unmarshalConnectionInfoSchema: z.ZodType = z properties: d.properties, })); -export const unmarshalCreateConnectionSchema: z.ZodType = z - .object({ - parent: z.string().optional(), - name: z.string().optional(), - connection_type: z.enum(ConnectionType).optional(), - owner: z.string().optional(), - read_only: z.boolean().optional(), - comment: z.string().optional(), - environment_settings: z - .lazy(() => unmarshalEnvironmentSettingsSchema) - .optional(), - full_name: z.string().optional(), - url: z.string().optional(), - credential_type: z.enum(CredentialType).optional(), - connection_id: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - securable_type: z.enum(SecurableType).optional(), - provisioning_info: z.lazy(() => unmarshalProvisioningInfoSchema).optional(), - options: z.record(z.string(), z.string()).optional(), - secrets: z.record(z.string(), z.string()).optional(), - properties: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - parent: d.parent, - name: d.name, - connectionType: d.connection_type, - owner: d.owner, - readOnly: d.read_only, - comment: d.comment, - environmentSettings: d.environment_settings, - fullName: d.full_name, - url: d.url, - credentialType: d.credential_type, - connectionId: d.connection_id, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - securableType: d.securable_type, - provisioningInfo: d.provisioning_info, - options: d.options, - secrets: d.secrets, - properties: d.properties, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeleteConnection_ResponseSchema: z.ZodType = z.object({}); @@ -467,106 +415,6 @@ export const unmarshalProvisioningInfoSchema: z.ZodType = z state: d.state, })); -export const unmarshalUpdateConnectionSchema: z.ZodType = z - .object({ - name_arg: z.string().optional(), - new_name: z.string().optional(), - name: z.string().optional(), - connection_type: z.enum(ConnectionType).optional(), - owner: z.string().optional(), - read_only: z.boolean().optional(), - comment: z.string().optional(), - environment_settings: z - .lazy(() => unmarshalEnvironmentSettingsSchema) - .optional(), - full_name: z.string().optional(), - url: z.string().optional(), - credential_type: z.enum(CredentialType).optional(), - connection_id: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - securable_type: z.enum(SecurableType).optional(), - provisioning_info: z.lazy(() => unmarshalProvisioningInfoSchema).optional(), - options: z.record(z.string(), z.string()).optional(), - secrets: z.record(z.string(), z.string()).optional(), - properties: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - nameArg: d.name_arg, - newName: d.new_name, - name: d.name, - connectionType: d.connection_type, - owner: d.owner, - readOnly: d.read_only, - comment: d.comment, - environmentSettings: d.environment_settings, - fullName: d.full_name, - url: d.url, - credentialType: d.credential_type, - connectionId: d.connection_id, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - securableType: d.securable_type, - provisioningInfo: d.provisioning_info, - options: d.options, - secrets: d.secrets, - properties: d.properties, - })); - -export const marshalConnectionInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - connectionType: z.enum(ConnectionType).optional(), - owner: z.string().optional(), - readOnly: z.boolean().optional(), - comment: z.string().optional(), - environmentSettings: z - .lazy(() => marshalEnvironmentSettingsSchema) - .optional(), - fullName: z.string().optional(), - url: z.string().optional(), - credentialType: z.enum(CredentialType).optional(), - connectionId: z.string().optional(), - metastoreId: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - securableType: z.enum(SecurableType).optional(), - provisioningInfo: z.lazy(() => marshalProvisioningInfoSchema).optional(), - options: z.record(z.string(), z.string()).optional(), - secrets: z.record(z.string(), z.string()).optional(), - properties: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - name: d.name, - connection_type: d.connectionType, - owner: d.owner, - read_only: d.readOnly, - comment: d.comment, - environment_settings: d.environmentSettings, - full_name: d.fullName, - url: d.url, - credential_type: d.credentialType, - connection_id: d.connectionId, - metastore_id: d.metastoreId, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - securable_type: d.securableType, - provisioning_info: d.provisioningInfo, - options: d.options, - secrets: d.secrets, - properties: d.properties, - })); - export const marshalCreateConnectionSchema: z.ZodType = z .object({ parent: z.string().optional(), @@ -617,9 +465,6 @@ export const marshalCreateConnectionSchema: z.ZodType = z properties: d.properties, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteConnection_ResponseSchema: z.ZodType = z.object({}); - export const marshalEnvironmentSettingsSchema: z.ZodType = z .object({ javaDependencies: z.array(z.string()).optional(), @@ -630,17 +475,6 @@ export const marshalEnvironmentSettingsSchema: z.ZodType = z environment_version: d.environmentVersion, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListConnections_ResponseSchema: z.ZodType = z - .object({ - connections: z.array(z.lazy(() => marshalConnectionInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - connections: d.connections, - next_page_token: d.nextPageToken, - })); - export const marshalProvisioningInfoSchema: z.ZodType = z .object({ state: z.enum(ProvisioningInfo_State).optional(), @@ -700,355 +534,3 @@ export const marshalUpdateConnectionSchema: z.ZodType = z secrets: d.secrets, properties: d.properties, })); - -const connectionInfoFieldMaskSchema: FieldMaskSchema = { - comment: {wire: 'comment'}, - connectionId: {wire: 'connection_id'}, - connectionType: {wire: 'connection_type'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - credentialType: {wire: 'credential_type'}, - environmentSettings: { - wire: 'environment_settings', - children: () => environmentSettingsFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - options: {wire: 'options'}, - owner: {wire: 'owner'}, - properties: {wire: 'properties'}, - provisioningInfo: { - wire: 'provisioning_info', - children: () => provisioningInfoFieldMaskSchema, - }, - readOnly: {wire: 'read_only'}, - secrets: {wire: 'secrets'}, - securableType: {wire: 'securable_type'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - url: {wire: 'url'}, -}; - -export function connectionInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, connectionInfoFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const connectionInfo_OptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function connectionInfo_OptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - connectionInfo_OptionsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const connectionInfo_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function connectionInfo_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - connectionInfo_PropertiesEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const connectionInfo_SecretsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function connectionInfo_SecretsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - connectionInfo_SecretsEntryFieldMaskSchema - ); -} - -const createConnectionFieldMaskSchema: FieldMaskSchema = { - comment: {wire: 'comment'}, - connectionId: {wire: 'connection_id'}, - connectionType: {wire: 'connection_type'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - credentialType: {wire: 'credential_type'}, - environmentSettings: { - wire: 'environment_settings', - children: () => environmentSettingsFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - options: {wire: 'options'}, - owner: {wire: 'owner'}, - parent: {wire: 'parent'}, - properties: {wire: 'properties'}, - provisioningInfo: { - wire: 'provisioning_info', - children: () => provisioningInfoFieldMaskSchema, - }, - readOnly: {wire: 'read_only'}, - secrets: {wire: 'secrets'}, - securableType: {wire: 'securable_type'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - url: {wire: 'url'}, -}; - -export function createConnectionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createConnectionFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createConnection_OptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createConnection_OptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createConnection_OptionsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createConnection_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createConnection_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createConnection_PropertiesEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createConnection_SecretsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createConnection_SecretsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createConnection_SecretsEntryFieldMaskSchema - ); -} - -const deleteConnectionFieldMaskSchema: FieldMaskSchema = { - nameArg: {wire: 'name_arg'}, -}; - -export function deleteConnectionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteConnectionFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteConnection_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteConnection_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteConnection_ResponseFieldMaskSchema - ); -} - -const environmentSettingsFieldMaskSchema: FieldMaskSchema = { - environmentVersion: {wire: 'environment_version'}, - javaDependencies: {wire: 'java_dependencies'}, -}; - -export function environmentSettingsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - environmentSettingsFieldMaskSchema - ); -} - -const getConnectionFieldMaskSchema: FieldMaskSchema = { - nameArg: {wire: 'name_arg'}, -}; - -export function getConnectionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, getConnectionFieldMaskSchema); -} - -const listConnectionsFieldMaskSchema: FieldMaskSchema = { - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, - parent: {wire: 'parent'}, -}; - -export function listConnectionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listConnectionsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listConnections_ResponseFieldMaskSchema: FieldMaskSchema = { - connections: {wire: 'connections'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listConnections_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listConnections_ResponseFieldMaskSchema - ); -} - -const provisioningInfoFieldMaskSchema: FieldMaskSchema = { - state: {wire: 'state'}, -}; - -export function provisioningInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - provisioningInfoFieldMaskSchema - ); -} - -const updateConnectionFieldMaskSchema: FieldMaskSchema = { - comment: {wire: 'comment'}, - connectionId: {wire: 'connection_id'}, - connectionType: {wire: 'connection_type'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - credentialType: {wire: 'credential_type'}, - environmentSettings: { - wire: 'environment_settings', - children: () => environmentSettingsFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - nameArg: {wire: 'name_arg'}, - newName: {wire: 'new_name'}, - options: {wire: 'options'}, - owner: {wire: 'owner'}, - properties: {wire: 'properties'}, - provisioningInfo: { - wire: 'provisioning_info', - children: () => provisioningInfoFieldMaskSchema, - }, - readOnly: {wire: 'read_only'}, - secrets: {wire: 'secrets'}, - securableType: {wire: 'securable_type'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - url: {wire: 'url'}, -}; - -export function updateConnectionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateConnectionFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateConnection_OptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateConnection_OptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateConnection_OptionsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateConnection_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateConnection_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateConnection_PropertiesEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateConnection_SecretsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateConnection_SecretsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateConnection_SecretsEntryFieldMaskSchema - ); -} diff --git a/packages/credentials/src/v1/model.ts b/packages/credentials/src/v1/model.ts index 676d15b9..0ca94836 100644 --- a/packages/credentials/src/v1/model.ts +++ b/packages/credentials/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum IsolationMode { @@ -963,119 +961,6 @@ export const unmarshalCloudflareApiTokenSchema: z.ZodType = accountId: d.account_id, })); -export const unmarshalCreateCredentialSchema: z.ZodType = z - .object({ - skip_validation: z.boolean().optional(), - name: z.string().optional(), - aws_iam_role: z.lazy(() => unmarshalAwsIamRoleSchema).optional(), - azure_service_principal: z - .lazy(() => unmarshalAzureServicePrincipalSchema) - .optional(), - gcp_service_account_key: z - .lazy(() => unmarshalGcpServiceAccountKeySchema) - .optional(), - azure_managed_identity: z - .lazy(() => unmarshalAzureManagedIdentitySchema) - .optional(), - databricks_gcp_service_account: z - .lazy(() => unmarshalDatabricksGcpServiceAccountSchema) - .optional(), - cloudflare_api_token: z - .lazy(() => unmarshalCloudflareApiTokenSchema) - .optional(), - comment: z.string().optional(), - read_only: z.boolean().optional(), - owner: z.string().optional(), - id: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - used_for_managed_storage: z.boolean().optional(), - full_name: z.string().optional(), - isolation_mode: z.enum(IsolationMode).optional(), - }) - .transform(d => ({ - skipValidation: d.skip_validation, - name: d.name, - awsIamRole: d.aws_iam_role, - azureServicePrincipal: d.azure_service_principal, - gcpServiceAccountKey: d.gcp_service_account_key, - azureManagedIdentity: d.azure_managed_identity, - databricksGcpServiceAccount: d.databricks_gcp_service_account, - cloudflareApiToken: d.cloudflare_api_token, - comment: d.comment, - readOnly: d.read_only, - owner: d.owner, - id: d.id, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - usedForManagedStorage: d.used_for_managed_storage, - fullName: d.full_name, - isolationMode: d.isolation_mode, - })); - -export const unmarshalCreateStorageCredentialSchema: z.ZodType = - z - .object({ - skip_validation: z.boolean().optional(), - name: z.string().optional(), - aws_iam_role: z.lazy(() => unmarshalAwsIamRoleSchema).optional(), - azure_service_principal: z - .lazy(() => unmarshalAzureServicePrincipalSchema) - .optional(), - gcp_service_account_key: z - .lazy(() => unmarshalGcpServiceAccountKeySchema) - .optional(), - azure_managed_identity: z - .lazy(() => unmarshalAzureManagedIdentitySchema) - .optional(), - databricks_gcp_service_account: z - .lazy(() => unmarshalDatabricksGcpServiceAccountSchema) - .optional(), - cloudflare_api_token: z - .lazy(() => unmarshalCloudflareApiTokenSchema) - .optional(), - comment: z.string().optional(), - read_only: z.boolean().optional(), - owner: z.string().optional(), - id: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - used_for_managed_storage: z.boolean().optional(), - full_name: z.string().optional(), - isolation_mode: z.enum(IsolationMode).optional(), - }) - .transform(d => ({ - skipValidation: d.skip_validation, - name: d.name, - awsIamRole: d.aws_iam_role, - azureServicePrincipal: d.azure_service_principal, - gcpServiceAccountKey: d.gcp_service_account_key, - azureManagedIdentity: d.azure_managed_identity, - databricksGcpServiceAccount: d.databricks_gcp_service_account, - cloudflareApiToken: d.cloudflare_api_token, - comment: d.comment, - readOnly: d.read_only, - owner: d.owner, - id: d.id, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - usedForManagedStorage: d.used_for_managed_storage, - fullName: d.full_name, - isolationMode: d.isolation_mode, - })); - export const unmarshalCredentialInfoSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -1172,19 +1057,6 @@ export const unmarshalGcpServiceAccountKeySchema: z.ZodType = - z - .object({ - url: z.string().optional(), - operation: z.enum(PathOperation).optional(), - dry_run: z.boolean().optional(), - }) - .transform(d => ({ - url: d.url, - operation: d.operation, - dryRun: d.dry_run, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalGenerateTemporaryPathCredential_ResponseSchema: z.ZodType = z @@ -1219,58 +1091,6 @@ export const unmarshalGenerateTemporaryPathCredential_ResponseSchema: z.ZodType< url: d.url, })); -export const unmarshalGenerateTemporaryServiceCredentialSchema: z.ZodType = - z - .object({ - credential_name: z.string().optional(), - azure_options: z - .lazy( - () => unmarshalGenerateTemporaryServiceCredential_AzureOptionsSchema - ) - .optional(), - gcp_options: z - .lazy( - () => unmarshalGenerateTemporaryServiceCredential_GcpOptionsSchema - ) - .optional(), - }) - .transform(d => ({ - credentialName: d.credential_name, - azureOptions: d.azure_options, - gcpOptions: d.gcp_options, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const unmarshalGenerateTemporaryServiceCredential_AzureOptionsSchema: z.ZodType = - z - .object({ - resources: z.array(z.string()).optional(), - }) - .transform(d => ({ - resources: d.resources, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const unmarshalGenerateTemporaryServiceCredential_GcpOptionsSchema: z.ZodType = - z - .object({ - scopes: z.array(z.string()).optional(), - }) - .transform(d => ({ - scopes: d.scopes, - })); - -export const unmarshalGenerateTemporaryTableCredentialSchema: z.ZodType = - z - .object({ - table_id: z.string().optional(), - operation: z.enum(TableOperation).optional(), - }) - .transform(d => ({ - tableId: d.table_id, - operation: d.operation, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalGenerateTemporaryTableCredential_ResponseSchema: z.ZodType = z @@ -1305,17 +1125,6 @@ export const unmarshalGenerateTemporaryTableCredential_ResponseSchema: z.ZodType url: d.url, })); -export const unmarshalGenerateTemporaryVolumeCredentialSchema: z.ZodType = - z - .object({ - volume_id: z.string().optional(), - operation: z.enum(VolumeOperation).optional(), - }) - .transform(d => ({ - volumeId: d.volume_id, - operation: d.operation, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalGenerateTemporaryVolumeCredential_ResponseSchema: z.ZodType = z @@ -1486,164 +1295,14 @@ export const unmarshalUcEncryptedTokenSchema: z.ZodType = z encryptedPayload: d.encrypted_payload, })); -export const unmarshalUpdateCredentialSchema: z.ZodType = z - .object({ - name_arg: z.string().optional(), - new_name: z.string().optional(), - skip_validation: z.boolean().optional(), - force: z.boolean().optional(), - name: z.string().optional(), - aws_iam_role: z.lazy(() => unmarshalAwsIamRoleSchema).optional(), - azure_service_principal: z - .lazy(() => unmarshalAzureServicePrincipalSchema) - .optional(), - gcp_service_account_key: z - .lazy(() => unmarshalGcpServiceAccountKeySchema) - .optional(), - azure_managed_identity: z - .lazy(() => unmarshalAzureManagedIdentitySchema) - .optional(), - databricks_gcp_service_account: z - .lazy(() => unmarshalDatabricksGcpServiceAccountSchema) - .optional(), - cloudflare_api_token: z - .lazy(() => unmarshalCloudflareApiTokenSchema) - .optional(), - comment: z.string().optional(), - read_only: z.boolean().optional(), - owner: z.string().optional(), - id: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - used_for_managed_storage: z.boolean().optional(), - full_name: z.string().optional(), - isolation_mode: z.enum(IsolationMode).optional(), - }) - .transform(d => ({ - nameArg: d.name_arg, - newName: d.new_name, - skipValidation: d.skip_validation, - force: d.force, - name: d.name, - awsIamRole: d.aws_iam_role, - azureServicePrincipal: d.azure_service_principal, - gcpServiceAccountKey: d.gcp_service_account_key, - azureManagedIdentity: d.azure_managed_identity, - databricksGcpServiceAccount: d.databricks_gcp_service_account, - cloudflareApiToken: d.cloudflare_api_token, - comment: d.comment, - readOnly: d.read_only, - owner: d.owner, - id: d.id, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - usedForManagedStorage: d.used_for_managed_storage, - fullName: d.full_name, - isolationMode: d.isolation_mode, - })); - -export const unmarshalUpdateStorageCredentialSchema: z.ZodType = +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +export const unmarshalValidateCredential_ResponseSchema: z.ZodType = z .object({ - name_arg: z.string().optional(), - new_name: z.string().optional(), - skip_validation: z.boolean().optional(), - force: z.boolean().optional(), - name: z.string().optional(), - aws_iam_role: z.lazy(() => unmarshalAwsIamRoleSchema).optional(), - azure_service_principal: z - .lazy(() => unmarshalAzureServicePrincipalSchema) - .optional(), - gcp_service_account_key: z - .lazy(() => unmarshalGcpServiceAccountKeySchema) - .optional(), - azure_managed_identity: z - .lazy(() => unmarshalAzureManagedIdentitySchema) - .optional(), - databricks_gcp_service_account: z - .lazy(() => unmarshalDatabricksGcpServiceAccountSchema) - .optional(), - cloudflare_api_token: z - .lazy(() => unmarshalCloudflareApiTokenSchema) + results: z + .array(z.lazy(() => unmarshalValidateCredential_ValidationResultSchema)) .optional(), - comment: z.string().optional(), - read_only: z.boolean().optional(), - owner: z.string().optional(), - id: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - used_for_managed_storage: z.boolean().optional(), - full_name: z.string().optional(), - isolation_mode: z.enum(IsolationMode).optional(), - }) - .transform(d => ({ - nameArg: d.name_arg, - newName: d.new_name, - skipValidation: d.skip_validation, - force: d.force, - name: d.name, - awsIamRole: d.aws_iam_role, - azureServicePrincipal: d.azure_service_principal, - gcpServiceAccountKey: d.gcp_service_account_key, - azureManagedIdentity: d.azure_managed_identity, - databricksGcpServiceAccount: d.databricks_gcp_service_account, - cloudflareApiToken: d.cloudflare_api_token, - comment: d.comment, - readOnly: d.read_only, - owner: d.owner, - id: d.id, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - usedForManagedStorage: d.used_for_managed_storage, - fullName: d.full_name, - isolationMode: d.isolation_mode, - })); - -export const unmarshalValidateCredentialSchema: z.ZodType = - z - .object({ - credential_name: z.string().optional(), - aws_iam_role: z.lazy(() => unmarshalAwsIamRoleSchema).optional(), - azure_managed_identity: z - .lazy(() => unmarshalAzureManagedIdentitySchema) - .optional(), - databricks_gcp_service_account: z - .lazy(() => unmarshalDatabricksGcpServiceAccountSchema) - .optional(), - external_location_name: z.string().optional(), - url: z.string().optional(), - read_only: z.boolean().optional(), - }) - .transform(d => ({ - credentialName: d.credential_name, - awsIamRole: d.aws_iam_role, - azureManagedIdentity: d.azure_managed_identity, - databricksGcpServiceAccount: d.databricks_gcp_service_account, - externalLocationName: d.external_location_name, - url: d.url, - readOnly: d.read_only, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const unmarshalValidateCredential_ResponseSchema: z.ZodType = - z - .object({ - results: z - .array(z.lazy(() => unmarshalValidateCredential_ValidationResultSchema)) - .optional(), - isDir: z.boolean().optional(), + isDir: z.boolean().optional(), }) .transform(d => ({ results: d.results, @@ -1662,39 +1321,6 @@ export const unmarshalValidateCredential_ValidationResultSchema: z.ZodType = - z - .object({ - storage_credential_name: z.string().optional(), - aws_iam_role: z.lazy(() => unmarshalAwsIamRoleSchema).optional(), - azure_service_principal: z - .lazy(() => unmarshalAzureServicePrincipalSchema) - .optional(), - azure_managed_identity: z - .lazy(() => unmarshalAzureManagedIdentitySchema) - .optional(), - databricks_gcp_service_account: z - .lazy(() => unmarshalDatabricksGcpServiceAccountSchema) - .optional(), - cloudflare_api_token: z - .lazy(() => unmarshalCloudflareApiTokenSchema) - .optional(), - external_location_name: z.string().optional(), - url: z.string().optional(), - read_only: z.boolean().optional(), - }) - .transform(d => ({ - storageCredentialName: d.storage_credential_name, - awsIamRole: d.aws_iam_role, - azureServicePrincipal: d.azure_service_principal, - azureManagedIdentity: d.azure_managed_identity, - databricksGcpServiceAccount: d.databricks_gcp_service_account, - cloudflareApiToken: d.cloudflare_api_token, - externalLocationName: d.external_location_name, - url: d.url, - readOnly: d.read_only, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalValidateStorageCredential_ResponseSchema: z.ZodType = z @@ -1727,20 +1353,6 @@ export const unmarshalValidateStorageCredential_ValidationResultSchema: z.ZodTyp message: d.message, })); -export const marshalAwsCredentialsSchema: z.ZodType = z - .object({ - accessKeyId: z.string().optional(), - secretAccessKey: z.string().optional(), - sessionToken: z.string().optional(), - accessPoint: z.string().optional(), - }) - .transform(d => ({ - access_key_id: d.accessKeyId, - secret_access_key: d.secretAccessKey, - session_token: d.sessionToken, - access_point: d.accessPoint, - })); - export const marshalAwsIamRoleSchema: z.ZodType = z .object({ roleArn: z.string().optional(), @@ -1753,14 +1365,6 @@ export const marshalAwsIamRoleSchema: z.ZodType = z external_id: d.externalId, })); -export const marshalAzureActiveDirectoryTokenSchema: z.ZodType = z - .object({ - aadToken: z.string().optional(), - }) - .transform(d => ({ - aad_token: d.aadToken, - })); - export const marshalAzureManagedIdentitySchema: z.ZodType = z .object({ accessConnectorId: z.string().optional(), @@ -1785,14 +1389,6 @@ export const marshalAzureServicePrincipalSchema: z.ZodType = z client_secret: d.clientSecret, })); -export const marshalAzureUserDelegationSasSchema: z.ZodType = z - .object({ - sasToken: z.string().optional(), - }) - .transform(d => ({ - sas_token: d.sasToken, - })); - export const marshalCloudflareApiTokenSchema: z.ZodType = z .object({ accessKeyId: z.string().optional(), @@ -1917,60 +1513,6 @@ export const marshalCreateStorageCredentialSchema: z.ZodType = z isolation_mode: d.isolationMode, })); -export const marshalCredentialInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - awsIamRole: z.lazy(() => marshalAwsIamRoleSchema).optional(), - azureServicePrincipal: z - .lazy(() => marshalAzureServicePrincipalSchema) - .optional(), - gcpServiceAccountKey: z - .lazy(() => marshalGcpServiceAccountKeySchema) - .optional(), - azureManagedIdentity: z - .lazy(() => marshalAzureManagedIdentitySchema) - .optional(), - databricksGcpServiceAccount: z - .lazy(() => marshalDatabricksGcpServiceAccountSchema) - .optional(), - cloudflareApiToken: z - .lazy(() => marshalCloudflareApiTokenSchema) - .optional(), - comment: z.string().optional(), - readOnly: z.boolean().optional(), - owner: z.string().optional(), - id: z.string().optional(), - metastoreId: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - usedForManagedStorage: z.boolean().optional(), - fullName: z.string().optional(), - isolationMode: z.enum(IsolationMode).optional(), - }) - .transform(d => ({ - name: d.name, - aws_iam_role: d.awsIamRole, - azure_service_principal: d.azureServicePrincipal, - gcp_service_account_key: d.gcpServiceAccountKey, - azure_managed_identity: d.azureManagedIdentity, - databricks_gcp_service_account: d.databricksGcpServiceAccount, - cloudflare_api_token: d.cloudflareApiToken, - comment: d.comment, - read_only: d.readOnly, - owner: d.owner, - id: d.id, - metastore_id: d.metastoreId, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - used_for_managed_storage: d.usedForManagedStorage, - full_name: d.fullName, - isolation_mode: d.isolationMode, - })); - export const marshalDatabricksGcpServiceAccountSchema: z.ZodType = z .object({ email: z.string().optional(), @@ -1983,21 +1525,6 @@ export const marshalDatabricksGcpServiceAccountSchema: z.ZodType = z credential_id: d.credentialId, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteCredential_ResponseSchema: z.ZodType = z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteStorageCredential_ResponseSchema: z.ZodType = - z.object({}); - -export const marshalGcpOauthTokenSchema: z.ZodType = z - .object({ - oauthToken: z.string().optional(), - }) - .transform(d => ({ - oauth_token: d.oauthToken, - })); - export const marshalGcpServiceAccountKeySchema: z.ZodType = z .object({ email: z.string().optional(), @@ -2022,32 +1549,6 @@ export const marshalGenerateTemporaryPathCredentialSchema: z.ZodType = z dry_run: d.dryRun, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGenerateTemporaryPathCredential_ResponseSchema: z.ZodType = - z - .object({ - awsTempCredentials: z.lazy(() => marshalAwsCredentialsSchema).optional(), - azureUserDelegationSas: z - .lazy(() => marshalAzureUserDelegationSasSchema) - .optional(), - gcpOauthToken: z.lazy(() => marshalGcpOauthTokenSchema).optional(), - azureAad: z.lazy(() => marshalAzureActiveDirectoryTokenSchema).optional(), - r2TempCredentials: z.lazy(() => marshalR2CredentialsSchema).optional(), - ucEncryptedToken: z.lazy(() => marshalUcEncryptedTokenSchema).optional(), - expirationTime: z.number().optional(), - url: z.string().optional(), - }) - .transform(d => ({ - aws_temp_credentials: d.awsTempCredentials, - azure_user_delegation_sas: d.azureUserDelegationSas, - gcp_oauth_token: d.gcpOauthToken, - azure_aad: d.azureAad, - r2_temp_credentials: d.r2TempCredentials, - uc_encrypted_token: d.ucEncryptedToken, - expiration_time: d.expirationTime, - url: d.url, - })); - export const marshalGenerateTemporaryServiceCredentialSchema: z.ZodType = z .object({ credentialName: z.string().optional(), @@ -2094,32 +1595,6 @@ export const marshalGenerateTemporaryTableCredentialSchema: z.ZodType = z operation: d.operation, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGenerateTemporaryTableCredential_ResponseSchema: z.ZodType = - z - .object({ - awsTempCredentials: z.lazy(() => marshalAwsCredentialsSchema).optional(), - azureUserDelegationSas: z - .lazy(() => marshalAzureUserDelegationSasSchema) - .optional(), - gcpOauthToken: z.lazy(() => marshalGcpOauthTokenSchema).optional(), - azureAad: z.lazy(() => marshalAzureActiveDirectoryTokenSchema).optional(), - r2TempCredentials: z.lazy(() => marshalR2CredentialsSchema).optional(), - ucEncryptedToken: z.lazy(() => marshalUcEncryptedTokenSchema).optional(), - expirationTime: z.number().optional(), - url: z.string().optional(), - }) - .transform(d => ({ - aws_temp_credentials: d.awsTempCredentials, - azure_user_delegation_sas: d.azureUserDelegationSas, - gcp_oauth_token: d.gcpOauthToken, - azure_aad: d.azureAad, - r2_temp_credentials: d.r2TempCredentials, - uc_encrypted_token: d.ucEncryptedToken, - expiration_time: d.expirationTime, - url: d.url, - })); - export const marshalGenerateTemporaryVolumeCredentialSchema: z.ZodType = z .object({ volumeId: z.string().optional(), @@ -2130,154 +1605,6 @@ export const marshalGenerateTemporaryVolumeCredentialSchema: z.ZodType = z operation: d.operation, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGenerateTemporaryVolumeCredential_ResponseSchema: z.ZodType = - z - .object({ - awsTempCredentials: z.lazy(() => marshalAwsCredentialsSchema).optional(), - azureUserDelegationSas: z - .lazy(() => marshalAzureUserDelegationSasSchema) - .optional(), - gcpOauthToken: z.lazy(() => marshalGcpOauthTokenSchema).optional(), - azureAad: z.lazy(() => marshalAzureActiveDirectoryTokenSchema).optional(), - r2TempCredentials: z.lazy(() => marshalR2CredentialsSchema).optional(), - ucEncryptedToken: z.lazy(() => marshalUcEncryptedTokenSchema).optional(), - expirationTime: z.number().optional(), - url: z.string().optional(), - }) - .transform(d => ({ - aws_temp_credentials: d.awsTempCredentials, - azure_user_delegation_sas: d.azureUserDelegationSas, - gcp_oauth_token: d.gcpOauthToken, - azure_aad: d.azureAad, - r2_temp_credentials: d.r2TempCredentials, - uc_encrypted_token: d.ucEncryptedToken, - expiration_time: d.expirationTime, - url: d.url, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListCredentials_ResponseSchema: z.ZodType = z - .object({ - credentials: z.array(z.lazy(() => marshalCredentialInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - credentials: d.credentials, - next_page_token: d.nextPageToken, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListStorageCredentials_ResponseSchema: z.ZodType = z - .object({ - storageCredentials: z - .array(z.lazy(() => marshalStorageCredentialInfoSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - storage_credentials: d.storageCredentials, - next_page_token: d.nextPageToken, - })); - -export const marshalR2CredentialsSchema: z.ZodType = z - .object({ - accessKeyId: z.string().optional(), - secretAccessKey: z.string().optional(), - sessionToken: z.string().optional(), - }) - .transform(d => ({ - access_key_id: d.accessKeyId, - secret_access_key: d.secretAccessKey, - session_token: d.sessionToken, - })); - -export const marshalStorageCredentialInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - awsIamRole: z.lazy(() => marshalAwsIamRoleSchema).optional(), - azureServicePrincipal: z - .lazy(() => marshalAzureServicePrincipalSchema) - .optional(), - gcpServiceAccountKey: z - .lazy(() => marshalGcpServiceAccountKeySchema) - .optional(), - azureManagedIdentity: z - .lazy(() => marshalAzureManagedIdentitySchema) - .optional(), - databricksGcpServiceAccount: z - .lazy(() => marshalDatabricksGcpServiceAccountSchema) - .optional(), - cloudflareApiToken: z - .lazy(() => marshalCloudflareApiTokenSchema) - .optional(), - comment: z.string().optional(), - readOnly: z.boolean().optional(), - owner: z.string().optional(), - id: z.string().optional(), - metastoreId: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - usedForManagedStorage: z.boolean().optional(), - fullName: z.string().optional(), - isolationMode: z.enum(IsolationMode).optional(), - }) - .transform(d => ({ - name: d.name, - aws_iam_role: d.awsIamRole, - azure_service_principal: d.azureServicePrincipal, - gcp_service_account_key: d.gcpServiceAccountKey, - azure_managed_identity: d.azureManagedIdentity, - databricks_gcp_service_account: d.databricksGcpServiceAccount, - cloudflare_api_token: d.cloudflareApiToken, - comment: d.comment, - read_only: d.readOnly, - owner: d.owner, - id: d.id, - metastore_id: d.metastoreId, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - used_for_managed_storage: d.usedForManagedStorage, - full_name: d.fullName, - isolation_mode: d.isolationMode, - })); - -export const marshalTemporaryCredentialsSchema: z.ZodType = z - .object({ - awsTempCredentials: z.lazy(() => marshalAwsCredentialsSchema).optional(), - azureUserDelegationSas: z - .lazy(() => marshalAzureUserDelegationSasSchema) - .optional(), - gcpOauthToken: z.lazy(() => marshalGcpOauthTokenSchema).optional(), - azureAad: z.lazy(() => marshalAzureActiveDirectoryTokenSchema).optional(), - r2TempCredentials: z.lazy(() => marshalR2CredentialsSchema).optional(), - ucEncryptedToken: z.lazy(() => marshalUcEncryptedTokenSchema).optional(), - expirationTime: z.number().optional(), - url: z.string().optional(), - }) - .transform(d => ({ - aws_temp_credentials: d.awsTempCredentials, - azure_user_delegation_sas: d.azureUserDelegationSas, - gcp_oauth_token: d.gcpOauthToken, - azure_aad: d.azureAad, - r2_temp_credentials: d.r2TempCredentials, - uc_encrypted_token: d.ucEncryptedToken, - expiration_time: d.expirationTime, - url: d.url, - })); - -export const marshalUcEncryptedTokenSchema: z.ZodType = z - .object({ - encryptedPayload: z.string().optional(), - }) - .transform(d => ({ - encrypted_payload: d.encryptedPayload, - })); - export const marshalUpdateCredentialSchema: z.ZodType = z .object({ nameArg: z.string().optional(), @@ -2426,30 +1753,6 @@ export const marshalValidateCredentialSchema: z.ZodType = z read_only: d.readOnly, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalValidateCredential_ResponseSchema: z.ZodType = z - .object({ - results: z - .array(z.lazy(() => marshalValidateCredential_ValidationResultSchema)) - .optional(), - isDir: z.boolean().optional(), - }) - .transform(d => ({ - results: d.results, - isDir: d.isDir, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalValidateCredential_ValidationResultSchema: z.ZodType = z - .object({ - result: z.enum(ValidateCredential_Result).optional(), - message: z.string().optional(), - }) - .transform(d => ({ - result: d.result, - message: d.message, - })); - export const marshalValidateStorageCredentialSchema: z.ZodType = z .object({ storageCredentialName: z.string().optional(), @@ -2481,996 +1784,3 @@ export const marshalValidateStorageCredentialSchema: z.ZodType = z url: d.url, read_only: d.readOnly, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalValidateStorageCredential_ResponseSchema: z.ZodType = z - .object({ - isDir: z.boolean().optional(), - results: z - .array( - z.lazy(() => marshalValidateStorageCredential_ValidationResultSchema) - ) - .optional(), - }) - .transform(d => ({ - isDir: d.isDir, - results: d.results, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalValidateStorageCredential_ValidationResultSchema: z.ZodType = - z - .object({ - operation: z.enum(ValidateStorageCredential_FileOperation).optional(), - result: z.enum(ValidateStorageCredential_Result).optional(), - message: z.string().optional(), - }) - .transform(d => ({ - operation: d.operation, - result: d.result, - message: d.message, - })); - -const awsCredentialsFieldMaskSchema: FieldMaskSchema = { - accessKeyId: {wire: 'access_key_id'}, - accessPoint: {wire: 'access_point'}, - secretAccessKey: {wire: 'secret_access_key'}, - sessionToken: {wire: 'session_token'}, -}; - -export function awsCredentialsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, awsCredentialsFieldMaskSchema); -} - -const awsIamRoleFieldMaskSchema: FieldMaskSchema = { - externalId: {wire: 'external_id'}, - roleArn: {wire: 'role_arn'}, - unityCatalogIamArn: {wire: 'unity_catalog_iam_arn'}, -}; - -export function awsIamRoleFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, awsIamRoleFieldMaskSchema); -} - -const azureActiveDirectoryTokenFieldMaskSchema: FieldMaskSchema = { - aadToken: {wire: 'aad_token'}, -}; - -export function azureActiveDirectoryTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - azureActiveDirectoryTokenFieldMaskSchema - ); -} - -const azureManagedIdentityFieldMaskSchema: FieldMaskSchema = { - accessConnectorId: {wire: 'access_connector_id'}, - credentialId: {wire: 'credential_id'}, - managedIdentityId: {wire: 'managed_identity_id'}, -}; - -export function azureManagedIdentityFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - azureManagedIdentityFieldMaskSchema - ); -} - -const azureServicePrincipalFieldMaskSchema: FieldMaskSchema = { - applicationId: {wire: 'application_id'}, - clientSecret: {wire: 'client_secret'}, - directoryId: {wire: 'directory_id'}, -}; - -export function azureServicePrincipalFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - azureServicePrincipalFieldMaskSchema - ); -} - -const azureUserDelegationSasFieldMaskSchema: FieldMaskSchema = { - sasToken: {wire: 'sas_token'}, -}; - -export function azureUserDelegationSasFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - azureUserDelegationSasFieldMaskSchema - ); -} - -const cloudflareApiTokenFieldMaskSchema: FieldMaskSchema = { - accessKeyId: {wire: 'access_key_id'}, - accountId: {wire: 'account_id'}, - secretAccessKey: {wire: 'secret_access_key'}, -}; - -export function cloudflareApiTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - cloudflareApiTokenFieldMaskSchema - ); -} - -const createCredentialFieldMaskSchema: FieldMaskSchema = { - awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, - azureManagedIdentity: { - wire: 'azure_managed_identity', - children: () => azureManagedIdentityFieldMaskSchema, - }, - azureServicePrincipal: { - wire: 'azure_service_principal', - children: () => azureServicePrincipalFieldMaskSchema, - }, - cloudflareApiToken: { - wire: 'cloudflare_api_token', - children: () => cloudflareApiTokenFieldMaskSchema, - }, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - databricksGcpServiceAccount: { - wire: 'databricks_gcp_service_account', - children: () => databricksGcpServiceAccountFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - gcpServiceAccountKey: { - wire: 'gcp_service_account_key', - children: () => gcpServiceAccountKeyFieldMaskSchema, - }, - id: {wire: 'id'}, - isolationMode: {wire: 'isolation_mode'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - readOnly: {wire: 'read_only'}, - skipValidation: {wire: 'skip_validation'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - usedForManagedStorage: {wire: 'used_for_managed_storage'}, -}; - -export function createCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createCredentialFieldMaskSchema - ); -} - -const createStorageCredentialFieldMaskSchema: FieldMaskSchema = { - awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, - azureManagedIdentity: { - wire: 'azure_managed_identity', - children: () => azureManagedIdentityFieldMaskSchema, - }, - azureServicePrincipal: { - wire: 'azure_service_principal', - children: () => azureServicePrincipalFieldMaskSchema, - }, - cloudflareApiToken: { - wire: 'cloudflare_api_token', - children: () => cloudflareApiTokenFieldMaskSchema, - }, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - databricksGcpServiceAccount: { - wire: 'databricks_gcp_service_account', - children: () => databricksGcpServiceAccountFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - gcpServiceAccountKey: { - wire: 'gcp_service_account_key', - children: () => gcpServiceAccountKeyFieldMaskSchema, - }, - id: {wire: 'id'}, - isolationMode: {wire: 'isolation_mode'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - readOnly: {wire: 'read_only'}, - skipValidation: {wire: 'skip_validation'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - usedForManagedStorage: {wire: 'used_for_managed_storage'}, -}; - -export function createStorageCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createStorageCredentialFieldMaskSchema - ); -} - -const credentialInfoFieldMaskSchema: FieldMaskSchema = { - awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, - azureManagedIdentity: { - wire: 'azure_managed_identity', - children: () => azureManagedIdentityFieldMaskSchema, - }, - azureServicePrincipal: { - wire: 'azure_service_principal', - children: () => azureServicePrincipalFieldMaskSchema, - }, - cloudflareApiToken: { - wire: 'cloudflare_api_token', - children: () => cloudflareApiTokenFieldMaskSchema, - }, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - databricksGcpServiceAccount: { - wire: 'databricks_gcp_service_account', - children: () => databricksGcpServiceAccountFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - gcpServiceAccountKey: { - wire: 'gcp_service_account_key', - children: () => gcpServiceAccountKeyFieldMaskSchema, - }, - id: {wire: 'id'}, - isolationMode: {wire: 'isolation_mode'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - readOnly: {wire: 'read_only'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - usedForManagedStorage: {wire: 'used_for_managed_storage'}, -}; - -export function credentialInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, credentialInfoFieldMaskSchema); -} - -const databricksGcpServiceAccountFieldMaskSchema: FieldMaskSchema = { - credentialId: {wire: 'credential_id'}, - email: {wire: 'email'}, - privateKeyId: {wire: 'private_key_id'}, -}; - -export function databricksGcpServiceAccountFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - databricksGcpServiceAccountFieldMaskSchema - ); -} - -const deleteCredentialFieldMaskSchema: FieldMaskSchema = { - force: {wire: 'force'}, - nameArg: {wire: 'name_arg'}, -}; - -export function deleteCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteCredentialFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteCredential_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteCredential_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteCredential_ResponseFieldMaskSchema - ); -} - -const deleteStorageCredentialFieldMaskSchema: FieldMaskSchema = { - force: {wire: 'force'}, - nameArg: {wire: 'name_arg'}, -}; - -export function deleteStorageCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteStorageCredentialFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteStorageCredential_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteStorageCredential_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteStorageCredential_ResponseFieldMaskSchema - ); -} - -const gcpOauthTokenFieldMaskSchema: FieldMaskSchema = { - oauthToken: {wire: 'oauth_token'}, -}; - -export function gcpOauthTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, gcpOauthTokenFieldMaskSchema); -} - -const gcpServiceAccountKeyFieldMaskSchema: FieldMaskSchema = { - email: {wire: 'email'}, - privateKey: {wire: 'private_key'}, - privateKeyId: {wire: 'private_key_id'}, -}; - -export function gcpServiceAccountKeyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - gcpServiceAccountKeyFieldMaskSchema - ); -} - -const generateTemporaryPathCredentialFieldMaskSchema: FieldMaskSchema = { - dryRun: {wire: 'dry_run'}, - operation: {wire: 'operation'}, - url: {wire: 'url'}, -}; - -export function generateTemporaryPathCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateTemporaryPathCredentialFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const generateTemporaryPathCredential_ResponseFieldMaskSchema: FieldMaskSchema = - { - awsTempCredentials: { - wire: 'aws_temp_credentials', - children: () => awsCredentialsFieldMaskSchema, - }, - azureAad: { - wire: 'azure_aad', - children: () => azureActiveDirectoryTokenFieldMaskSchema, - }, - azureUserDelegationSas: { - wire: 'azure_user_delegation_sas', - children: () => azureUserDelegationSasFieldMaskSchema, - }, - expirationTime: {wire: 'expiration_time'}, - gcpOauthToken: { - wire: 'gcp_oauth_token', - children: () => gcpOauthTokenFieldMaskSchema, - }, - r2TempCredentials: { - wire: 'r2_temp_credentials', - children: () => r2CredentialsFieldMaskSchema, - }, - ucEncryptedToken: { - wire: 'uc_encrypted_token', - children: () => ucEncryptedTokenFieldMaskSchema, - }, - url: {wire: 'url'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function generateTemporaryPathCredential_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateTemporaryPathCredential_ResponseFieldMaskSchema - ); -} - -const generateTemporaryServiceCredentialFieldMaskSchema: FieldMaskSchema = { - azureOptions: { - wire: 'azure_options', - children: () => - generateTemporaryServiceCredential_AzureOptionsFieldMaskSchema, - }, - credentialName: {wire: 'credential_name'}, - gcpOptions: { - wire: 'gcp_options', - children: () => - generateTemporaryServiceCredential_GcpOptionsFieldMaskSchema, - }, -}; - -export function generateTemporaryServiceCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateTemporaryServiceCredentialFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const generateTemporaryServiceCredential_AzureOptionsFieldMaskSchema: FieldMaskSchema = - { - resources: {wire: 'resources'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function generateTemporaryServiceCredential_AzureOptionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateTemporaryServiceCredential_AzureOptionsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const generateTemporaryServiceCredential_GcpOptionsFieldMaskSchema: FieldMaskSchema = - { - scopes: {wire: 'scopes'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function generateTemporaryServiceCredential_GcpOptionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateTemporaryServiceCredential_GcpOptionsFieldMaskSchema - ); -} - -const generateTemporaryTableCredentialFieldMaskSchema: FieldMaskSchema = { - operation: {wire: 'operation'}, - tableId: {wire: 'table_id'}, -}; - -export function generateTemporaryTableCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateTemporaryTableCredentialFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const generateTemporaryTableCredential_ResponseFieldMaskSchema: FieldMaskSchema = - { - awsTempCredentials: { - wire: 'aws_temp_credentials', - children: () => awsCredentialsFieldMaskSchema, - }, - azureAad: { - wire: 'azure_aad', - children: () => azureActiveDirectoryTokenFieldMaskSchema, - }, - azureUserDelegationSas: { - wire: 'azure_user_delegation_sas', - children: () => azureUserDelegationSasFieldMaskSchema, - }, - expirationTime: {wire: 'expiration_time'}, - gcpOauthToken: { - wire: 'gcp_oauth_token', - children: () => gcpOauthTokenFieldMaskSchema, - }, - r2TempCredentials: { - wire: 'r2_temp_credentials', - children: () => r2CredentialsFieldMaskSchema, - }, - ucEncryptedToken: { - wire: 'uc_encrypted_token', - children: () => ucEncryptedTokenFieldMaskSchema, - }, - url: {wire: 'url'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function generateTemporaryTableCredential_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateTemporaryTableCredential_ResponseFieldMaskSchema - ); -} - -const generateTemporaryVolumeCredentialFieldMaskSchema: FieldMaskSchema = { - operation: {wire: 'operation'}, - volumeId: {wire: 'volume_id'}, -}; - -export function generateTemporaryVolumeCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateTemporaryVolumeCredentialFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const generateTemporaryVolumeCredential_ResponseFieldMaskSchema: FieldMaskSchema = - { - awsTempCredentials: { - wire: 'aws_temp_credentials', - children: () => awsCredentialsFieldMaskSchema, - }, - azureAad: { - wire: 'azure_aad', - children: () => azureActiveDirectoryTokenFieldMaskSchema, - }, - azureUserDelegationSas: { - wire: 'azure_user_delegation_sas', - children: () => azureUserDelegationSasFieldMaskSchema, - }, - expirationTime: {wire: 'expiration_time'}, - gcpOauthToken: { - wire: 'gcp_oauth_token', - children: () => gcpOauthTokenFieldMaskSchema, - }, - r2TempCredentials: { - wire: 'r2_temp_credentials', - children: () => r2CredentialsFieldMaskSchema, - }, - ucEncryptedToken: { - wire: 'uc_encrypted_token', - children: () => ucEncryptedTokenFieldMaskSchema, - }, - url: {wire: 'url'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function generateTemporaryVolumeCredential_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateTemporaryVolumeCredential_ResponseFieldMaskSchema - ); -} - -const getCredentialFieldMaskSchema: FieldMaskSchema = { - nameArg: {wire: 'name_arg'}, -}; - -export function getCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, getCredentialFieldMaskSchema); -} - -const getStorageCredentialFieldMaskSchema: FieldMaskSchema = { - nameArg: {wire: 'name_arg'}, -}; - -export function getStorageCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getStorageCredentialFieldMaskSchema - ); -} - -const listCredentialsFieldMaskSchema: FieldMaskSchema = { - includeUnbound: {wire: 'include_unbound'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listCredentialsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listCredentialsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listCredentials_ResponseFieldMaskSchema: FieldMaskSchema = { - credentials: {wire: 'credentials'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listCredentials_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listCredentials_ResponseFieldMaskSchema - ); -} - -const listStorageCredentialsFieldMaskSchema: FieldMaskSchema = { - includeUnbound: {wire: 'include_unbound'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listStorageCredentialsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listStorageCredentialsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listStorageCredentials_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - storageCredentials: {wire: 'storage_credentials'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listStorageCredentials_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listStorageCredentials_ResponseFieldMaskSchema - ); -} - -const r2CredentialsFieldMaskSchema: FieldMaskSchema = { - accessKeyId: {wire: 'access_key_id'}, - secretAccessKey: {wire: 'secret_access_key'}, - sessionToken: {wire: 'session_token'}, -}; - -export function r2CredentialsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, r2CredentialsFieldMaskSchema); -} - -const storageCredentialInfoFieldMaskSchema: FieldMaskSchema = { - awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, - azureManagedIdentity: { - wire: 'azure_managed_identity', - children: () => azureManagedIdentityFieldMaskSchema, - }, - azureServicePrincipal: { - wire: 'azure_service_principal', - children: () => azureServicePrincipalFieldMaskSchema, - }, - cloudflareApiToken: { - wire: 'cloudflare_api_token', - children: () => cloudflareApiTokenFieldMaskSchema, - }, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - databricksGcpServiceAccount: { - wire: 'databricks_gcp_service_account', - children: () => databricksGcpServiceAccountFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - gcpServiceAccountKey: { - wire: 'gcp_service_account_key', - children: () => gcpServiceAccountKeyFieldMaskSchema, - }, - id: {wire: 'id'}, - isolationMode: {wire: 'isolation_mode'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - readOnly: {wire: 'read_only'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - usedForManagedStorage: {wire: 'used_for_managed_storage'}, -}; - -export function storageCredentialInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - storageCredentialInfoFieldMaskSchema - ); -} - -const temporaryCredentialsFieldMaskSchema: FieldMaskSchema = { - awsTempCredentials: { - wire: 'aws_temp_credentials', - children: () => awsCredentialsFieldMaskSchema, - }, - azureAad: { - wire: 'azure_aad', - children: () => azureActiveDirectoryTokenFieldMaskSchema, - }, - azureUserDelegationSas: { - wire: 'azure_user_delegation_sas', - children: () => azureUserDelegationSasFieldMaskSchema, - }, - expirationTime: {wire: 'expiration_time'}, - gcpOauthToken: { - wire: 'gcp_oauth_token', - children: () => gcpOauthTokenFieldMaskSchema, - }, - r2TempCredentials: { - wire: 'r2_temp_credentials', - children: () => r2CredentialsFieldMaskSchema, - }, - ucEncryptedToken: { - wire: 'uc_encrypted_token', - children: () => ucEncryptedTokenFieldMaskSchema, - }, - url: {wire: 'url'}, -}; - -export function temporaryCredentialsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - temporaryCredentialsFieldMaskSchema - ); -} - -const ucEncryptedTokenFieldMaskSchema: FieldMaskSchema = { - encryptedPayload: {wire: 'encrypted_payload'}, -}; - -export function ucEncryptedTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - ucEncryptedTokenFieldMaskSchema - ); -} - -const updateCredentialFieldMaskSchema: FieldMaskSchema = { - awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, - azureManagedIdentity: { - wire: 'azure_managed_identity', - children: () => azureManagedIdentityFieldMaskSchema, - }, - azureServicePrincipal: { - wire: 'azure_service_principal', - children: () => azureServicePrincipalFieldMaskSchema, - }, - cloudflareApiToken: { - wire: 'cloudflare_api_token', - children: () => cloudflareApiTokenFieldMaskSchema, - }, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - databricksGcpServiceAccount: { - wire: 'databricks_gcp_service_account', - children: () => databricksGcpServiceAccountFieldMaskSchema, - }, - force: {wire: 'force'}, - fullName: {wire: 'full_name'}, - gcpServiceAccountKey: { - wire: 'gcp_service_account_key', - children: () => gcpServiceAccountKeyFieldMaskSchema, - }, - id: {wire: 'id'}, - isolationMode: {wire: 'isolation_mode'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - nameArg: {wire: 'name_arg'}, - newName: {wire: 'new_name'}, - owner: {wire: 'owner'}, - readOnly: {wire: 'read_only'}, - skipValidation: {wire: 'skip_validation'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - usedForManagedStorage: {wire: 'used_for_managed_storage'}, -}; - -export function updateCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateCredentialFieldMaskSchema - ); -} - -const updateStorageCredentialFieldMaskSchema: FieldMaskSchema = { - awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, - azureManagedIdentity: { - wire: 'azure_managed_identity', - children: () => azureManagedIdentityFieldMaskSchema, - }, - azureServicePrincipal: { - wire: 'azure_service_principal', - children: () => azureServicePrincipalFieldMaskSchema, - }, - cloudflareApiToken: { - wire: 'cloudflare_api_token', - children: () => cloudflareApiTokenFieldMaskSchema, - }, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - databricksGcpServiceAccount: { - wire: 'databricks_gcp_service_account', - children: () => databricksGcpServiceAccountFieldMaskSchema, - }, - force: {wire: 'force'}, - fullName: {wire: 'full_name'}, - gcpServiceAccountKey: { - wire: 'gcp_service_account_key', - children: () => gcpServiceAccountKeyFieldMaskSchema, - }, - id: {wire: 'id'}, - isolationMode: {wire: 'isolation_mode'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - nameArg: {wire: 'name_arg'}, - newName: {wire: 'new_name'}, - owner: {wire: 'owner'}, - readOnly: {wire: 'read_only'}, - skipValidation: {wire: 'skip_validation'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - usedForManagedStorage: {wire: 'used_for_managed_storage'}, -}; - -export function updateStorageCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateStorageCredentialFieldMaskSchema - ); -} - -const validateCredentialFieldMaskSchema: FieldMaskSchema = { - awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, - azureManagedIdentity: { - wire: 'azure_managed_identity', - children: () => azureManagedIdentityFieldMaskSchema, - }, - credentialName: {wire: 'credential_name'}, - databricksGcpServiceAccount: { - wire: 'databricks_gcp_service_account', - children: () => databricksGcpServiceAccountFieldMaskSchema, - }, - externalLocationName: {wire: 'external_location_name'}, - readOnly: {wire: 'read_only'}, - url: {wire: 'url'}, -}; - -export function validateCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - validateCredentialFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const validateCredential_ResponseFieldMaskSchema: FieldMaskSchema = { - isDir: {wire: 'isDir'}, - results: {wire: 'results'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function validateCredential_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - validateCredential_ResponseFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const validateCredential_ValidationResultFieldMaskSchema: FieldMaskSchema = { - message: {wire: 'message'}, - result: {wire: 'result'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function validateCredential_ValidationResultFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - validateCredential_ValidationResultFieldMaskSchema - ); -} - -const validateStorageCredentialFieldMaskSchema: FieldMaskSchema = { - awsIamRole: {wire: 'aws_iam_role', children: () => awsIamRoleFieldMaskSchema}, - azureManagedIdentity: { - wire: 'azure_managed_identity', - children: () => azureManagedIdentityFieldMaskSchema, - }, - azureServicePrincipal: { - wire: 'azure_service_principal', - children: () => azureServicePrincipalFieldMaskSchema, - }, - cloudflareApiToken: { - wire: 'cloudflare_api_token', - children: () => cloudflareApiTokenFieldMaskSchema, - }, - databricksGcpServiceAccount: { - wire: 'databricks_gcp_service_account', - children: () => databricksGcpServiceAccountFieldMaskSchema, - }, - externalLocationName: {wire: 'external_location_name'}, - readOnly: {wire: 'read_only'}, - storageCredentialName: {wire: 'storage_credential_name'}, - url: {wire: 'url'}, -}; - -export function validateStorageCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - validateStorageCredentialFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const validateStorageCredential_ResponseFieldMaskSchema: FieldMaskSchema = { - isDir: {wire: 'isDir'}, - results: {wire: 'results'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function validateStorageCredential_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - validateStorageCredential_ResponseFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const validateStorageCredential_ValidationResultFieldMaskSchema: FieldMaskSchema = - { - message: {wire: 'message'}, - operation: {wire: 'operation'}, - result: {wire: 'result'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function validateStorageCredential_ValidationResultFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - validateStorageCredential_ValidationResultFieldMaskSchema - ); -} diff --git a/packages/dataclassification/src/v1/client.ts b/packages/dataclassification/src/v1/client.ts index 927d4c78..20f2d11d 100644 --- a/packages/dataclassification/src/v1/client.ts +++ b/packages/dataclassification/src/v1/client.ts @@ -125,7 +125,7 @@ export class Client { const url = `${this.host}/api/data-classification/v1/${req.catalogConfig?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/dataclassification/src/v1/model.ts b/packages/dataclassification/src/v1/model.ts index 7670e7f2..b897ff5c 100644 --- a/packages/dataclassification/src/v1/model.ts +++ b/packages/dataclassification/src/v1/model.ts @@ -94,7 +94,7 @@ export interface UpdateCatalogConfigRequest { */ catalogConfig?: CatalogConfig | undefined; /** Field mask specifying which fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalAutoTaggingConfigSchema: z.ZodType = z @@ -220,63 +220,3 @@ export function catalogConfig_SchemaNamesFieldMask( catalogConfig_SchemaNamesFieldMaskSchema ); } - -const createCatalogConfigRequestFieldMaskSchema: FieldMaskSchema = { - catalogConfig: { - wire: 'catalog_config', - children: () => catalogConfigFieldMaskSchema, - }, - parent: {wire: 'parent'}, -}; - -export function createCatalogConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createCatalogConfigRequestFieldMaskSchema - ); -} - -const deleteCatalogConfigRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteCatalogConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteCatalogConfigRequestFieldMaskSchema - ); -} - -const getCatalogConfigRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getCatalogConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getCatalogConfigRequestFieldMaskSchema - ); -} - -const updateCatalogConfigRequestFieldMaskSchema: FieldMaskSchema = { - catalogConfig: { - wire: 'catalog_config', - children: () => catalogConfigFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateCatalogConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateCatalogConfigRequestFieldMaskSchema - ); -} diff --git a/packages/dataquality/src/v1/client.ts b/packages/dataquality/src/v1/client.ts index 9c5f911c..831c92a3 100644 --- a/packages/dataquality/src/v1/client.ts +++ b/packages/dataquality/src/v1/client.ts @@ -417,7 +417,7 @@ export class Client { const url = `${this.host}/api/data-quality/v1/monitors/${req.objectType ?? ''}/${req.objectId ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -448,7 +448,7 @@ export class Client { const url = `${this.host}/api/data-quality/v1/monitors/${req.objectType ?? ''}/${req.objectId ?? ''}/refreshes/${String(req.refreshId ?? '')}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/dataquality/src/v1/model.ts b/packages/dataquality/src/v1/model.ts index 733b32b5..9febb253 100644 --- a/packages/dataquality/src/v1/model.ts +++ b/packages/dataquality/src/v1/model.ts @@ -510,7 +510,7 @@ export interface UpdateMonitorRequest { * The field mask to specify which fields to update as a comma-separated list. * Example value: `data_profiling_config.custom_metrics,data_profiling_config.schedule.quartz_cron_expression` */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** Request to update a refresh. */ @@ -534,7 +534,7 @@ export interface UpdateRefreshRequest { /** The refresh to update. */ refresh?: Refresh | undefined; /** The field mask to specify which fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export interface ValidityCheckConfiguration { @@ -564,19 +564,6 @@ export const unmarshalAnomalyDetectionConfigSchema: z.ZodType = - z - .object({ - object_type: z.string().optional(), - object_id: z.string().optional(), - refresh_id: z.number().optional(), - }) - .transform(d => ({ - objectType: d.object_type, - objectId: d.object_id, - refreshId: d.refresh_id, - })); - export const unmarshalCancelRefreshResponseSchema: z.ZodType = z .object({ @@ -866,14 +853,6 @@ export const marshalCancelRefreshRequestSchema: z.ZodType = z refresh_id: d.refreshId, })); -export const marshalCancelRefreshResponseSchema: z.ZodType = z - .object({ - refresh: z.lazy(() => marshalRefreshSchema).optional(), - }) - .transform(d => ({ - refresh: d.refresh, - })); - export const marshalCronScheduleSchema: z.ZodType = z .object({ quartzCronExpression: z.string().optional(), @@ -972,26 +951,6 @@ export const marshalInferenceLogConfigSchema: z.ZodType = z prediction_probability_column: d.predictionProbabilityColumn, })); -export const marshalListMonitorResponseSchema: z.ZodType = z - .object({ - monitors: z.array(z.lazy(() => marshalMonitorSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - monitors: d.monitors, - next_page_token: d.nextPageToken, - })); - -export const marshalListRefreshResponseSchema: z.ZodType = z - .object({ - refreshes: z.array(z.lazy(() => marshalRefreshSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - refreshes: d.refreshes, - next_page_token: d.nextPageToken, - })); - export const marshalMonitorSchema: z.ZodType = z .object({ objectType: z.string().optional(), @@ -1127,60 +1086,6 @@ export function anomalyDetectionConfigFieldMask( ); } -const cancelRefreshRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, - refreshId: {wire: 'refresh_id'}, -}; - -export function cancelRefreshRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - cancelRefreshRequestFieldMaskSchema - ); -} - -const cancelRefreshResponseFieldMaskSchema: FieldMaskSchema = { - refresh: {wire: 'refresh', children: () => refreshFieldMaskSchema}, -}; - -export function cancelRefreshResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - cancelRefreshResponseFieldMaskSchema - ); -} - -const createMonitorRequestFieldMaskSchema: FieldMaskSchema = { - monitor: {wire: 'monitor', children: () => monitorFieldMaskSchema}, -}; - -export function createMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createMonitorRequestFieldMaskSchema - ); -} - -const createRefreshRequestFieldMaskSchema: FieldMaskSchema = { - refresh: {wire: 'refresh', children: () => refreshFieldMaskSchema}, -}; - -export function createRefreshRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createRefreshRequestFieldMaskSchema - ); -} - const cronScheduleFieldMaskSchema: FieldMaskSchema = { pauseStatus: {wire: 'pause_status'}, quartzCronExpression: {wire: 'quartz_cron_expression'}, @@ -1251,64 +1156,6 @@ export function dataProfilingCustomMetricFieldMask( ); } -const deleteMonitorRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, -}; - -export function deleteMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteMonitorRequestFieldMaskSchema - ); -} - -const deleteRefreshRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, - refreshId: {wire: 'refresh_id'}, -}; - -export function deleteRefreshRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteRefreshRequestFieldMaskSchema - ); -} - -const getMonitorRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, -}; - -export function getMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getMonitorRequestFieldMaskSchema - ); -} - -const getRefreshRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, - refreshId: {wire: 'refresh_id'}, -}; - -export function getRefreshRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getRefreshRequestFieldMaskSchema - ); -} - const inferenceLogConfigFieldMaskSchema: FieldMaskSchema = { granularities: {wire: 'granularities'}, labelColumn: {wire: 'label_column'}, @@ -1328,64 +1175,6 @@ export function inferenceLogConfigFieldMask( ); } -const listMonitorRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listMonitorRequestFieldMaskSchema - ); -} - -const listMonitorResponseFieldMaskSchema: FieldMaskSchema = { - monitors: {wire: 'monitors'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listMonitorResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listMonitorResponseFieldMaskSchema - ); -} - -const listRefreshRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listRefreshRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listRefreshRequestFieldMaskSchema - ); -} - -const listRefreshResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - refreshes: {wire: 'refreshes'}, -}; - -export function listRefreshResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listRefreshResponseFieldMaskSchema - ); -} - const monitorFieldMaskSchema: FieldMaskSchema = { anomalyDetectionConfig: { wire: 'anomaly_detection_config', @@ -1511,39 +1300,6 @@ export function uniquenessValidityCheckFieldMask( ); } -const updateMonitorRequestFieldMaskSchema: FieldMaskSchema = { - monitor: {wire: 'monitor', children: () => monitorFieldMaskSchema}, - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateMonitorRequestFieldMaskSchema - ); -} - -const updateRefreshRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, - refresh: {wire: 'refresh', children: () => refreshFieldMaskSchema}, - refreshId: {wire: 'refresh_id'}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateRefreshRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateRefreshRequestFieldMaskSchema - ); -} - const validityCheckConfigurationFieldMaskSchema: FieldMaskSchema = { name: {wire: 'name'}, percentNullValidityCheck: { diff --git a/packages/entitytagassignments/src/v1/client.ts b/packages/entitytagassignments/src/v1/client.ts index 9f1138ea..ddcfffc2 100644 --- a/packages/entitytagassignments/src/v1/client.ts +++ b/packages/entitytagassignments/src/v1/client.ts @@ -220,7 +220,7 @@ export class Client { const url = `${this.host}/api/2.1/unity-catalog/entity-tag-assignments/${req.tagAssignment?.entityType ?? ''}/${req.tagAssignment?.entityName ?? ''}/tags/${req.tagAssignment?.tagKey ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/entitytagassignments/src/v1/model.ts b/packages/entitytagassignments/src/v1/model.ts index 7aa25051..96afb699 100644 --- a/packages/entitytagassignments/src/v1/model.ts +++ b/packages/entitytagassignments/src/v1/model.ts @@ -84,7 +84,7 @@ export interface ListEntityTagAssignmentsResponse { /** Request to update an entity tag assignment */ export interface UpdateEntityTagAssignmentRequest { tagAssignment?: EntityTagAssignment | undefined; - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalEntityTagAssignmentSchema: z.ZodType = @@ -151,49 +151,6 @@ export const marshalEntityTagAssignmentSchema: z.ZodType = z inherited: d.inherited, })); -export const marshalListEntityTagAssignmentsResponseSchema: z.ZodType = z - .object({ - tagAssignments: z - .array(z.lazy(() => marshalEntityTagAssignmentSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - tag_assignments: d.tagAssignments, - next_page_token: d.nextPageToken, - })); - -const createEntityTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { - tagAssignment: { - wire: 'tag_assignment', - children: () => entityTagAssignmentFieldMaskSchema, - }, -}; - -export function createEntityTagAssignmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createEntityTagAssignmentRequestFieldMaskSchema - ); -} - -const deleteEntityTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { - entityName: {wire: 'entity_name'}, - entityType: {wire: 'entity_type'}, - tagKey: {wire: 'tag_key'}, -}; - -export function deleteEntityTagAssignmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteEntityTagAssignmentRequestFieldMaskSchema - ); -} - const entityTagAssignmentFieldMaskSchema: FieldMaskSchema = { entityName: {wire: 'entity_name'}, entityType: {wire: 'entity_type'}, @@ -213,67 +170,3 @@ export function entityTagAssignmentFieldMask( entityTagAssignmentFieldMaskSchema ); } - -const getEntityTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { - entityName: {wire: 'entity_name'}, - entityType: {wire: 'entity_type'}, - includeInherited: {wire: 'include_inherited'}, - tagKey: {wire: 'tag_key'}, -}; - -export function getEntityTagAssignmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getEntityTagAssignmentRequestFieldMaskSchema - ); -} - -const listEntityTagAssignmentsRequestFieldMaskSchema: FieldMaskSchema = { - entityName: {wire: 'entity_name'}, - entityType: {wire: 'entity_type'}, - includeInherited: {wire: 'include_inherited'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listEntityTagAssignmentsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listEntityTagAssignmentsRequestFieldMaskSchema - ); -} - -const listEntityTagAssignmentsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - tagAssignments: {wire: 'tag_assignments'}, -}; - -export function listEntityTagAssignmentsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listEntityTagAssignmentsResponseFieldMaskSchema - ); -} - -const updateEntityTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { - tagAssignment: { - wire: 'tag_assignment', - children: () => entityTagAssignmentFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateEntityTagAssignmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateEntityTagAssignmentRequestFieldMaskSchema - ); -} diff --git a/packages/environments/src/v1/client.ts b/packages/environments/src/v1/client.ts index c38238c6..3a7631ae 100644 --- a/packages/environments/src/v1/client.ts +++ b/packages/environments/src/v1/client.ts @@ -324,7 +324,7 @@ export class Client { const url = `${this.host}/api/environments/v1/${req.defaultWorkspaceBaseEnvironment?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/environments/src/v1/model.ts b/packages/environments/src/v1/model.ts index d8480334..32731e77 100644 --- a/packages/environments/src/v1/model.ts +++ b/packages/environments/src/v1/model.ts @@ -693,7 +693,7 @@ export interface UpdateDefaultWorkspaceBaseEnvironmentRequest { * To unset one or both defaults, include the field path(s) in the mask and omit them from the request body. * To unset both, you must list both paths explicitly — the wildcard '*' cannot be used to unset fields. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** Request message for UpdateWorkspaceBaseEnvironment. */ @@ -810,15 +810,6 @@ export const unmarshalOperationSchema: z.ZodType = z response: d.response, })); -export const unmarshalRefreshWorkspaceBaseEnvironmentRequestSchema: z.ZodType = - z - .object({ - name: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - })); - export const unmarshalWorkspaceBaseEnvironmentSchema: z.ZodType = z .object({ @@ -861,21 +852,6 @@ export const unmarshalWorkspaceBaseEnvironmentSchema: z.ZodType = z.object({}); -export const marshalDatabricksServiceExceptionWithDetailsProtoSchema: z.ZodType = - z - .object({ - errorCode: z.enum(ErrorCode).optional(), - message: z.string().optional(), - stackTrace: z.string().optional(), - details: z.array(z.record(z.string(), z.unknown())).optional(), - }) - .transform(d => ({ - error_code: d.errorCode, - message: d.message, - stack_trace: d.stackTrace, - details: d.details, - })); - export const marshalDefaultWorkspaceBaseEnvironmentSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -888,36 +864,6 @@ export const marshalDefaultWorkspaceBaseEnvironmentSchema: z.ZodType = z gpu_workspace_base_environment: d.gpuWorkspaceBaseEnvironment, })); -export const marshalListWorkspaceBaseEnvironmentsResponseSchema: z.ZodType = z - .object({ - workspaceBaseEnvironments: z - .array(z.lazy(() => marshalWorkspaceBaseEnvironmentSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - workspace_base_environments: d.workspaceBaseEnvironments, - next_page_token: d.nextPageToken, - })); - -export const marshalOperationSchema: z.ZodType = z - .object({ - name: z.string().optional(), - metadata: z.record(z.string(), z.unknown()).optional(), - done: z.boolean().optional(), - error: z - .lazy(() => marshalDatabricksServiceExceptionWithDetailsProtoSchema) - .optional(), - response: z.record(z.string(), z.unknown()).optional(), - }) - .transform(d => ({ - name: d.name, - metadata: d.metadata, - done: d.done, - error: d.error, - response: d.response, - })); - export const marshalRefreshWorkspaceBaseEnvironmentRequestSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -964,44 +910,6 @@ export const marshalWorkspaceBaseEnvironmentSchema: z.ZodType = z base_environment_provider: d.baseEnvironmentProvider, })); -export const marshalWorkspaceBaseEnvironmentOperationMetadataSchema: z.ZodType = - z.object({}); - -const createWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { - requestId: {wire: 'request_id'}, - workspaceBaseEnvironment: { - wire: 'workspace_base_environment', - children: () => workspaceBaseEnvironmentFieldMaskSchema, - }, - workspaceBaseEnvironmentId: {wire: 'workspace_base_environment_id'}, -}; - -export function createWorkspaceBaseEnvironmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createWorkspaceBaseEnvironmentRequestFieldMaskSchema - ); -} - -const databricksServiceExceptionWithDetailsProtoFieldMaskSchema: FieldMaskSchema = - { - details: {wire: 'details'}, - errorCode: {wire: 'error_code'}, - message: {wire: 'message'}, - stackTrace: {wire: 'stack_trace'}, - }; - -export function databricksServiceExceptionWithDetailsProtoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - databricksServiceExceptionWithDetailsProtoFieldMaskSchema - ); -} - const defaultWorkspaceBaseEnvironmentFieldMaskSchema: FieldMaskSchema = { cpuWorkspaceBaseEnvironment: {wire: 'cpu_workspace_base_environment'}, gpuWorkspaceBaseEnvironment: {wire: 'gpu_workspace_base_environment'}, @@ -1016,194 +924,3 @@ export function defaultWorkspaceBaseEnvironmentFieldMask( defaultWorkspaceBaseEnvironmentFieldMaskSchema ); } - -const deleteWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteWorkspaceBaseEnvironmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteWorkspaceBaseEnvironmentRequestFieldMaskSchema - ); -} - -const getDefaultWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = - { - name: {wire: 'name'}, - }; - -export function getDefaultWorkspaceBaseEnvironmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getDefaultWorkspaceBaseEnvironmentRequestFieldMaskSchema - ); -} - -const getOperationRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getOperationRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getOperationRequestFieldMaskSchema - ); -} - -const getWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getWorkspaceBaseEnvironmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceBaseEnvironmentRequestFieldMaskSchema - ); -} - -const listWorkspaceBaseEnvironmentsRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listWorkspaceBaseEnvironmentsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceBaseEnvironmentsRequestFieldMaskSchema - ); -} - -const listWorkspaceBaseEnvironmentsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - workspaceBaseEnvironments: {wire: 'workspace_base_environments'}, -}; - -export function listWorkspaceBaseEnvironmentsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceBaseEnvironmentsResponseFieldMaskSchema - ); -} - -const operationFieldMaskSchema: FieldMaskSchema = { - done: {wire: 'done'}, - error: { - wire: 'error', - children: () => databricksServiceExceptionWithDetailsProtoFieldMaskSchema, - }, - metadata: {wire: 'metadata'}, - name: {wire: 'name'}, - response: {wire: 'response'}, -}; - -export function operationFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, operationFieldMaskSchema); -} - -const refreshWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function refreshWorkspaceBaseEnvironmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - refreshWorkspaceBaseEnvironmentRequestFieldMaskSchema - ); -} - -const updateDefaultWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = - { - defaultWorkspaceBaseEnvironment: { - wire: 'default_workspace_base_environment', - children: () => defaultWorkspaceBaseEnvironmentFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, - }; - -export function updateDefaultWorkspaceBaseEnvironmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateDefaultWorkspaceBaseEnvironmentRequestFieldMaskSchema - ); -} - -const updateWorkspaceBaseEnvironmentRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - workspaceBaseEnvironment: { - wire: 'workspace_base_environment', - children: () => workspaceBaseEnvironmentFieldMaskSchema, - }, -}; - -export function updateWorkspaceBaseEnvironmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateWorkspaceBaseEnvironmentRequestFieldMaskSchema - ); -} - -const workspaceBaseEnvironmentFieldMaskSchema: FieldMaskSchema = { - baseEnvironmentProvider: {wire: 'base_environment_provider'}, - baseEnvironmentType: {wire: 'base_environment_type'}, - createTime: {wire: 'create_time'}, - creatorUserId: {wire: 'creator_user_id'}, - displayName: {wire: 'display_name'}, - filepath: {wire: 'filepath'}, - isDefault: {wire: 'is_default'}, - lastUpdatedUserId: {wire: 'last_updated_user_id'}, - message: {wire: 'message'}, - name: {wire: 'name'}, - status: {wire: 'status'}, - updateTime: {wire: 'update_time'}, -}; - -export function workspaceBaseEnvironmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - workspaceBaseEnvironmentFieldMaskSchema - ); -} - -const workspaceBaseEnvironmentCacheFieldMaskSchema: FieldMaskSchema = {}; - -export function workspaceBaseEnvironmentCacheFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - workspaceBaseEnvironmentCacheFieldMaskSchema - ); -} - -const workspaceBaseEnvironmentOperationMetadataFieldMaskSchema: FieldMaskSchema = - {}; - -export function workspaceBaseEnvironmentOperationMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - workspaceBaseEnvironmentOperationMetadataFieldMaskSchema - ); -} diff --git a/packages/externallocations/src/v1/model.ts b/packages/externallocations/src/v1/model.ts index ae3fb78d..53bd508c 100644 --- a/packages/externallocations/src/v1/model.ts +++ b/packages/externallocations/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum IsolationMode { @@ -314,59 +312,6 @@ export const unmarshalAzureQueueStorageSchema: z.ZodType = z managedResourceId: d.managed_resource_id, })); -export const unmarshalCreateExternalLocationSchema: z.ZodType = - z - .object({ - skip_validation: z.boolean().optional(), - name: z.string().optional(), - url: z.string().optional(), - credential_name: z.string().optional(), - read_only: z.boolean().optional(), - comment: z.string().optional(), - enable_file_events: z.boolean().optional(), - file_event_queue: z.lazy(() => unmarshalFileEventQueueSchema).optional(), - owner: z.string().optional(), - encryption_details: z - .lazy(() => unmarshalEncryptionDetailsSchema) - .optional(), - metastore_id: z.string().optional(), - credential_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - browse_only: z.boolean().optional(), - isolation_mode: z.enum(IsolationMode).optional(), - fallback: z.boolean().optional(), - effective_enable_file_events: z.boolean().optional(), - effective_file_event_queue: z - .lazy(() => unmarshalFileEventQueueSchema) - .optional(), - }) - .transform(d => ({ - skipValidation: d.skip_validation, - name: d.name, - url: d.url, - credentialName: d.credential_name, - readOnly: d.read_only, - comment: d.comment, - enableFileEvents: d.enable_file_events, - fileEventQueue: d.file_event_queue, - owner: d.owner, - encryptionDetails: d.encryption_details, - metastoreId: d.metastore_id, - credentialId: d.credential_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - browseOnly: d.browse_only, - isolationMode: d.isolation_mode, - fallback: d.fallback, - effectiveEnableFileEvents: d.effective_enable_file_events, - effectiveFileEventQueue: d.effective_file_event_queue, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeleteExternalLocation_ResponseSchema: z.ZodType = z.object({}); @@ -485,65 +430,6 @@ export const unmarshalSseEncryptionDetailsSchema: z.ZodType = - z - .object({ - name_arg: z.string().optional(), - new_name: z.string().optional(), - force: z.boolean().optional(), - skip_validation: z.boolean().optional(), - name: z.string().optional(), - url: z.string().optional(), - credential_name: z.string().optional(), - read_only: z.boolean().optional(), - comment: z.string().optional(), - enable_file_events: z.boolean().optional(), - file_event_queue: z.lazy(() => unmarshalFileEventQueueSchema).optional(), - owner: z.string().optional(), - encryption_details: z - .lazy(() => unmarshalEncryptionDetailsSchema) - .optional(), - metastore_id: z.string().optional(), - credential_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - browse_only: z.boolean().optional(), - isolation_mode: z.enum(IsolationMode).optional(), - fallback: z.boolean().optional(), - effective_enable_file_events: z.boolean().optional(), - effective_file_event_queue: z - .lazy(() => unmarshalFileEventQueueSchema) - .optional(), - }) - .transform(d => ({ - nameArg: d.name_arg, - newName: d.new_name, - force: d.force, - skipValidation: d.skip_validation, - name: d.name, - url: d.url, - credentialName: d.credential_name, - readOnly: d.read_only, - comment: d.comment, - enableFileEvents: d.enable_file_events, - fileEventQueue: d.file_event_queue, - owner: d.owner, - encryptionDetails: d.encryption_details, - metastoreId: d.metastore_id, - credentialId: d.credential_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - browseOnly: d.browse_only, - isolationMode: d.isolation_mode, - fallback: d.fallback, - effectiveEnableFileEvents: d.effective_enable_file_events, - effectiveFileEventQueue: d.effective_file_event_queue, - })); - export const marshalAwsSqsQueueSchema: z.ZodType = z .object({ queueUrl: z.string().optional(), @@ -618,11 +504,6 @@ export const marshalCreateExternalLocationSchema: z.ZodType = z effective_file_event_queue: d.effectiveFileEventQueue, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteExternalLocation_ResponseSchema: z.ZodType = z.object( - {} -); - export const marshalEncryptionDetailsSchema: z.ZodType = z .object({ sseEncryptionDetails: z @@ -633,54 +514,6 @@ export const marshalEncryptionDetailsSchema: z.ZodType = z sse_encryption_details: d.sseEncryptionDetails, })); -export const marshalExternalLocationInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - url: z.string().optional(), - credentialName: z.string().optional(), - readOnly: z.boolean().optional(), - comment: z.string().optional(), - enableFileEvents: z.boolean().optional(), - fileEventQueue: z.lazy(() => marshalFileEventQueueSchema).optional(), - owner: z.string().optional(), - encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(), - metastoreId: z.string().optional(), - credentialId: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - browseOnly: z.boolean().optional(), - isolationMode: z.enum(IsolationMode).optional(), - fallback: z.boolean().optional(), - effectiveEnableFileEvents: z.boolean().optional(), - effectiveFileEventQueue: z - .lazy(() => marshalFileEventQueueSchema) - .optional(), - }) - .transform(d => ({ - name: d.name, - url: d.url, - credential_name: d.credentialName, - read_only: d.readOnly, - comment: d.comment, - enable_file_events: d.enableFileEvents, - file_event_queue: d.fileEventQueue, - owner: d.owner, - encryption_details: d.encryptionDetails, - metastore_id: d.metastoreId, - credential_id: d.credentialId, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - browse_only: d.browseOnly, - isolation_mode: d.isolationMode, - fallback: d.fallback, - effective_enable_file_events: d.effectiveEnableFileEvents, - effective_file_event_queue: d.effectiveFileEventQueue, - })); - export const marshalFileEventQueueSchema: z.ZodType = z .object({ providedAqs: z.lazy(() => marshalAzureQueueStorageSchema).optional(), @@ -709,19 +542,6 @@ export const marshalGcpPubsubSchema: z.ZodType = z managed_resource_id: d.managedResourceId, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListExternalLocations_ResponseSchema: z.ZodType = z - .object({ - externalLocations: z - .array(z.lazy(() => marshalExternalLocationInfoSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - external_locations: d.externalLocations, - next_page_token: d.nextPageToken, - })); - export const marshalSseEncryptionDetailsSchema: z.ZodType = z .object({ algorithm: z.enum(SseEncryptionAlgorithm).optional(), @@ -787,300 +607,3 @@ export const marshalUpdateExternalLocationSchema: z.ZodType = z effective_enable_file_events: d.effectiveEnableFileEvents, effective_file_event_queue: d.effectiveFileEventQueue, })); - -const awsSqsQueueFieldMaskSchema: FieldMaskSchema = { - managedResourceId: {wire: 'managed_resource_id'}, - queueUrl: {wire: 'queue_url'}, -}; - -export function awsSqsQueueFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, awsSqsQueueFieldMaskSchema); -} - -const azureQueueStorageFieldMaskSchema: FieldMaskSchema = { - managedResourceId: {wire: 'managed_resource_id'}, - queueUrl: {wire: 'queue_url'}, - resourceGroup: {wire: 'resource_group'}, - subscriptionId: {wire: 'subscription_id'}, -}; - -export function azureQueueStorageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - azureQueueStorageFieldMaskSchema - ); -} - -const createExternalLocationFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - credentialId: {wire: 'credential_id'}, - credentialName: {wire: 'credential_name'}, - effectiveEnableFileEvents: {wire: 'effective_enable_file_events'}, - effectiveFileEventQueue: { - wire: 'effective_file_event_queue', - children: () => fileEventQueueFieldMaskSchema, - }, - enableFileEvents: {wire: 'enable_file_events'}, - encryptionDetails: { - wire: 'encryption_details', - children: () => encryptionDetailsFieldMaskSchema, - }, - fallback: {wire: 'fallback'}, - fileEventQueue: { - wire: 'file_event_queue', - children: () => fileEventQueueFieldMaskSchema, - }, - isolationMode: {wire: 'isolation_mode'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - readOnly: {wire: 'read_only'}, - skipValidation: {wire: 'skip_validation'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - url: {wire: 'url'}, -}; - -export function createExternalLocationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createExternalLocationFieldMaskSchema - ); -} - -const deleteExternalLocationFieldMaskSchema: FieldMaskSchema = { - force: {wire: 'force'}, - nameArg: {wire: 'name_arg'}, -}; - -export function deleteExternalLocationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteExternalLocationFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteExternalLocation_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteExternalLocation_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteExternalLocation_ResponseFieldMaskSchema - ); -} - -const encryptionDetailsFieldMaskSchema: FieldMaskSchema = { - sseEncryptionDetails: { - wire: 'sse_encryption_details', - children: () => sseEncryptionDetailsFieldMaskSchema, - }, -}; - -export function encryptionDetailsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - encryptionDetailsFieldMaskSchema - ); -} - -const externalLocationInfoFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - credentialId: {wire: 'credential_id'}, - credentialName: {wire: 'credential_name'}, - effectiveEnableFileEvents: {wire: 'effective_enable_file_events'}, - effectiveFileEventQueue: { - wire: 'effective_file_event_queue', - children: () => fileEventQueueFieldMaskSchema, - }, - enableFileEvents: {wire: 'enable_file_events'}, - encryptionDetails: { - wire: 'encryption_details', - children: () => encryptionDetailsFieldMaskSchema, - }, - fallback: {wire: 'fallback'}, - fileEventQueue: { - wire: 'file_event_queue', - children: () => fileEventQueueFieldMaskSchema, - }, - isolationMode: {wire: 'isolation_mode'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - readOnly: {wire: 'read_only'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - url: {wire: 'url'}, -}; - -export function externalLocationInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - externalLocationInfoFieldMaskSchema - ); -} - -const fileEventQueueFieldMaskSchema: FieldMaskSchema = { - managedAqs: { - wire: 'managed_aqs', - children: () => azureQueueStorageFieldMaskSchema, - }, - managedPubsub: { - wire: 'managed_pubsub', - children: () => gcpPubsubFieldMaskSchema, - }, - managedSqs: {wire: 'managed_sqs', children: () => awsSqsQueueFieldMaskSchema}, - providedAqs: { - wire: 'provided_aqs', - children: () => azureQueueStorageFieldMaskSchema, - }, - providedPubsub: { - wire: 'provided_pubsub', - children: () => gcpPubsubFieldMaskSchema, - }, - providedSqs: { - wire: 'provided_sqs', - children: () => awsSqsQueueFieldMaskSchema, - }, -}; - -export function fileEventQueueFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, fileEventQueueFieldMaskSchema); -} - -const gcpPubsubFieldMaskSchema: FieldMaskSchema = { - managedResourceId: {wire: 'managed_resource_id'}, - subscriptionName: {wire: 'subscription_name'}, -}; - -export function gcpPubsubFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, gcpPubsubFieldMaskSchema); -} - -const getExternalLocationFieldMaskSchema: FieldMaskSchema = { - includeBrowse: {wire: 'include_browse'}, - nameArg: {wire: 'name_arg'}, -}; - -export function getExternalLocationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getExternalLocationFieldMaskSchema - ); -} - -const listExternalLocationsFieldMaskSchema: FieldMaskSchema = { - includeBrowse: {wire: 'include_browse'}, - includeUnbound: {wire: 'include_unbound'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listExternalLocationsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listExternalLocationsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listExternalLocations_ResponseFieldMaskSchema: FieldMaskSchema = { - externalLocations: {wire: 'external_locations'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listExternalLocations_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listExternalLocations_ResponseFieldMaskSchema - ); -} - -const sseEncryptionDetailsFieldMaskSchema: FieldMaskSchema = { - algorithm: {wire: 'algorithm'}, - awsKmsKeyArn: {wire: 'aws_kms_key_arn'}, -}; - -export function sseEncryptionDetailsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - sseEncryptionDetailsFieldMaskSchema - ); -} - -const updateExternalLocationFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - credentialId: {wire: 'credential_id'}, - credentialName: {wire: 'credential_name'}, - effectiveEnableFileEvents: {wire: 'effective_enable_file_events'}, - effectiveFileEventQueue: { - wire: 'effective_file_event_queue', - children: () => fileEventQueueFieldMaskSchema, - }, - enableFileEvents: {wire: 'enable_file_events'}, - encryptionDetails: { - wire: 'encryption_details', - children: () => encryptionDetailsFieldMaskSchema, - }, - fallback: {wire: 'fallback'}, - fileEventQueue: { - wire: 'file_event_queue', - children: () => fileEventQueueFieldMaskSchema, - }, - force: {wire: 'force'}, - isolationMode: {wire: 'isolation_mode'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - nameArg: {wire: 'name_arg'}, - newName: {wire: 'new_name'}, - owner: {wire: 'owner'}, - readOnly: {wire: 'read_only'}, - skipValidation: {wire: 'skip_validation'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - url: {wire: 'url'}, -}; - -export function updateExternalLocationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateExternalLocationFieldMaskSchema - ); -} diff --git a/packages/features/src/v1/client.ts b/packages/features/src/v1/client.ts index d3e38730..442f1974 100644 --- a/packages/features/src/v1/client.ts +++ b/packages/features/src/v1/client.ts @@ -489,7 +489,7 @@ export class Client { const url = `${this.host}/api/2.0/feature-engineering/features/${req.feature?.fullName ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -524,7 +524,7 @@ export class Client { const url = `${this.host}/api/2.0/feature-engineering/features/kafka-configs/${req.kafkaConfig?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -555,7 +555,7 @@ export class Client { const url = `${this.host}/api/2.0/feature-engineering/materialized-features/${req.materializedFeature?.materializedFeatureId ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/features/src/v1/model.ts b/packages/features/src/v1/model.ts index 6cb3c10f..5bba1688 100644 --- a/packages/features/src/v1/model.ts +++ b/packages/features/src/v1/model.ts @@ -614,14 +614,14 @@ export interface UpdateFeatureRequest { /** Feature to update. */ feature?: Feature | undefined; /** The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export interface UpdateKafkaConfigRequest { /** The Kafka config to update. */ kafkaConfig?: KafkaConfig | undefined; /** The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export interface UpdateMaterializedFeatureRequest { @@ -631,7 +631,7 @@ export interface UpdateMaterializedFeatureRequest { * Provide the materialization feature fields which should be updated. * Currently, only the pipeline_state field can be updated. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** Computes the population variance. */ @@ -735,17 +735,6 @@ export const unmarshalBackfillSourceSchema: z.ZodType = z deltaTableSource: d.delta_table_source, })); -export const unmarshalBatchCreateMaterializedFeaturesRequestSchema: z.ZodType = - z - .object({ - requests: z - .array(z.lazy(() => unmarshalCreateMaterializedFeatureRequestSchema)) - .optional(), - }) - .transform(d => ({ - requests: d.requests, - })); - export const unmarshalBatchCreateMaterializedFeaturesResponseSchema: z.ZodType = z .object({ @@ -797,17 +786,6 @@ export const unmarshalCountFunctionSchema: z.ZodType = z input: d.input, })); -export const unmarshalCreateMaterializedFeatureRequestSchema: z.ZodType = - z - .object({ - materialized_feature: z - .lazy(() => unmarshalMaterializedFeatureSchema) - .optional(), - }) - .transform(d => ({ - materializedFeature: d.materialized_feature, - })); - export const unmarshalDataSourceSchema: z.ZodType = z .object({ delta_table_source: z @@ -1322,16 +1300,6 @@ export const marshalBatchCreateMaterializedFeaturesRequestSchema: z.ZodType = z requests: d.requests, })); -export const marshalBatchCreateMaterializedFeaturesResponseSchema: z.ZodType = z - .object({ - materializedFeatures: z - .array(z.lazy(() => marshalMaterializedFeatureSchema)) - .optional(), - }) - .transform(d => ({ - materialized_features: d.materializedFeatures, - })); - export const marshalColumnIdentifierSchema: z.ZodType = z .object({ variantExprPath: z.string().optional(), @@ -1569,38 +1537,6 @@ export const marshalLineageContextSchema: z.ZodType = z job_context: d.jobContext, })); -export const marshalListFeaturesResponseSchema: z.ZodType = z - .object({ - features: z.array(z.lazy(() => marshalFeatureSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - features: d.features, - next_page_token: d.nextPageToken, - })); - -export const marshalListKafkaConfigsResponseSchema: z.ZodType = z - .object({ - kafkaConfigs: z.array(z.lazy(() => marshalKafkaConfigSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - kafka_configs: d.kafkaConfigs, - next_page_token: d.nextPageToken, - })); - -export const marshalListMaterializedFeaturesResponseSchema: z.ZodType = z - .object({ - materializedFeatures: z - .array(z.lazy(() => marshalMaterializedFeatureSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - materialized_features: d.materializedFeatures, - next_page_token: d.nextPageToken, - })); - export const marshalMaterializedFeatureSchema: z.ZodType = z .object({ materializedFeatureId: z.string().optional(), @@ -1890,33 +1826,6 @@ export function backfillSourceFieldMask( return FieldMask.build(paths, backfillSourceFieldMaskSchema); } -const batchCreateMaterializedFeaturesRequestFieldMaskSchema: FieldMaskSchema = { - requests: {wire: 'requests'}, -}; - -export function batchCreateMaterializedFeaturesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - batchCreateMaterializedFeaturesRequestFieldMaskSchema - ); -} - -const batchCreateMaterializedFeaturesResponseFieldMaskSchema: FieldMaskSchema = - { - materializedFeatures: {wire: 'materialized_features'}, - }; - -export function batchCreateMaterializedFeaturesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - batchCreateMaterializedFeaturesResponseFieldMaskSchema - ); -} - const columnIdentifierFieldMaskSchema: FieldMaskSchema = { variantExprPath: {wire: 'variant_expr_path'}, }; @@ -1967,51 +1876,6 @@ export function countFunctionFieldMask( return FieldMask.build(paths, countFunctionFieldMaskSchema); } -const createFeatureRequestFieldMaskSchema: FieldMaskSchema = { - feature: {wire: 'feature', children: () => featureFieldMaskSchema}, -}; - -export function createFeatureRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createFeatureRequestFieldMaskSchema - ); -} - -const createKafkaConfigRequestFieldMaskSchema: FieldMaskSchema = { - kafkaConfig: { - wire: 'kafka_config', - children: () => kafkaConfigFieldMaskSchema, - }, -}; - -export function createKafkaConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createKafkaConfigRequestFieldMaskSchema - ); -} - -const createMaterializedFeatureRequestFieldMaskSchema: FieldMaskSchema = { - materializedFeature: { - wire: 'materialized_feature', - children: () => materializedFeatureFieldMaskSchema, - }, -}; - -export function createMaterializedFeatureRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createMaterializedFeatureRequestFieldMaskSchema - ); -} - const dataSourceFieldMaskSchema: FieldMaskSchema = { deltaTableSource: { wire: 'delta_table_source', @@ -2031,45 +1895,6 @@ export function dataSourceFieldMask(...paths: string[]): FieldMask { return FieldMask.build(paths, dataSourceFieldMaskSchema); } -const deleteFeatureRequestFieldMaskSchema: FieldMaskSchema = { - fullName: {wire: 'full_name'}, -}; - -export function deleteFeatureRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteFeatureRequestFieldMaskSchema - ); -} - -const deleteKafkaConfigRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteKafkaConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteKafkaConfigRequestFieldMaskSchema - ); -} - -const deleteMaterializedFeatureRequestFieldMaskSchema: FieldMaskSchema = { - materializedFeatureId: {wire: 'materialized_feature_id'}, -}; - -export function deleteMaterializedFeatureRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteMaterializedFeatureRequestFieldMaskSchema - ); -} - const deltaTableSourceFieldMaskSchema: FieldMaskSchema = { dataframeSchema: {wire: 'dataframe_schema'}, entityColumns: {wire: 'entity_columns'}, @@ -2186,45 +2011,6 @@ export function function_ExtraParameterFieldMask( ); } -const getFeatureRequestFieldMaskSchema: FieldMaskSchema = { - fullName: {wire: 'full_name'}, -}; - -export function getFeatureRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getFeatureRequestFieldMaskSchema - ); -} - -const getKafkaConfigRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getKafkaConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getKafkaConfigRequestFieldMaskSchema - ); -} - -const getMaterializedFeatureRequestFieldMaskSchema: FieldMaskSchema = { - materializedFeatureId: {wire: 'materialized_feature_id'}, -}; - -export function getMaterializedFeatureRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getMaterializedFeatureRequestFieldMaskSchema - ); -} - const jobContextFieldMaskSchema: FieldMaskSchema = { jobId: {wire: 'job_id'}, jobRunId: {wire: 'job_run_id'}, @@ -2260,22 +2046,6 @@ export function kafkaConfigFieldMask( return FieldMask.build(paths, kafkaConfigFieldMaskSchema); } -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const kafkaConfig_ExtraOptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function kafkaConfig_ExtraOptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - kafkaConfig_ExtraOptionsEntryFieldMaskSchema - ); -} - const kafkaSourceFieldMaskSchema: FieldMaskSchema = { entityColumnIdentifiers: {wire: 'entity_column_identifiers'}, filterCondition: {wire: 'filter_condition'}, @@ -2313,91 +2083,6 @@ export function lineageContextFieldMask( return FieldMask.build(paths, lineageContextFieldMaskSchema); } -const listFeaturesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listFeaturesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listFeaturesRequestFieldMaskSchema - ); -} - -const listFeaturesResponseFieldMaskSchema: FieldMaskSchema = { - features: {wire: 'features'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listFeaturesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listFeaturesResponseFieldMaskSchema - ); -} - -const listKafkaConfigsRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listKafkaConfigsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listKafkaConfigsRequestFieldMaskSchema - ); -} - -const listKafkaConfigsResponseFieldMaskSchema: FieldMaskSchema = { - kafkaConfigs: {wire: 'kafka_configs'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listKafkaConfigsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listKafkaConfigsResponseFieldMaskSchema - ); -} - -const listMaterializedFeaturesRequestFieldMaskSchema: FieldMaskSchema = { - featureName: {wire: 'feature_name'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listMaterializedFeaturesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listMaterializedFeaturesRequestFieldMaskSchema - ); -} - -const listMaterializedFeaturesResponseFieldMaskSchema: FieldMaskSchema = { - materializedFeatures: {wire: 'materialized_features'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listMaterializedFeaturesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listMaterializedFeaturesResponseFieldMaskSchema - ); -} - const materializedFeatureFieldMaskSchema: FieldMaskSchema = { cronSchedule: {wire: 'cron_schedule'}, featureName: {wire: 'feature_name'}, @@ -2594,54 +2279,6 @@ export function tumblingWindowFieldMask( return FieldMask.build(paths, tumblingWindowFieldMaskSchema); } -const updateFeatureRequestFieldMaskSchema: FieldMaskSchema = { - feature: {wire: 'feature', children: () => featureFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateFeatureRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateFeatureRequestFieldMaskSchema - ); -} - -const updateKafkaConfigRequestFieldMaskSchema: FieldMaskSchema = { - kafkaConfig: { - wire: 'kafka_config', - children: () => kafkaConfigFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateKafkaConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateKafkaConfigRequestFieldMaskSchema - ); -} - -const updateMaterializedFeatureRequestFieldMaskSchema: FieldMaskSchema = { - materializedFeature: { - wire: 'materialized_feature', - children: () => materializedFeatureFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateMaterializedFeatureRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateMaterializedFeatureRequestFieldMaskSchema - ); -} - const varPopFunctionFieldMaskSchema: FieldMaskSchema = { input: {wire: 'input'}, }; diff --git a/packages/featurestore/src/v1/client.ts b/packages/featurestore/src/v1/client.ts index c85746bd..53dbd0f1 100644 --- a/packages/featurestore/src/v1/client.ts +++ b/packages/featurestore/src/v1/client.ts @@ -217,7 +217,7 @@ export class Client { const url = `${this.host}/api/2.0/feature-store/online-stores/${req.onlineStore?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/featurestore/src/v1/model.ts b/packages/featurestore/src/v1/model.ts index c71a3a6c..6f3e1e32 100644 --- a/packages/featurestore/src/v1/model.ts +++ b/packages/featurestore/src/v1/model.ts @@ -123,7 +123,7 @@ export interface UpdateOnlineStoreRequest { /** Online store to update. */ onlineStore?: OnlineStore | undefined; /** The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalListOnlineStoresResponseSchema: z.ZodType = @@ -162,29 +162,6 @@ export const unmarshalOnlineStoreSchema: z.ZodType = z usagePolicyId: d.usage_policy_id, })); -export const unmarshalPublishSpecSchema: z.ZodType = z - .object({ - online_store: z.string().optional(), - online_table_name: z.string().optional(), - publish_mode: z.enum(PublishSpec_PublishMode).optional(), - }) - .transform(d => ({ - onlineStore: d.online_store, - onlineTableName: d.online_table_name, - publishMode: d.publish_mode, - })); - -export const unmarshalPublishTableRequestSchema: z.ZodType = - z - .object({ - source_table_name: z.string().optional(), - publish_spec: z.lazy(() => unmarshalPublishSpecSchema).optional(), - }) - .transform(d => ({ - sourceTableName: d.source_table_name, - publishSpec: d.publish_spec, - })); - export const unmarshalPublishTableResponseSchema: z.ZodType = z .object({ @@ -196,16 +173,6 @@ export const unmarshalPublishTableResponseSchema: z.ZodType marshalOnlineStoreSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - online_stores: d.onlineStores, - next_page_token: d.nextPageToken, - })); - export const marshalOnlineStoreSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -251,99 +218,6 @@ export const marshalPublishTableRequestSchema: z.ZodType = z publish_spec: d.publishSpec, })); -export const marshalPublishTableResponseSchema: z.ZodType = z - .object({ - onlineTableName: z.string().optional(), - pipelineId: z.string().optional(), - }) - .transform(d => ({ - online_table_name: d.onlineTableName, - pipeline_id: d.pipelineId, - })); - -const createOnlineStoreRequestFieldMaskSchema: FieldMaskSchema = { - onlineStore: { - wire: 'online_store', - children: () => onlineStoreFieldMaskSchema, - }, -}; - -export function createOnlineStoreRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createOnlineStoreRequestFieldMaskSchema - ); -} - -const deleteOnlineStoreRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteOnlineStoreRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteOnlineStoreRequestFieldMaskSchema - ); -} - -const deleteOnlineTableRequestFieldMaskSchema: FieldMaskSchema = { - onlineTableName: {wire: 'online_table_name'}, -}; - -export function deleteOnlineTableRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteOnlineTableRequestFieldMaskSchema - ); -} - -const getOnlineStoreRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getOnlineStoreRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getOnlineStoreRequestFieldMaskSchema - ); -} - -const listOnlineStoresRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listOnlineStoresRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listOnlineStoresRequestFieldMaskSchema - ); -} - -const listOnlineStoresResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - onlineStores: {wire: 'online_stores'}, -}; - -export function listOnlineStoresResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listOnlineStoresResponseFieldMaskSchema - ); -} - const onlineStoreFieldMaskSchema: FieldMaskSchema = { capacity: {wire: 'capacity'}, creationTime: {wire: 'creation_time'}, @@ -359,63 +233,3 @@ export function onlineStoreFieldMask( ): FieldMask { return FieldMask.build(paths, onlineStoreFieldMaskSchema); } - -const publishSpecFieldMaskSchema: FieldMaskSchema = { - onlineStore: {wire: 'online_store'}, - onlineTableName: {wire: 'online_table_name'}, - publishMode: {wire: 'publish_mode'}, -}; - -export function publishSpecFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, publishSpecFieldMaskSchema); -} - -const publishTableRequestFieldMaskSchema: FieldMaskSchema = { - publishSpec: { - wire: 'publish_spec', - children: () => publishSpecFieldMaskSchema, - }, - sourceTableName: {wire: 'source_table_name'}, -}; - -export function publishTableRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - publishTableRequestFieldMaskSchema - ); -} - -const publishTableResponseFieldMaskSchema: FieldMaskSchema = { - onlineTableName: {wire: 'online_table_name'}, - pipelineId: {wire: 'pipeline_id'}, -}; - -export function publishTableResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - publishTableResponseFieldMaskSchema - ); -} - -const updateOnlineStoreRequestFieldMaskSchema: FieldMaskSchema = { - onlineStore: { - wire: 'online_store', - children: () => onlineStoreFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateOnlineStoreRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateOnlineStoreRequestFieldMaskSchema - ); -} diff --git a/packages/files/src/v2/model.ts b/packages/files/src/v2/model.ts index e6f0e31e..f1b98a42 100644 --- a/packages/files/src/v2/model.ts +++ b/packages/files/src/v2/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface AddBlock { @@ -138,45 +136,14 @@ export interface Read_Response { data?: Uint8Array | undefined; } -export const unmarshalAddBlockSchema: z.ZodType = z - .object({ - handle: z.number().optional(), - data: z - .string() - .transform(s => Uint8Array.from(atob(s), c => c.charCodeAt(0))) - .optional(), - }) - .transform(d => ({ - handle: d.handle, - data: d.data, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalAddBlock_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalCloseSchema: z.ZodType = z - .object({ - handle: z.number().optional(), - }) - .transform(d => ({ - handle: d.handle, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalClose_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalCreateSchema: z.ZodType = z - .object({ - path: z.string().optional(), - overwrite: z.boolean().optional(), - }) - .transform(d => ({ - path: d.path, - overwrite: d.overwrite, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreate_ResponseSchema: z.ZodType = z .object({ @@ -186,16 +153,6 @@ export const unmarshalCreate_ResponseSchema: z.ZodType = z handle: d.handle, })); -export const unmarshalDeleteSchema: z.ZodType = z - .object({ - path: z.string().optional(), - recursive: z.boolean().optional(), - }) - .transform(d => ({ - path: d.path, - recursive: d.recursive, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDelete_ResponseSchema: z.ZodType = z.object({}); @@ -240,48 +197,15 @@ export const unmarshalListStatus_ResponseSchema: z.ZodType files: d.files, })); -export const unmarshalMkDirsSchema: z.ZodType = z - .object({ - path: z.string().optional(), - }) - .transform(d => ({ - path: d.path, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalMkDirs_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalMoveSchema: z.ZodType = z - .object({ - source_path: z.string().optional(), - destination_path: z.string().optional(), - }) - .transform(d => ({ - sourcePath: d.source_path, - destinationPath: d.destination_path, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalMove_ResponseSchema: z.ZodType = z.object( {} ); -export const unmarshalPutSchema: z.ZodType = z - .object({ - path: z.string().optional(), - contents: z - .string() - .transform(s => Uint8Array.from(atob(s), c => c.charCodeAt(0))) - .optional(), - overwrite: z.boolean().optional(), - }) - .transform(d => ({ - path: d.path, - contents: d.contents, - overwrite: d.overwrite, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalPut_ResponseSchema: z.ZodType = z.object( {} @@ -316,9 +240,6 @@ export const marshalAddBlockSchema: z.ZodType = z data: d.data, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalAddBlock_ResponseSchema: z.ZodType = z.object({}); - export const marshalCloseSchema: z.ZodType = z .object({ handle: z.number().optional(), @@ -327,9 +248,6 @@ export const marshalCloseSchema: z.ZodType = z handle: d.handle, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalClose_ResponseSchema: z.ZodType = z.object({}); - export const marshalCreateSchema: z.ZodType = z .object({ path: z.string().optional(), @@ -340,15 +258,6 @@ export const marshalCreateSchema: z.ZodType = z overwrite: d.overwrite, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreate_ResponseSchema: z.ZodType = z - .object({ - handle: z.number().optional(), - }) - .transform(d => ({ - handle: d.handle, - })); - export const marshalDeleteSchema: z.ZodType = z .object({ path: z.string().optional(), @@ -359,47 +268,6 @@ export const marshalDeleteSchema: z.ZodType = z recursive: d.recursive, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDelete_ResponseSchema: z.ZodType = z.object({}); - -export const marshalFileInfoSchema: z.ZodType = z - .object({ - path: z.string().optional(), - isDir: z.boolean().optional(), - fileSize: z.number().optional(), - modificationTime: z.number().optional(), - }) - .transform(d => ({ - path: d.path, - is_dir: d.isDir, - file_size: d.fileSize, - modification_time: d.modificationTime, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetStatus_ResponseSchema: z.ZodType = z - .object({ - path: z.string().optional(), - isDir: z.boolean().optional(), - fileSize: z.number().optional(), - modificationTime: z.number().optional(), - }) - .transform(d => ({ - path: d.path, - is_dir: d.isDir, - file_size: d.fileSize, - modification_time: d.modificationTime, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListStatus_ResponseSchema: z.ZodType = z - .object({ - files: z.array(z.lazy(() => marshalFileInfoSchema)).optional(), - }) - .transform(d => ({ - files: d.files, - })); - export const marshalMkDirsSchema: z.ZodType = z .object({ path: z.string().optional(), @@ -408,9 +276,6 @@ export const marshalMkDirsSchema: z.ZodType = z path: d.path, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalMkDirs_ResponseSchema: z.ZodType = z.object({}); - export const marshalMoveSchema: z.ZodType = z .object({ sourcePath: z.string().optional(), @@ -421,9 +286,6 @@ export const marshalMoveSchema: z.ZodType = z destination_path: d.destinationPath, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalMove_ResponseSchema: z.ZodType = z.object({}); - export const marshalPutSchema: z.ZodType = z .object({ path: z.string().optional(), @@ -440,251 +302,3 @@ export const marshalPutSchema: z.ZodType = z contents: d.contents, overwrite: d.overwrite, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalPut_ResponseSchema: z.ZodType = z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalRead_ResponseSchema: z.ZodType = z - .object({ - bytesRead: z.number().optional(), - data: z - .any() - .transform((d: Uint8Array) => - btoa(Array.from(d, b => String.fromCharCode(b)).join('')) - ) - .optional(), - }) - .transform(d => ({ - bytes_read: d.bytesRead, - data: d.data, - })); - -const addBlockFieldMaskSchema: FieldMaskSchema = { - data: {wire: 'data'}, - handle: {wire: 'handle'}, -}; - -export function addBlockFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, addBlockFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const addBlock_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function addBlock_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - addBlock_ResponseFieldMaskSchema - ); -} - -const closeFieldMaskSchema: FieldMaskSchema = { - handle: {wire: 'handle'}, -}; - -export function closeFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, closeFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const close_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function close_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, close_ResponseFieldMaskSchema); -} - -const createFieldMaskSchema: FieldMaskSchema = { - overwrite: {wire: 'overwrite'}, - path: {wire: 'path'}, -}; - -export function createFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, createFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const create_ResponseFieldMaskSchema: FieldMaskSchema = { - handle: {wire: 'handle'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function create_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - create_ResponseFieldMaskSchema - ); -} - -const deleteFieldMaskSchema: FieldMaskSchema = { - path: {wire: 'path'}, - recursive: {wire: 'recursive'}, -}; - -export function deleteFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, deleteFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const delete_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function delete_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - delete_ResponseFieldMaskSchema - ); -} - -const fileInfoFieldMaskSchema: FieldMaskSchema = { - fileSize: {wire: 'file_size'}, - isDir: {wire: 'is_dir'}, - modificationTime: {wire: 'modification_time'}, - path: {wire: 'path'}, -}; - -export function fileInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, fileInfoFieldMaskSchema); -} - -const getStatusFieldMaskSchema: FieldMaskSchema = { - path: {wire: 'path'}, -}; - -export function getStatusFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getStatusFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getStatus_ResponseFieldMaskSchema: FieldMaskSchema = { - fileSize: {wire: 'file_size'}, - isDir: {wire: 'is_dir'}, - modificationTime: {wire: 'modification_time'}, - path: {wire: 'path'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getStatus_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getStatus_ResponseFieldMaskSchema - ); -} - -const listStatusFieldMaskSchema: FieldMaskSchema = { - path: {wire: 'path'}, -}; - -export function listStatusFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, listStatusFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listStatus_ResponseFieldMaskSchema: FieldMaskSchema = { - files: {wire: 'files'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listStatus_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listStatus_ResponseFieldMaskSchema - ); -} - -const mkDirsFieldMaskSchema: FieldMaskSchema = { - path: {wire: 'path'}, -}; - -export function mkDirsFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, mkDirsFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const mkDirs_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function mkDirs_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - mkDirs_ResponseFieldMaskSchema - ); -} - -const moveFieldMaskSchema: FieldMaskSchema = { - destinationPath: {wire: 'destination_path'}, - sourcePath: {wire: 'source_path'}, -}; - -export function moveFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, moveFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const move_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function move_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, move_ResponseFieldMaskSchema); -} - -const putFieldMaskSchema: FieldMaskSchema = { - contents: {wire: 'contents'}, - overwrite: {wire: 'overwrite'}, - path: {wire: 'path'}, -}; - -export function putFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, putFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const put_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function put_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, put_ResponseFieldMaskSchema); -} - -const readFieldMaskSchema: FieldMaskSchema = { - length: {wire: 'length'}, - offset: {wire: 'offset'}, - path: {wire: 'path'}, -}; - -export function readFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, readFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const read_ResponseFieldMaskSchema: FieldMaskSchema = { - bytesRead: {wire: 'bytes_read'}, - data: {wire: 'data'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function read_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, read_ResponseFieldMaskSchema); -} diff --git a/packages/functions/src/v1/model.ts b/packages/functions/src/v1/model.ts index f0937ee2..c29719a5 100644 --- a/packages/functions/src/v1/model.ts +++ b/packages/functions/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ColumnTypeName { @@ -411,87 +409,6 @@ export const unmarshalConnectionDependencySchema: z.ZodType = z - .object({ - name: z.string().optional(), - catalog_name: z.string().optional(), - schema_name: z.string().optional(), - input_params: z - .lazy(() => unmarshalFunctionParameterInfosSchema) - .optional(), - data_type: z.enum(ColumnTypeName).optional(), - full_data_type: z.string().optional(), - routine_body: z.enum(FunctionInfo_RoutineBody).optional(), - routine_definition: z.string().optional(), - parameter_style: z.enum(FunctionInfo_ParameterStyle).optional(), - is_deterministic: z.boolean().optional(), - sql_data_access: z.enum(FunctionInfo_SqlDataAccess).optional(), - is_null_call: z.boolean().optional(), - security_type: z.enum(FunctionInfo_SecurityType).optional(), - specific_name: z.string().optional(), - return_params: z - .lazy(() => unmarshalFunctionParameterInfosSchema) - .optional(), - external_name: z.string().optional(), - external_language: z.string().optional(), - sql_path: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - properties: z.string().optional(), - routine_dependencies: z - .lazy(() => unmarshalDependencyListSchema) - .optional(), - metastore_id: z.string().optional(), - full_name: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - function_id: z.string().optional(), - browse_only: z.boolean().optional(), - }) - .transform(d => ({ - name: d.name, - catalogName: d.catalog_name, - schemaName: d.schema_name, - inputParams: d.input_params, - dataType: d.data_type, - fullDataType: d.full_data_type, - routineBody: d.routine_body, - routineDefinition: d.routine_definition, - parameterStyle: d.parameter_style, - isDeterministic: d.is_deterministic, - sqlDataAccess: d.sql_data_access, - isNullCall: d.is_null_call, - securityType: d.security_type, - specificName: d.specific_name, - returnParams: d.return_params, - externalName: d.external_name, - externalLanguage: d.external_language, - sqlPath: d.sql_path, - owner: d.owner, - comment: d.comment, - properties: d.properties, - routineDependencies: d.routine_dependencies, - metastoreId: d.metastore_id, - fullName: d.full_name, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - functionId: d.function_id, - browseOnly: d.browse_only, - })); - -export const unmarshalCreateFunctionRequestSchema: z.ZodType = - z - .object({ - function_info: z.lazy(() => unmarshalCreateFunctionSchema).optional(), - }) - .transform(d => ({ - functionInfo: d.function_info, - })); - export const unmarshalCredentialDependencySchema: z.ZodType = z .object({ @@ -682,80 +599,6 @@ export const unmarshalTableDependencySchema: z.ZodType = z tableFullName: d.table_full_name, })); -export const unmarshalUpdateFunctionSchema: z.ZodType = z - .object({ - full_name_arg: z.string().optional(), - name: z.string().optional(), - catalog_name: z.string().optional(), - schema_name: z.string().optional(), - input_params: z - .lazy(() => unmarshalFunctionParameterInfosSchema) - .optional(), - data_type: z.enum(ColumnTypeName).optional(), - full_data_type: z.string().optional(), - routine_body: z.enum(FunctionInfo_RoutineBody).optional(), - routine_definition: z.string().optional(), - parameter_style: z.enum(FunctionInfo_ParameterStyle).optional(), - is_deterministic: z.boolean().optional(), - sql_data_access: z.enum(FunctionInfo_SqlDataAccess).optional(), - is_null_call: z.boolean().optional(), - security_type: z.enum(FunctionInfo_SecurityType).optional(), - specific_name: z.string().optional(), - return_params: z - .lazy(() => unmarshalFunctionParameterInfosSchema) - .optional(), - external_name: z.string().optional(), - external_language: z.string().optional(), - sql_path: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - properties: z.string().optional(), - routine_dependencies: z - .lazy(() => unmarshalDependencyListSchema) - .optional(), - metastore_id: z.string().optional(), - full_name: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - function_id: z.string().optional(), - browse_only: z.boolean().optional(), - }) - .transform(d => ({ - fullNameArg: d.full_name_arg, - name: d.name, - catalogName: d.catalog_name, - schemaName: d.schema_name, - inputParams: d.input_params, - dataType: d.data_type, - fullDataType: d.full_data_type, - routineBody: d.routine_body, - routineDefinition: d.routine_definition, - parameterStyle: d.parameter_style, - isDeterministic: d.is_deterministic, - sqlDataAccess: d.sql_data_access, - isNullCall: d.is_null_call, - securityType: d.security_type, - specificName: d.specific_name, - returnParams: d.return_params, - externalName: d.external_name, - externalLanguage: d.external_language, - sqlPath: d.sql_path, - owner: d.owner, - comment: d.comment, - properties: d.properties, - routineDependencies: d.routine_dependencies, - metastoreId: d.metastore_id, - fullName: d.full_name, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - functionId: d.function_id, - browseOnly: d.browse_only, - })); - export const unmarshalVolumeDependencySchema: z.ZodType = z .object({ volume_full_name: z.string().optional(), @@ -854,9 +697,6 @@ export const marshalCredentialDependencySchema: z.ZodType = z credential_name: d.credentialName, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteFunction_ResponseSchema: z.ZodType = z.object({}); - export const marshalDependencySchema: z.ZodType = z .object({ table: z.lazy(() => marshalTableDependencySchema).optional(), @@ -891,72 +731,6 @@ export const marshalFunctionDependencySchema: z.ZodType = z function_full_name: d.functionFullName, })); -export const marshalFunctionInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - catalogName: z.string().optional(), - schemaName: z.string().optional(), - inputParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(), - dataType: z.enum(ColumnTypeName).optional(), - fullDataType: z.string().optional(), - routineBody: z.enum(FunctionInfo_RoutineBody).optional(), - routineDefinition: z.string().optional(), - parameterStyle: z.enum(FunctionInfo_ParameterStyle).optional(), - isDeterministic: z.boolean().optional(), - sqlDataAccess: z.enum(FunctionInfo_SqlDataAccess).optional(), - isNullCall: z.boolean().optional(), - securityType: z.enum(FunctionInfo_SecurityType).optional(), - specificName: z.string().optional(), - returnParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(), - externalName: z.string().optional(), - externalLanguage: z.string().optional(), - sqlPath: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - properties: z.string().optional(), - routineDependencies: z.lazy(() => marshalDependencyListSchema).optional(), - metastoreId: z.string().optional(), - fullName: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - functionId: z.string().optional(), - browseOnly: z.boolean().optional(), - }) - .transform(d => ({ - name: d.name, - catalog_name: d.catalogName, - schema_name: d.schemaName, - input_params: d.inputParams, - data_type: d.dataType, - full_data_type: d.fullDataType, - routine_body: d.routineBody, - routine_definition: d.routineDefinition, - parameter_style: d.parameterStyle, - is_deterministic: d.isDeterministic, - sql_data_access: d.sqlDataAccess, - is_null_call: d.isNullCall, - security_type: d.securityType, - specific_name: d.specificName, - return_params: d.returnParams, - external_name: d.externalName, - external_language: d.externalLanguage, - sql_path: d.sqlPath, - owner: d.owner, - comment: d.comment, - properties: d.properties, - routine_dependencies: d.routineDependencies, - metastore_id: d.metastoreId, - full_name: d.fullName, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - function_id: d.functionId, - browse_only: d.browseOnly, - })); - export const marshalFunctionParameterInfoSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -997,17 +771,6 @@ export const marshalFunctionParameterInfosSchema: z.ZodType = z parameters: d.parameters, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListFunctions_ResponseSchema: z.ZodType = z - .object({ - functions: z.array(z.lazy(() => marshalFunctionInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - functions: d.functions, - next_page_token: d.nextPageToken, - })); - export const marshalSecretDependencySchema: z.ZodType = z .object({ secretFullName: z.string().optional(), @@ -1099,376 +862,3 @@ export const marshalVolumeDependencySchema: z.ZodType = z .transform(d => ({ volume_full_name: d.volumeFullName, })); - -const connectionDependencyFieldMaskSchema: FieldMaskSchema = { - connectionName: {wire: 'connection_name'}, -}; - -export function connectionDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - connectionDependencyFieldMaskSchema - ); -} - -const createFunctionFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - dataType: {wire: 'data_type'}, - externalLanguage: {wire: 'external_language'}, - externalName: {wire: 'external_name'}, - fullDataType: {wire: 'full_data_type'}, - fullName: {wire: 'full_name'}, - functionId: {wire: 'function_id'}, - inputParams: { - wire: 'input_params', - children: () => functionParameterInfosFieldMaskSchema, - }, - isDeterministic: {wire: 'is_deterministic'}, - isNullCall: {wire: 'is_null_call'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - parameterStyle: {wire: 'parameter_style'}, - properties: {wire: 'properties'}, - returnParams: { - wire: 'return_params', - children: () => functionParameterInfosFieldMaskSchema, - }, - routineBody: {wire: 'routine_body'}, - routineDefinition: {wire: 'routine_definition'}, - routineDependencies: { - wire: 'routine_dependencies', - children: () => dependencyListFieldMaskSchema, - }, - schemaName: {wire: 'schema_name'}, - securityType: {wire: 'security_type'}, - specificName: {wire: 'specific_name'}, - sqlDataAccess: {wire: 'sql_data_access'}, - sqlPath: {wire: 'sql_path'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function createFunctionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createFunctionFieldMaskSchema); -} - -const createFunctionRequestFieldMaskSchema: FieldMaskSchema = { - functionInfo: { - wire: 'function_info', - children: () => createFunctionFieldMaskSchema, - }, -}; - -export function createFunctionRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createFunctionRequestFieldMaskSchema - ); -} - -const credentialDependencyFieldMaskSchema: FieldMaskSchema = { - credentialName: {wire: 'credential_name'}, -}; - -export function credentialDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - credentialDependencyFieldMaskSchema - ); -} - -const deleteFunctionFieldMaskSchema: FieldMaskSchema = { - force: {wire: 'force'}, - fullNameArg: {wire: 'full_name_arg'}, -}; - -export function deleteFunctionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deleteFunctionFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteFunction_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteFunction_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteFunction_ResponseFieldMaskSchema - ); -} - -const dependencyFieldMaskSchema: FieldMaskSchema = { - connection: { - wire: 'connection', - children: () => connectionDependencyFieldMaskSchema, - }, - credential: { - wire: 'credential', - children: () => credentialDependencyFieldMaskSchema, - }, - function: { - wire: 'function', - children: () => functionDependencyFieldMaskSchema, - }, - secret: {wire: 'secret', children: () => secretDependencyFieldMaskSchema}, - table: {wire: 'table', children: () => tableDependencyFieldMaskSchema}, - volume: {wire: 'volume', children: () => volumeDependencyFieldMaskSchema}, -}; - -export function dependencyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, dependencyFieldMaskSchema); -} - -const dependencyListFieldMaskSchema: FieldMaskSchema = { - dependencies: {wire: 'dependencies'}, -}; - -export function dependencyListFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, dependencyListFieldMaskSchema); -} - -const functionDependencyFieldMaskSchema: FieldMaskSchema = { - functionFullName: {wire: 'function_full_name'}, -}; - -export function functionDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - functionDependencyFieldMaskSchema - ); -} - -const functionInfoFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - dataType: {wire: 'data_type'}, - externalLanguage: {wire: 'external_language'}, - externalName: {wire: 'external_name'}, - fullDataType: {wire: 'full_data_type'}, - fullName: {wire: 'full_name'}, - functionId: {wire: 'function_id'}, - inputParams: { - wire: 'input_params', - children: () => functionParameterInfosFieldMaskSchema, - }, - isDeterministic: {wire: 'is_deterministic'}, - isNullCall: {wire: 'is_null_call'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - parameterStyle: {wire: 'parameter_style'}, - properties: {wire: 'properties'}, - returnParams: { - wire: 'return_params', - children: () => functionParameterInfosFieldMaskSchema, - }, - routineBody: {wire: 'routine_body'}, - routineDefinition: {wire: 'routine_definition'}, - routineDependencies: { - wire: 'routine_dependencies', - children: () => dependencyListFieldMaskSchema, - }, - schemaName: {wire: 'schema_name'}, - securityType: {wire: 'security_type'}, - specificName: {wire: 'specific_name'}, - sqlDataAccess: {wire: 'sql_data_access'}, - sqlPath: {wire: 'sql_path'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function functionInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, functionInfoFieldMaskSchema); -} - -const functionParameterInfoFieldMaskSchema: FieldMaskSchema = { - comment: {wire: 'comment'}, - name: {wire: 'name'}, - parameterDefault: {wire: 'parameter_default'}, - parameterMode: {wire: 'parameter_mode'}, - parameterType: {wire: 'parameter_type'}, - position: {wire: 'position'}, - typeIntervalType: {wire: 'type_interval_type'}, - typeJson: {wire: 'type_json'}, - typeName: {wire: 'type_name'}, - typePrecision: {wire: 'type_precision'}, - typeScale: {wire: 'type_scale'}, - typeText: {wire: 'type_text'}, -}; - -export function functionParameterInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - functionParameterInfoFieldMaskSchema - ); -} - -const functionParameterInfosFieldMaskSchema: FieldMaskSchema = { - parameters: {wire: 'parameters'}, -}; - -export function functionParameterInfosFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - functionParameterInfosFieldMaskSchema - ); -} - -const getFunctionFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, - includeBrowse: {wire: 'include_browse'}, -}; - -export function getFunctionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, getFunctionFieldMaskSchema); -} - -const listFunctionsFieldMaskSchema: FieldMaskSchema = { - catalogName: {wire: 'catalog_name'}, - includeBrowse: {wire: 'include_browse'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, - schemaName: {wire: 'schema_name'}, -}; - -export function listFunctionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listFunctionsFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listFunctions_ResponseFieldMaskSchema: FieldMaskSchema = { - functions: {wire: 'functions'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listFunctions_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listFunctions_ResponseFieldMaskSchema - ); -} - -const secretDependencyFieldMaskSchema: FieldMaskSchema = { - secretFullName: {wire: 'secret_full_name'}, -}; - -export function secretDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - secretDependencyFieldMaskSchema - ); -} - -const tableDependencyFieldMaskSchema: FieldMaskSchema = { - tableFullName: {wire: 'table_full_name'}, -}; - -export function tableDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - tableDependencyFieldMaskSchema - ); -} - -const updateFunctionFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - dataType: {wire: 'data_type'}, - externalLanguage: {wire: 'external_language'}, - externalName: {wire: 'external_name'}, - fullDataType: {wire: 'full_data_type'}, - fullName: {wire: 'full_name'}, - fullNameArg: {wire: 'full_name_arg'}, - functionId: {wire: 'function_id'}, - inputParams: { - wire: 'input_params', - children: () => functionParameterInfosFieldMaskSchema, - }, - isDeterministic: {wire: 'is_deterministic'}, - isNullCall: {wire: 'is_null_call'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - parameterStyle: {wire: 'parameter_style'}, - properties: {wire: 'properties'}, - returnParams: { - wire: 'return_params', - children: () => functionParameterInfosFieldMaskSchema, - }, - routineBody: {wire: 'routine_body'}, - routineDefinition: {wire: 'routine_definition'}, - routineDependencies: { - wire: 'routine_dependencies', - children: () => dependencyListFieldMaskSchema, - }, - schemaName: {wire: 'schema_name'}, - securityType: {wire: 'security_type'}, - specificName: {wire: 'specific_name'}, - sqlDataAccess: {wire: 'sql_data_access'}, - sqlPath: {wire: 'sql_path'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function updateFunctionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, updateFunctionFieldMaskSchema); -} - -const volumeDependencyFieldMaskSchema: FieldMaskSchema = { - volumeFullName: {wire: 'volume_full_name'}, -}; - -export function volumeDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - volumeDependencyFieldMaskSchema - ); -} diff --git a/packages/genie/src/v1/model.ts b/packages/genie/src/v1/model.ts index 545c3827..27ffa78d 100644 --- a/packages/genie/src/v1/model.ts +++ b/packages/genie/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ColumnTypeName { @@ -1920,62 +1918,6 @@ export const unmarshalGenieConversationSummarySchema: z.ZodType = - z - .object({ - space_id: z.string().optional(), - conversation_id: z.string().optional(), - content: z.string().optional(), - }) - .transform(d => ({ - spaceId: d.space_id, - conversationId: d.conversation_id, - content: d.content, - })); - -export const unmarshalGenieCreateEvalRunRequestSchema: z.ZodType = - z - .object({ - space_id: z.string().optional(), - benchmark_question_ids: z.array(z.string()).optional(), - }) - .transform(d => ({ - spaceId: d.space_id, - benchmarkQuestionIds: d.benchmark_question_ids, - })); - -export const unmarshalGenieCreateMessageCommentRequestSchema: z.ZodType = - z - .object({ - space_id: z.string().optional(), - conversation_id: z.string().optional(), - message_id: z.string().optional(), - content: z.string().optional(), - }) - .transform(d => ({ - spaceId: d.space_id, - conversationId: d.conversation_id, - messageId: d.message_id, - content: d.content, - })); - -export const unmarshalGenieCreateSpaceRequestSchema: z.ZodType = - z - .object({ - warehouse_id: z.string().optional(), - parent_path: z.string().optional(), - serialized_space: z.string().optional(), - title: z.string().optional(), - description: z.string().optional(), - }) - .transform(d => ({ - warehouseId: d.warehouse_id, - parentPath: d.parent_path, - serializedSpace: d.serialized_space, - title: d.title, - description: d.description, - })); - export const unmarshalGenieEvalResponseSchema: z.ZodType = z .object({ response: z.string().optional(), @@ -2064,34 +2006,6 @@ export const unmarshalGenieEvalRunResponseSchema: z.ZodType = - z - .object({ - message_id: z.string().optional(), - space_id: z.string().optional(), - conversation_id: z.string().optional(), - attachment_id: z.string().optional(), - }) - .transform(d => ({ - messageId: d.message_id, - spaceId: d.space_id, - conversationId: d.conversation_id, - attachmentId: d.attachment_id, - })); - -export const unmarshalGenieExecuteMessageQueryRequestSchema: z.ZodType = - z - .object({ - message_id: z.string().optional(), - space_id: z.string().optional(), - conversation_id: z.string().optional(), - }) - .transform(d => ({ - messageId: d.message_id, - spaceId: d.space_id, - conversationId: d.conversation_id, - })); - export const unmarshalGenieFeedbackSchema: z.ZodType = z .object({ rating: z.enum(GenieFeedbackRating).optional(), @@ -2102,21 +2016,6 @@ export const unmarshalGenieFeedbackSchema: z.ZodType = z comment: d.comment, })); -export const unmarshalGenieGenerateDownloadFullQueryResultRequestSchema: z.ZodType = - z - .object({ - space_id: z.string().optional(), - conversation_id: z.string().optional(), - message_id: z.string().optional(), - attachment_id: z.string().optional(), - }) - .transform(d => ({ - spaceId: d.space_id, - conversationId: d.conversation_id, - messageId: d.message_id, - attachmentId: d.attachment_id, - })); - export const unmarshalGenieGenerateDownloadFullQueryResultResponseSchema: z.ZodType = z .object({ @@ -2332,23 +2231,6 @@ export const unmarshalGenieResultMetadataSchema: z.ZodType isTruncated: d.is_truncated, })); -export const unmarshalGenieSendMessageFeedbackRequestSchema: z.ZodType = - z - .object({ - space_id: z.string().optional(), - conversation_id: z.string().optional(), - message_id: z.string().optional(), - rating: z.enum(GenieFeedbackRating).optional(), - comment: z.string().optional(), - }) - .transform(d => ({ - spaceId: d.space_id, - conversationId: d.conversation_id, - messageId: d.message_id, - rating: d.rating, - comment: d.comment, - })); - export const unmarshalGenieSpaceSchema: z.ZodType = z .object({ space_id: z.string().optional(), @@ -2369,17 +2251,6 @@ export const unmarshalGenieSpaceSchema: z.ZodType = z etag: d.etag, })); -export const unmarshalGenieStartConversationMessageRequestSchema: z.ZodType = - z - .object({ - space_id: z.string().optional(), - content: z.string().optional(), - }) - .transform(d => ({ - spaceId: d.space_id, - content: d.content, - })); - export const unmarshalGenieStartConversationResponseSchema: z.ZodType = z .object({ @@ -2404,25 +2275,6 @@ export const unmarshalGenieSuggestedQuestionsAttachmentSchema: z.ZodType = - z - .object({ - space_id: z.string().optional(), - serialized_space: z.string().optional(), - title: z.string().optional(), - description: z.string().optional(), - warehouse_id: z.string().optional(), - etag: z.string().optional(), - }) - .transform(d => ({ - spaceId: d.space_id, - serializedSpace: d.serialized_space, - title: d.title, - description: d.description, - warehouseId: d.warehouse_id, - etag: d.etag, - })); - export const unmarshalListValueSchema: z.ZodType = z .object({ values: z.array(z.lazy(() => unmarshalValueSchema)).optional(), @@ -2639,152 +2491,6 @@ export const unmarshalVerificationMetadataSchema: z.ZodType ({ - chunk_index: d.chunkIndex, - row_offset: d.rowOffset, - row_count: d.rowCount, - byte_count: d.byteCount, - next_chunk_index: d.nextChunkIndex, - next_chunk_internal_link: d.nextChunkInternalLink, - })); - -export const marshalColumnInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - typeText: z.string().optional(), - typeName: z.enum(ColumnTypeName).optional(), - position: z.number().optional(), - typePrecision: z.number().optional(), - typeScale: z.number().optional(), - typeIntervalType: z.string().optional(), - typeJson: z.string().optional(), - comment: z.string().optional(), - nullable: z.boolean().optional(), - partitionIndex: z.number().optional(), - mask: z.lazy(() => marshalColumnMaskSchema).optional(), - }) - .transform(d => ({ - name: d.name, - type_text: d.typeText, - type_name: d.typeName, - position: d.position, - type_precision: d.typePrecision, - type_scale: d.typeScale, - type_interval_type: d.typeIntervalType, - type_json: d.typeJson, - comment: d.comment, - nullable: d.nullable, - partition_index: d.partitionIndex, - mask: d.mask, - })); - -export const marshalColumnMaskSchema: z.ZodType = z - .object({ - functionName: z.string().optional(), - usingColumnNames: z.array(z.string()).optional(), - usingArguments: z - .array(z.lazy(() => marshalPolicyFunctionArgumentSchema)) - .optional(), - }) - .transform(d => ({ - function_name: d.functionName, - using_column_names: d.usingColumnNames, - using_arguments: d.usingArguments, - })); - -export const marshalDatabricksServiceExceptionProtoSchema: z.ZodType = z - .object({ - errorCode: z.enum(ErrorCode).optional(), - message: z.string().optional(), - stackTrace: z.string().optional(), - }) - .transform(d => ({ - error_code: d.errorCode, - message: d.message, - stack_trace: d.stackTrace, - })); - -export const marshalExternalLinkSchema: z.ZodType = z - .object({ - externalLink: z.string().optional(), - expiration: z.string().optional(), - httpHeaders: z.record(z.string(), z.string()).optional(), - chunkIndex: z.number().optional(), - rowOffset: z.number().optional(), - rowCount: z.number().optional(), - byteCount: z.number().optional(), - nextChunkIndex: z.number().optional(), - nextChunkInternalLink: z.string().optional(), - }) - .transform(d => ({ - external_link: d.externalLink, - expiration: d.expiration, - http_headers: d.httpHeaders, - chunk_index: d.chunkIndex, - row_offset: d.rowOffset, - row_count: d.rowCount, - byte_count: d.byteCount, - next_chunk_index: d.nextChunkIndex, - next_chunk_internal_link: d.nextChunkInternalLink, - })); - -export const marshalGenieAttachmentSchema: z.ZodType = z - .object({ - text: z.lazy(() => marshalTextAttachmentSchema).optional(), - query: z.lazy(() => marshalGenieQueryAttachmentSchema).optional(), - suggestedQuestions: z - .lazy(() => marshalGenieSuggestedQuestionsAttachmentSchema) - .optional(), - attachmentId: z.string().optional(), - }) - .transform(d => ({ - text: d.text, - query: d.query, - suggested_questions: d.suggestedQuestions, - attachment_id: d.attachmentId, - })); - -export const marshalGenieConversationSchema: z.ZodType = z - .object({ - id: z.string().optional(), - spaceId: z.string().optional(), - userId: z.number().optional(), - createdTimestamp: z.number().optional(), - lastUpdatedTimestamp: z.number().optional(), - title: z.string().optional(), - conversationId: z.string().optional(), - }) - .transform(d => ({ - id: d.id, - space_id: d.spaceId, - user_id: d.userId, - created_timestamp: d.createdTimestamp, - last_updated_timestamp: d.lastUpdatedTimestamp, - title: d.title, - conversation_id: d.conversationId, - })); - -export const marshalGenieConversationSummarySchema: z.ZodType = z - .object({ - conversationId: z.string().optional(), - title: z.string().optional(), - createdTimestamp: z.number().optional(), - }) - .transform(d => ({ - conversation_id: d.conversationId, - title: d.title, - created_timestamp: d.createdTimestamp, - })); - export const marshalGenieCreateConversationMessageRequestSchema: z.ZodType = z .object({ spaceId: z.string().optional(), @@ -2837,90 +2543,6 @@ export const marshalGenieCreateSpaceRequestSchema: z.ZodType = z description: d.description, })); -export const marshalGenieEvalResponseSchema: z.ZodType = z - .object({ - response: z.string().optional(), - sqlExecutionResult: z.lazy(() => marshalStatementResponseSchema).optional(), - responseType: z.enum(GenieEvalResponseType).optional(), - }) - .transform(d => ({ - response: d.response, - sql_execution_result: d.sqlExecutionResult, - response_type: d.responseType, - })); - -export const marshalGenieEvalResultSchema: z.ZodType = z - .object({ - resultId: z.string().optional(), - spaceId: z.string().optional(), - benchmarkQuestionId: z.string().optional(), - status: z.enum(EvaluationStatusType).optional(), - question: z.string().optional(), - benchmarkAnswer: z.string().optional(), - createdByUser: z.number().optional(), - }) - .transform(d => ({ - result_id: d.resultId, - space_id: d.spaceId, - benchmark_question_id: d.benchmarkQuestionId, - status: d.status, - question: d.question, - benchmark_answer: d.benchmarkAnswer, - created_by_user: d.createdByUser, - })); - -export const marshalGenieEvalResultDetailsSchema: z.ZodType = z - .object({ - resultId: z.string().optional(), - spaceId: z.string().optional(), - benchmarkQuestionId: z.string().optional(), - evalRunStatus: z.enum(EvaluationStatusType).optional(), - assessment: z.enum(GenieEvalAssessment).optional(), - manualAssessment: z.boolean().optional(), - assessmentReasons: z.array(z.enum(ScoreReason)).optional(), - actualResponse: z - .array(z.lazy(() => marshalGenieEvalResponseSchema)) - .optional(), - expectedResponse: z - .array(z.lazy(() => marshalGenieEvalResponseSchema)) - .optional(), - }) - .transform(d => ({ - result_id: d.resultId, - space_id: d.spaceId, - benchmark_question_id: d.benchmarkQuestionId, - eval_run_status: d.evalRunStatus, - assessment: d.assessment, - manual_assessment: d.manualAssessment, - assessment_reasons: d.assessmentReasons, - actual_response: d.actualResponse, - expected_response: d.expectedResponse, - })); - -export const marshalGenieEvalRunResponseSchema: z.ZodType = z - .object({ - evalRunId: z.string().optional(), - evalRunStatus: z.enum(EvaluationStatusType).optional(), - runByUser: z.number().optional(), - createdTimestamp: z.number().optional(), - numQuestions: z.number().optional(), - numCorrect: z.number().optional(), - numNeedsReview: z.number().optional(), - numDone: z.number().optional(), - lastUpdatedTimestamp: z.number().optional(), - }) - .transform(d => ({ - eval_run_id: d.evalRunId, - eval_run_status: d.evalRunStatus, - run_by_user: d.runByUser, - created_timestamp: d.createdTimestamp, - num_questions: d.numQuestions, - num_correct: d.numCorrect, - num_needs_review: d.numNeedsReview, - num_done: d.numDone, - last_updated_timestamp: d.lastUpdatedTimestamp, - })); - export const marshalGenieExecuteMessageAttachmentQueryRequestSchema: z.ZodType = z .object({ @@ -2948,16 +2570,6 @@ export const marshalGenieExecuteMessageQueryRequestSchema: z.ZodType = z conversation_id: d.conversationId, })); -export const marshalGenieFeedbackSchema: z.ZodType = z - .object({ - rating: z.enum(GenieFeedbackRating).optional(), - comment: z.string().optional(), - }) - .transform(d => ({ - rating: d.rating, - comment: d.comment, - })); - export const marshalGenieGenerateDownloadFullQueryResultRequestSchema: z.ZodType = z .object({ @@ -2973,277 +2585,40 @@ export const marshalGenieGenerateDownloadFullQueryResultRequestSchema: z.ZodType attachment_id: d.attachmentId, })); -export const marshalGenieGenerateDownloadFullQueryResultResponseSchema: z.ZodType = - z - .object({ - downloadId: z.string().optional(), - downloadIdSignature: z.string().optional(), - }) - .transform(d => ({ - download_id: d.downloadId, - download_id_signature: d.downloadIdSignature, - })); - -export const marshalGenieGetDownloadFullQueryResultResponseSchema: z.ZodType = z +export const marshalGenieSendMessageFeedbackRequestSchema: z.ZodType = z .object({ - statementResponse: z.lazy(() => marshalStatementResponseSchema).optional(), + spaceId: z.string().optional(), + conversationId: z.string().optional(), + messageId: z.string().optional(), + rating: z.enum(GenieFeedbackRating).optional(), + comment: z.string().optional(), }) .transform(d => ({ - statement_response: d.statementResponse, + space_id: d.spaceId, + conversation_id: d.conversationId, + message_id: d.messageId, + rating: d.rating, + comment: d.comment, })); -export const marshalGenieGetMessageQueryResultResponseSchema: z.ZodType = z +export const marshalGenieStartConversationMessageRequestSchema: z.ZodType = z .object({ - statementResponse: z.lazy(() => marshalStatementResponseSchema).optional(), + spaceId: z.string().optional(), + content: z.string().optional(), }) .transform(d => ({ - statement_response: d.statementResponse, + space_id: d.spaceId, + content: d.content, })); -export const marshalGenieListConversationCommentsResponseSchema: z.ZodType = z +export const marshalGenieUpdateSpaceRequestSchema: z.ZodType = z .object({ - comments: z - .array(z.lazy(() => marshalGenieMessageCommentSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - comments: d.comments, - next_page_token: d.nextPageToken, - })); - -export const marshalGenieListConversationMessagesResponseSchema: z.ZodType = z - .object({ - messages: z.array(z.lazy(() => marshalGenieMessageSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - messages: d.messages, - next_page_token: d.nextPageToken, - })); - -export const marshalGenieListConversationsResponseSchema: z.ZodType = z - .object({ - conversations: z - .array(z.lazy(() => marshalGenieConversationSummarySchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - conversations: d.conversations, - next_page_token: d.nextPageToken, - })); - -export const marshalGenieListEvalResultsResponseSchema: z.ZodType = z - .object({ - evalResults: z.array(z.lazy(() => marshalGenieEvalResultSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - eval_results: d.evalResults, - next_page_token: d.nextPageToken, - })); - -export const marshalGenieListEvalRunsResponseSchema: z.ZodType = z - .object({ - evalRuns: z - .array(z.lazy(() => marshalGenieEvalRunResponseSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - eval_runs: d.evalRuns, - next_page_token: d.nextPageToken, - })); - -export const marshalGenieListMessageCommentsResponseSchema: z.ZodType = z - .object({ - comments: z - .array(z.lazy(() => marshalGenieMessageCommentSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - comments: d.comments, - next_page_token: d.nextPageToken, - })); - -export const marshalGenieListSpacesResponseSchema: z.ZodType = z - .object({ - spaces: z.array(z.lazy(() => marshalGenieSpaceSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - spaces: d.spaces, - next_page_token: d.nextPageToken, - })); - -export const marshalGenieMessageSchema: z.ZodType = z - .object({ - id: z.string().optional(), - spaceId: z.string().optional(), - conversationId: z.string().optional(), - userId: z.number().optional(), - createdTimestamp: z.number().optional(), - lastUpdatedTimestamp: z.number().optional(), - status: z.enum(MessageStatus_MessageStatus).optional(), - content: z.string().optional(), - attachments: z.array(z.lazy(() => marshalGenieAttachmentSchema)).optional(), - queryResult: z.lazy(() => marshalResultSchema).optional(), - error: z.lazy(() => marshalMessageErrorSchema).optional(), - messageId: z.string().optional(), - feedback: z.lazy(() => marshalGenieFeedbackSchema).optional(), - }) - .transform(d => ({ - id: d.id, - space_id: d.spaceId, - conversation_id: d.conversationId, - user_id: d.userId, - created_timestamp: d.createdTimestamp, - last_updated_timestamp: d.lastUpdatedTimestamp, - status: d.status, - content: d.content, - attachments: d.attachments, - query_result: d.queryResult, - error: d.error, - message_id: d.messageId, - feedback: d.feedback, - })); - -export const marshalGenieMessageCommentSchema: z.ZodType = z - .object({ - spaceId: z.string().optional(), - conversationId: z.string().optional(), - messageId: z.string().optional(), - messageCommentId: z.string().optional(), - userId: z.number().optional(), - content: z.string().optional(), - createdTimestamp: z.number().optional(), - }) - .transform(d => ({ - space_id: d.spaceId, - conversation_id: d.conversationId, - message_id: d.messageId, - message_comment_id: d.messageCommentId, - user_id: d.userId, - content: d.content, - created_timestamp: d.createdTimestamp, - })); - -export const marshalGenieQueryAttachmentSchema: z.ZodType = z - .object({ - title: z.string().optional(), - query: z.string().optional(), - description: z.string().optional(), - lastUpdatedTimestamp: z.number().optional(), - parameters: z - .array(z.lazy(() => marshalQueryAttachmentParameterSchema)) - .optional(), - id: z.string().optional(), - statementId: z.string().optional(), - queryResultMetadata: z - .lazy(() => marshalGenieResultMetadataSchema) - .optional(), - thoughts: z.array(z.lazy(() => marshalThoughtSchema)).optional(), - }) - .transform(d => ({ - title: d.title, - query: d.query, - description: d.description, - last_updated_timestamp: d.lastUpdatedTimestamp, - parameters: d.parameters, - id: d.id, - statement_id: d.statementId, - query_result_metadata: d.queryResultMetadata, - thoughts: d.thoughts, - })); - -export const marshalGenieResultMetadataSchema: z.ZodType = z - .object({ - rowCount: z.number().optional(), - isTruncated: z.boolean().optional(), - }) - .transform(d => ({ - row_count: d.rowCount, - is_truncated: d.isTruncated, - })); - -export const marshalGenieSendMessageFeedbackRequestSchema: z.ZodType = z - .object({ - spaceId: z.string().optional(), - conversationId: z.string().optional(), - messageId: z.string().optional(), - rating: z.enum(GenieFeedbackRating).optional(), - comment: z.string().optional(), - }) - .transform(d => ({ - space_id: d.spaceId, - conversation_id: d.conversationId, - message_id: d.messageId, - rating: d.rating, - comment: d.comment, - })); - -export const marshalGenieSpaceSchema: z.ZodType = z - .object({ - spaceId: z.string().optional(), - title: z.string().optional(), - description: z.string().optional(), - warehouseId: z.string().optional(), - parentPath: z.string().optional(), - serializedSpace: z.string().optional(), - etag: z.string().optional(), - }) - .transform(d => ({ - space_id: d.spaceId, - title: d.title, - description: d.description, - warehouse_id: d.warehouseId, - parent_path: d.parentPath, - serialized_space: d.serializedSpace, - etag: d.etag, - })); - -export const marshalGenieStartConversationMessageRequestSchema: z.ZodType = z - .object({ - spaceId: z.string().optional(), - content: z.string().optional(), - }) - .transform(d => ({ - space_id: d.spaceId, - content: d.content, - })); - -export const marshalGenieStartConversationResponseSchema: z.ZodType = z - .object({ - messageId: z.string().optional(), - message: z.lazy(() => marshalGenieMessageSchema).optional(), - conversationId: z.string().optional(), - conversation: z.lazy(() => marshalGenieConversationSchema).optional(), - }) - .transform(d => ({ - message_id: d.messageId, - message: d.message, - conversation_id: d.conversationId, - conversation: d.conversation, - })); - -export const marshalGenieSuggestedQuestionsAttachmentSchema: z.ZodType = z - .object({ - questions: z.array(z.string()).optional(), - }) - .transform(d => ({ - questions: d.questions, - })); - -export const marshalGenieUpdateSpaceRequestSchema: z.ZodType = z - .object({ - spaceId: z.string().optional(), - serializedSpace: z.string().optional(), - title: z.string().optional(), - description: z.string().optional(), - warehouseId: z.string().optional(), - etag: z.string().optional(), + spaceId: z.string().optional(), + serializedSpace: z.string().optional(), + title: z.string().optional(), + description: z.string().optional(), + warehouseId: z.string().optional(), + etag: z.string().optional(), }) .transform(d => ({ space_id: d.spaceId, @@ -3253,1368 +2628,3 @@ export const marshalGenieUpdateSpaceRequestSchema: z.ZodType = z warehouse_id: d.warehouseId, etag: d.etag, })); - -export const marshalListValueSchema: z.ZodType = z - .object({ - values: z.array(z.lazy(() => marshalValueSchema)).optional(), - }) - .transform(d => ({ - values: d.values, - })); - -export const marshalMapStringValueEntrySchema: z.ZodType = z - .object({ - key: z.string().optional(), - value: z.lazy(() => marshalValueSchema).optional(), - }) - .transform(d => ({ - key: d.key, - value: d.value, - })); - -export const marshalMessageErrorSchema: z.ZodType = z - .object({ - error: z.string().optional(), - type: z.enum(MessageError_Type).optional(), - }) - .transform(d => ({ - error: d.error, - type: d.type, - })); - -export const marshalPolicyFunctionArgumentSchema: z.ZodType = z - .object({ - column: z.string().optional(), - constant: z.string().optional(), - }) - .transform(d => ({ - column: d.column, - constant: d.constant, - })); - -export const marshalQueryAttachmentParameterSchema: z.ZodType = z - .object({ - keyword: z.string().optional(), - value: z.string().optional(), - sqlType: z.string().optional(), - }) - .transform(d => ({ - keyword: d.keyword, - value: d.value, - sql_type: d.sqlType, - })); - -export const marshalResultSchema: z.ZodType = z - .object({ - statementId: z.string().optional(), - rowCount: z.number().optional(), - isTruncated: z.boolean().optional(), - statementIdSignature: z.string().optional(), - }) - .transform(d => ({ - statement_id: d.statementId, - row_count: d.rowCount, - is_truncated: d.isTruncated, - statement_id_signature: d.statementIdSignature, - })); - -export const marshalResultDataSchema: z.ZodType = z - .object({ - externalLinks: z.array(z.lazy(() => marshalExternalLinkSchema)).optional(), - dataArray: z.array(z.lazy(() => marshalListValueSchema)).optional(), - chunkIndex: z.number().optional(), - rowOffset: z.number().optional(), - rowCount: z.number().optional(), - byteCount: z.number().optional(), - nextChunkIndex: z.number().optional(), - nextChunkInternalLink: z.string().optional(), - }) - .transform(d => ({ - external_links: d.externalLinks, - data_array: d.dataArray, - chunk_index: d.chunkIndex, - row_offset: d.rowOffset, - row_count: d.rowCount, - byte_count: d.byteCount, - next_chunk_index: d.nextChunkIndex, - next_chunk_internal_link: d.nextChunkInternalLink, - })); - -export const marshalResultManifestSchema: z.ZodType = z - .object({ - format: z.enum(Format).optional(), - schema: z.lazy(() => marshalSchemaSchema).optional(), - totalChunkCount: z.number().optional(), - chunks: z.array(z.lazy(() => marshalChunkInfoSchema)).optional(), - totalRowCount: z.number().optional(), - totalByteCount: z.number().optional(), - truncated: z.boolean().optional(), - }) - .transform(d => ({ - format: d.format, - schema: d.schema, - total_chunk_count: d.totalChunkCount, - chunks: d.chunks, - total_row_count: d.totalRowCount, - total_byte_count: d.totalByteCount, - truncated: d.truncated, - })); - -export const marshalSchemaSchema: z.ZodType = z - .object({ - columnCount: z.number().optional(), - columns: z.array(z.lazy(() => marshalColumnInfoSchema)).optional(), - }) - .transform(d => ({ - column_count: d.columnCount, - columns: d.columns, - })); - -export const marshalStatementResponseSchema: z.ZodType = z - .object({ - statementId: z.string().optional(), - status: z.lazy(() => marshalStatementStatusSchema).optional(), - manifest: z.lazy(() => marshalResultManifestSchema).optional(), - result: z.lazy(() => marshalResultDataSchema).optional(), - }) - .transform(d => ({ - statement_id: d.statementId, - status: d.status, - manifest: d.manifest, - result: d.result, - })); - -export const marshalStatementStatusSchema: z.ZodType = z - .object({ - state: z.enum(StatementStatus_State).optional(), - error: z - .lazy(() => marshalDatabricksServiceExceptionProtoSchema) - .optional(), - sqlState: z.string().optional(), - }) - .transform(d => ({ - state: d.state, - error: d.error, - sql_state: d.sqlState, - })); - -export const marshalStructSchema: z.ZodType = z - .object({ - fields: z.array(z.lazy(() => marshalMapStringValueEntrySchema)).optional(), - }) - .transform(d => ({ - fields: d.fields, - })); - -export const marshalTextAttachmentSchema: z.ZodType = z - .object({ - content: z.string().optional(), - id: z.string().optional(), - phase: z.enum(ResponsePhase).optional(), - verificationMetadata: z - .lazy(() => marshalVerificationMetadataSchema) - .optional(), - purpose: z.enum(TextAttachmentPurpose).optional(), - }) - .transform(d => ({ - content: d.content, - id: d.id, - phase: d.phase, - verification_metadata: d.verificationMetadata, - purpose: d.purpose, - })); - -export const marshalThoughtSchema: z.ZodType = z - .object({ - thoughtType: z.enum(ThoughtType).optional(), - content: z.string().optional(), - }) - .transform(d => ({ - thought_type: d.thoughtType, - content: d.content, - })); - -export const marshalValueSchema: z.ZodType = z - .object({ - nullValue: z.enum(NullValue).optional(), - numberValue: z.number().optional(), - stringValue: z.string().optional(), - boolValue: z.boolean().optional(), - structValue: z.lazy(() => marshalStructSchema).optional(), - listValue: z.lazy(() => marshalListValueSchema).optional(), - }) - .transform(d => ({ - null_value: d.nullValue, - number_value: d.numberValue, - string_value: d.stringValue, - bool_value: d.boolValue, - struct_value: d.structValue, - list_value: d.listValue, - })); - -export const marshalVerificationMetadataSchema: z.ZodType = z - .object({ - section: z.enum(VerificationSection).optional(), - index: z.number().optional(), - }) - .transform(d => ({ - section: d.section, - index: d.index, - })); - -const chunkInfoFieldMaskSchema: FieldMaskSchema = { - byteCount: {wire: 'byte_count'}, - chunkIndex: {wire: 'chunk_index'}, - nextChunkIndex: {wire: 'next_chunk_index'}, - nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, - rowCount: {wire: 'row_count'}, - rowOffset: {wire: 'row_offset'}, -}; - -export function chunkInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, chunkInfoFieldMaskSchema); -} - -const columnInfoFieldMaskSchema: FieldMaskSchema = { - comment: {wire: 'comment'}, - mask: {wire: 'mask', children: () => columnMaskFieldMaskSchema}, - name: {wire: 'name'}, - nullable: {wire: 'nullable'}, - partitionIndex: {wire: 'partition_index'}, - position: {wire: 'position'}, - typeIntervalType: {wire: 'type_interval_type'}, - typeJson: {wire: 'type_json'}, - typeName: {wire: 'type_name'}, - typePrecision: {wire: 'type_precision'}, - typeScale: {wire: 'type_scale'}, - typeText: {wire: 'type_text'}, -}; - -export function columnInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, columnInfoFieldMaskSchema); -} - -const columnMaskFieldMaskSchema: FieldMaskSchema = { - functionName: {wire: 'function_name'}, - usingArguments: {wire: 'using_arguments'}, - usingColumnNames: {wire: 'using_column_names'}, -}; - -export function columnMaskFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, columnMaskFieldMaskSchema); -} - -const databricksServiceExceptionProtoFieldMaskSchema: FieldMaskSchema = { - errorCode: {wire: 'error_code'}, - message: {wire: 'message'}, - stackTrace: {wire: 'stack_trace'}, -}; - -export function databricksServiceExceptionProtoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - databricksServiceExceptionProtoFieldMaskSchema - ); -} - -const externalLinkFieldMaskSchema: FieldMaskSchema = { - byteCount: {wire: 'byte_count'}, - chunkIndex: {wire: 'chunk_index'}, - expiration: {wire: 'expiration'}, - externalLink: {wire: 'external_link'}, - httpHeaders: {wire: 'http_headers'}, - nextChunkIndex: {wire: 'next_chunk_index'}, - nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, - rowCount: {wire: 'row_count'}, - rowOffset: {wire: 'row_offset'}, -}; - -export function externalLinkFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, externalLinkFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const externalLink_HttpHeadersEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function externalLink_HttpHeadersEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - externalLink_HttpHeadersEntryFieldMaskSchema - ); -} - -const genieAttachmentFieldMaskSchema: FieldMaskSchema = { - attachmentId: {wire: 'attachment_id'}, - query: {wire: 'query', children: () => genieQueryAttachmentFieldMaskSchema}, - suggestedQuestions: { - wire: 'suggested_questions', - children: () => genieSuggestedQuestionsAttachmentFieldMaskSchema, - }, - text: {wire: 'text', children: () => textAttachmentFieldMaskSchema}, -}; - -export function genieAttachmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieAttachmentFieldMaskSchema - ); -} - -const genieConversationFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - createdTimestamp: {wire: 'created_timestamp'}, - id: {wire: 'id'}, - lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, - spaceId: {wire: 'space_id'}, - title: {wire: 'title'}, - userId: {wire: 'user_id'}, -}; - -export function genieConversationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieConversationFieldMaskSchema - ); -} - -const genieConversationSummaryFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - createdTimestamp: {wire: 'created_timestamp'}, - title: {wire: 'title'}, -}; - -export function genieConversationSummaryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieConversationSummaryFieldMaskSchema - ); -} - -const genieCreateConversationMessageRequestFieldMaskSchema: FieldMaskSchema = { - content: {wire: 'content'}, - conversationId: {wire: 'conversation_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieCreateConversationMessageRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieCreateConversationMessageRequestFieldMaskSchema - ); -} - -const genieCreateEvalRunRequestFieldMaskSchema: FieldMaskSchema = { - benchmarkQuestionIds: {wire: 'benchmark_question_ids'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieCreateEvalRunRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieCreateEvalRunRequestFieldMaskSchema - ); -} - -const genieCreateMessageCommentRequestFieldMaskSchema: FieldMaskSchema = { - content: {wire: 'content'}, - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieCreateMessageCommentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieCreateMessageCommentRequestFieldMaskSchema - ); -} - -const genieCreateSpaceRequestFieldMaskSchema: FieldMaskSchema = { - description: {wire: 'description'}, - parentPath: {wire: 'parent_path'}, - serializedSpace: {wire: 'serialized_space'}, - title: {wire: 'title'}, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function genieCreateSpaceRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieCreateSpaceRequestFieldMaskSchema - ); -} - -const genieDeleteConversationMessageRequestFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieDeleteConversationMessageRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieDeleteConversationMessageRequestFieldMaskSchema - ); -} - -const genieDeleteConversationRequestFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieDeleteConversationRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieDeleteConversationRequestFieldMaskSchema - ); -} - -const genieEvalResponseFieldMaskSchema: FieldMaskSchema = { - response: {wire: 'response'}, - responseType: {wire: 'response_type'}, - sqlExecutionResult: { - wire: 'sql_execution_result', - children: () => statementResponseFieldMaskSchema, - }, -}; - -export function genieEvalResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieEvalResponseFieldMaskSchema - ); -} - -const genieEvalResultFieldMaskSchema: FieldMaskSchema = { - benchmarkAnswer: {wire: 'benchmark_answer'}, - benchmarkQuestionId: {wire: 'benchmark_question_id'}, - createdByUser: {wire: 'created_by_user'}, - question: {wire: 'question'}, - resultId: {wire: 'result_id'}, - spaceId: {wire: 'space_id'}, - status: {wire: 'status'}, -}; - -export function genieEvalResultFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieEvalResultFieldMaskSchema - ); -} - -const genieEvalResultDetailsFieldMaskSchema: FieldMaskSchema = { - actualResponse: {wire: 'actual_response'}, - assessment: {wire: 'assessment'}, - assessmentReasons: {wire: 'assessment_reasons'}, - benchmarkQuestionId: {wire: 'benchmark_question_id'}, - evalRunStatus: {wire: 'eval_run_status'}, - expectedResponse: {wire: 'expected_response'}, - manualAssessment: {wire: 'manual_assessment'}, - resultId: {wire: 'result_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieEvalResultDetailsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieEvalResultDetailsFieldMaskSchema - ); -} - -const genieEvalRunResponseFieldMaskSchema: FieldMaskSchema = { - createdTimestamp: {wire: 'created_timestamp'}, - evalRunId: {wire: 'eval_run_id'}, - evalRunStatus: {wire: 'eval_run_status'}, - lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, - numCorrect: {wire: 'num_correct'}, - numDone: {wire: 'num_done'}, - numNeedsReview: {wire: 'num_needs_review'}, - numQuestions: {wire: 'num_questions'}, - runByUser: {wire: 'run_by_user'}, -}; - -export function genieEvalRunResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieEvalRunResponseFieldMaskSchema - ); -} - -const genieExecuteMessageAttachmentQueryRequestFieldMaskSchema: FieldMaskSchema = - { - attachmentId: {wire: 'attachment_id'}, - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, - }; - -export function genieExecuteMessageAttachmentQueryRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieExecuteMessageAttachmentQueryRequestFieldMaskSchema - ); -} - -const genieExecuteMessageQueryRequestFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieExecuteMessageQueryRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieExecuteMessageQueryRequestFieldMaskSchema - ); -} - -const genieFeedbackFieldMaskSchema: FieldMaskSchema = { - comment: {wire: 'comment'}, - rating: {wire: 'rating'}, -}; - -export function genieFeedbackFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, genieFeedbackFieldMaskSchema); -} - -const genieGenerateDownloadFullQueryResultRequestFieldMaskSchema: FieldMaskSchema = - { - attachmentId: {wire: 'attachment_id'}, - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, - }; - -export function genieGenerateDownloadFullQueryResultRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGenerateDownloadFullQueryResultRequestFieldMaskSchema - ); -} - -const genieGenerateDownloadFullQueryResultResponseFieldMaskSchema: FieldMaskSchema = - { - downloadId: {wire: 'download_id'}, - downloadIdSignature: {wire: 'download_id_signature'}, - }; - -export function genieGenerateDownloadFullQueryResultResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGenerateDownloadFullQueryResultResponseFieldMaskSchema - ); -} - -const genieGetConversationMessageRequestFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieGetConversationMessageRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetConversationMessageRequestFieldMaskSchema - ); -} - -const genieGetDownloadFullQueryResultRequestFieldMaskSchema: FieldMaskSchema = { - attachmentId: {wire: 'attachment_id'}, - conversationId: {wire: 'conversation_id'}, - downloadId: {wire: 'download_id'}, - downloadIdSignature: {wire: 'download_id_signature'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieGetDownloadFullQueryResultRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetDownloadFullQueryResultRequestFieldMaskSchema - ); -} - -const genieGetDownloadFullQueryResultResponseFieldMaskSchema: FieldMaskSchema = - { - statementResponse: { - wire: 'statement_response', - children: () => statementResponseFieldMaskSchema, - }, - }; - -export function genieGetDownloadFullQueryResultResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetDownloadFullQueryResultResponseFieldMaskSchema - ); -} - -const genieGetEvalResultDetailsRequestFieldMaskSchema: FieldMaskSchema = { - evalRunId: {wire: 'eval_run_id'}, - resultId: {wire: 'result_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieGetEvalResultDetailsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetEvalResultDetailsRequestFieldMaskSchema - ); -} - -const genieGetEvalRunRequestFieldMaskSchema: FieldMaskSchema = { - evalRunId: {wire: 'eval_run_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieGetEvalRunRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetEvalRunRequestFieldMaskSchema - ); -} - -const genieGetMessageAttachmentQueryResultRequestFieldMaskSchema: FieldMaskSchema = - { - attachmentId: {wire: 'attachment_id'}, - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, - }; - -export function genieGetMessageAttachmentQueryResultRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetMessageAttachmentQueryResultRequestFieldMaskSchema - ); -} - -const genieGetMessageQueryResultRequestFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieGetMessageQueryResultRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetMessageQueryResultRequestFieldMaskSchema - ); -} - -const genieGetMessageQueryResultResponseFieldMaskSchema: FieldMaskSchema = { - statementResponse: { - wire: 'statement_response', - children: () => statementResponseFieldMaskSchema, - }, -}; - -export function genieGetMessageQueryResultResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetMessageQueryResultResponseFieldMaskSchema - ); -} - -const genieGetQueryResultByAttachmentRequestFieldMaskSchema: FieldMaskSchema = { - attachmentId: {wire: 'attachment_id'}, - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieGetQueryResultByAttachmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetQueryResultByAttachmentRequestFieldMaskSchema - ); -} - -const genieGetSpaceRequestFieldMaskSchema: FieldMaskSchema = { - includeSerializedSpace: {wire: 'include_serialized_space'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieGetSpaceRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieGetSpaceRequestFieldMaskSchema - ); -} - -const genieListConversationCommentsRequestFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieListConversationCommentsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListConversationCommentsRequestFieldMaskSchema - ); -} - -const genieListConversationCommentsResponseFieldMaskSchema: FieldMaskSchema = { - comments: {wire: 'comments'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function genieListConversationCommentsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListConversationCommentsResponseFieldMaskSchema - ); -} - -const genieListConversationMessagesRequestFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieListConversationMessagesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListConversationMessagesRequestFieldMaskSchema - ); -} - -const genieListConversationMessagesResponseFieldMaskSchema: FieldMaskSchema = { - messages: {wire: 'messages'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function genieListConversationMessagesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListConversationMessagesResponseFieldMaskSchema - ); -} - -const genieListConversationsRequestFieldMaskSchema: FieldMaskSchema = { - includeAll: {wire: 'include_all'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieListConversationsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListConversationsRequestFieldMaskSchema - ); -} - -const genieListConversationsResponseFieldMaskSchema: FieldMaskSchema = { - conversations: {wire: 'conversations'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function genieListConversationsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListConversationsResponseFieldMaskSchema - ); -} - -const genieListEvalResultsRequestFieldMaskSchema: FieldMaskSchema = { - evalRunId: {wire: 'eval_run_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieListEvalResultsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListEvalResultsRequestFieldMaskSchema - ); -} - -const genieListEvalResultsResponseFieldMaskSchema: FieldMaskSchema = { - evalResults: {wire: 'eval_results'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function genieListEvalResultsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListEvalResultsResponseFieldMaskSchema - ); -} - -const genieListEvalRunsRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieListEvalRunsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListEvalRunsRequestFieldMaskSchema - ); -} - -const genieListEvalRunsResponseFieldMaskSchema: FieldMaskSchema = { - evalRuns: {wire: 'eval_runs'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function genieListEvalRunsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListEvalRunsResponseFieldMaskSchema - ); -} - -const genieListMessageCommentsRequestFieldMaskSchema: FieldMaskSchema = { - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieListMessageCommentsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListMessageCommentsRequestFieldMaskSchema - ); -} - -const genieListMessageCommentsResponseFieldMaskSchema: FieldMaskSchema = { - comments: {wire: 'comments'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function genieListMessageCommentsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListMessageCommentsResponseFieldMaskSchema - ); -} - -const genieListSpacesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function genieListSpacesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListSpacesRequestFieldMaskSchema - ); -} - -const genieListSpacesResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - spaces: {wire: 'spaces'}, -}; - -export function genieListSpacesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieListSpacesResponseFieldMaskSchema - ); -} - -const genieMessageFieldMaskSchema: FieldMaskSchema = { - attachments: {wire: 'attachments'}, - content: {wire: 'content'}, - conversationId: {wire: 'conversation_id'}, - createdTimestamp: {wire: 'created_timestamp'}, - error: {wire: 'error', children: () => messageErrorFieldMaskSchema}, - feedback: {wire: 'feedback', children: () => genieFeedbackFieldMaskSchema}, - id: {wire: 'id'}, - lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, - messageId: {wire: 'message_id'}, - queryResult: {wire: 'query_result', children: () => resultFieldMaskSchema}, - spaceId: {wire: 'space_id'}, - status: {wire: 'status'}, - userId: {wire: 'user_id'}, -}; - -export function genieMessageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, genieMessageFieldMaskSchema); -} - -const genieMessageCommentFieldMaskSchema: FieldMaskSchema = { - content: {wire: 'content'}, - conversationId: {wire: 'conversation_id'}, - createdTimestamp: {wire: 'created_timestamp'}, - messageCommentId: {wire: 'message_comment_id'}, - messageId: {wire: 'message_id'}, - spaceId: {wire: 'space_id'}, - userId: {wire: 'user_id'}, -}; - -export function genieMessageCommentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieMessageCommentFieldMaskSchema - ); -} - -const genieQueryAttachmentFieldMaskSchema: FieldMaskSchema = { - description: {wire: 'description'}, - id: {wire: 'id'}, - lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, - parameters: {wire: 'parameters'}, - query: {wire: 'query'}, - queryResultMetadata: { - wire: 'query_result_metadata', - children: () => genieResultMetadataFieldMaskSchema, - }, - statementId: {wire: 'statement_id'}, - thoughts: {wire: 'thoughts'}, - title: {wire: 'title'}, -}; - -export function genieQueryAttachmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieQueryAttachmentFieldMaskSchema - ); -} - -const genieResultMetadataFieldMaskSchema: FieldMaskSchema = { - isTruncated: {wire: 'is_truncated'}, - rowCount: {wire: 'row_count'}, -}; - -export function genieResultMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieResultMetadataFieldMaskSchema - ); -} - -const genieSendMessageFeedbackRequestFieldMaskSchema: FieldMaskSchema = { - comment: {wire: 'comment'}, - conversationId: {wire: 'conversation_id'}, - messageId: {wire: 'message_id'}, - rating: {wire: 'rating'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieSendMessageFeedbackRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieSendMessageFeedbackRequestFieldMaskSchema - ); -} - -const genieSpaceFieldMaskSchema: FieldMaskSchema = { - description: {wire: 'description'}, - etag: {wire: 'etag'}, - parentPath: {wire: 'parent_path'}, - serializedSpace: {wire: 'serialized_space'}, - spaceId: {wire: 'space_id'}, - title: {wire: 'title'}, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function genieSpaceFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, genieSpaceFieldMaskSchema); -} - -const genieStartConversationMessageRequestFieldMaskSchema: FieldMaskSchema = { - content: {wire: 'content'}, - spaceId: {wire: 'space_id'}, -}; - -export function genieStartConversationMessageRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieStartConversationMessageRequestFieldMaskSchema - ); -} - -const genieStartConversationResponseFieldMaskSchema: FieldMaskSchema = { - conversation: { - wire: 'conversation', - children: () => genieConversationFieldMaskSchema, - }, - conversationId: {wire: 'conversation_id'}, - message: {wire: 'message', children: () => genieMessageFieldMaskSchema}, - messageId: {wire: 'message_id'}, -}; - -export function genieStartConversationResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieStartConversationResponseFieldMaskSchema - ); -} - -const genieSuggestedQuestionsAttachmentFieldMaskSchema: FieldMaskSchema = { - questions: {wire: 'questions'}, -}; - -export function genieSuggestedQuestionsAttachmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieSuggestedQuestionsAttachmentFieldMaskSchema - ); -} - -const genieTrashSpaceRequestFieldMaskSchema: FieldMaskSchema = { - spaceId: {wire: 'space_id'}, -}; - -export function genieTrashSpaceRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieTrashSpaceRequestFieldMaskSchema - ); -} - -const genieUpdateSpaceRequestFieldMaskSchema: FieldMaskSchema = { - description: {wire: 'description'}, - etag: {wire: 'etag'}, - serializedSpace: {wire: 'serialized_space'}, - spaceId: {wire: 'space_id'}, - title: {wire: 'title'}, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function genieUpdateSpaceRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genieUpdateSpaceRequestFieldMaskSchema - ); -} - -const listValueFieldMaskSchema: FieldMaskSchema = { - values: {wire: 'values'}, -}; - -export function listValueFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, listValueFieldMaskSchema); -} - -const mapStringValueEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value', children: () => valueFieldMaskSchema}, -}; - -export function mapStringValueEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - mapStringValueEntryFieldMaskSchema - ); -} - -const messageErrorFieldMaskSchema: FieldMaskSchema = { - error: {wire: 'error'}, - type: {wire: 'type'}, -}; - -export function messageErrorFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, messageErrorFieldMaskSchema); -} - -const messageStatusFieldMaskSchema: FieldMaskSchema = {}; - -export function messageStatusFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, messageStatusFieldMaskSchema); -} - -const policyFunctionArgumentFieldMaskSchema: FieldMaskSchema = { - column: {wire: 'column'}, - constant: {wire: 'constant'}, -}; - -export function policyFunctionArgumentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - policyFunctionArgumentFieldMaskSchema - ); -} - -const queryAttachmentParameterFieldMaskSchema: FieldMaskSchema = { - keyword: {wire: 'keyword'}, - sqlType: {wire: 'sql_type'}, - value: {wire: 'value'}, -}; - -export function queryAttachmentParameterFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - queryAttachmentParameterFieldMaskSchema - ); -} - -const resultFieldMaskSchema: FieldMaskSchema = { - isTruncated: {wire: 'is_truncated'}, - rowCount: {wire: 'row_count'}, - statementId: {wire: 'statement_id'}, - statementIdSignature: {wire: 'statement_id_signature'}, -}; - -export function resultFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, resultFieldMaskSchema); -} - -const resultDataFieldMaskSchema: FieldMaskSchema = { - byteCount: {wire: 'byte_count'}, - chunkIndex: {wire: 'chunk_index'}, - dataArray: {wire: 'data_array'}, - externalLinks: {wire: 'external_links'}, - nextChunkIndex: {wire: 'next_chunk_index'}, - nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, - rowCount: {wire: 'row_count'}, - rowOffset: {wire: 'row_offset'}, -}; - -export function resultDataFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, resultDataFieldMaskSchema); -} - -const resultManifestFieldMaskSchema: FieldMaskSchema = { - chunks: {wire: 'chunks'}, - format: {wire: 'format'}, - schema: {wire: 'schema', children: () => schemaFieldMaskSchema}, - totalByteCount: {wire: 'total_byte_count'}, - totalChunkCount: {wire: 'total_chunk_count'}, - totalRowCount: {wire: 'total_row_count'}, - truncated: {wire: 'truncated'}, -}; - -export function resultManifestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, resultManifestFieldMaskSchema); -} - -const schemaFieldMaskSchema: FieldMaskSchema = { - columnCount: {wire: 'column_count'}, - columns: {wire: 'columns'}, -}; - -export function schemaFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, schemaFieldMaskSchema); -} - -const statementResponseFieldMaskSchema: FieldMaskSchema = { - manifest: {wire: 'manifest', children: () => resultManifestFieldMaskSchema}, - result: {wire: 'result', children: () => resultDataFieldMaskSchema}, - statementId: {wire: 'statement_id'}, - status: {wire: 'status', children: () => statementStatusFieldMaskSchema}, -}; - -export function statementResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - statementResponseFieldMaskSchema - ); -} - -const statementStatusFieldMaskSchema: FieldMaskSchema = { - error: { - wire: 'error', - children: () => databricksServiceExceptionProtoFieldMaskSchema, - }, - sqlState: {wire: 'sql_state'}, - state: {wire: 'state'}, -}; - -export function statementStatusFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - statementStatusFieldMaskSchema - ); -} - -const structFieldMaskSchema: FieldMaskSchema = { - fields: {wire: 'fields'}, -}; - -export function structFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, structFieldMaskSchema); -} - -const textAttachmentFieldMaskSchema: FieldMaskSchema = { - content: {wire: 'content'}, - id: {wire: 'id'}, - phase: {wire: 'phase'}, - purpose: {wire: 'purpose'}, - verificationMetadata: { - wire: 'verification_metadata', - children: () => verificationMetadataFieldMaskSchema, - }, -}; - -export function textAttachmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, textAttachmentFieldMaskSchema); -} - -const thoughtFieldMaskSchema: FieldMaskSchema = { - content: {wire: 'content'}, - thoughtType: {wire: 'thought_type'}, -}; - -export function thoughtFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, thoughtFieldMaskSchema); -} - -const valueFieldMaskSchema: FieldMaskSchema = { - boolValue: {wire: 'bool_value'}, - listValue: {wire: 'list_value', children: () => listValueFieldMaskSchema}, - nullValue: {wire: 'null_value'}, - numberValue: {wire: 'number_value'}, - stringValue: {wire: 'string_value'}, - structValue: {wire: 'struct_value', children: () => structFieldMaskSchema}, -}; - -export function valueFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, valueFieldMaskSchema); -} - -const verificationMetadataFieldMaskSchema: FieldMaskSchema = { - index: {wire: 'index'}, - section: {wire: 'section'}, -}; - -export function verificationMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - verificationMetadataFieldMaskSchema - ); -} diff --git a/packages/globalinitscripts/src/v2/model.ts b/packages/globalinitscripts/src/v2/model.ts index d0017374..ce1850c1 100644 --- a/packages/globalinitscripts/src/v2/model.ts +++ b/packages/globalinitscripts/src/v2/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface CreateGlobalInitScript { @@ -96,24 +94,6 @@ export interface UpdateGlobalInitScript { // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name. export interface UpdateGlobalInitScript_Response {} -export const unmarshalCreateGlobalInitScriptSchema: z.ZodType = - z - .object({ - name: z.string().optional(), - script: z - .string() - .transform(s => Uint8Array.from(atob(s), c => c.charCodeAt(0))) - .optional(), - position: z.number().optional(), - enabled: z.boolean().optional(), - }) - .transform(d => ({ - name: d.name, - script: d.script, - position: d.position, - enabled: d.enabled, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreateGlobalInitScript_ResponseSchema: z.ZodType = z @@ -163,26 +143,6 @@ export const unmarshalListGlobalInitScripts_ResponseSchema: z.ZodType = - z - .object({ - script_id: z.string().optional(), - name: z.string().optional(), - script: z - .string() - .transform(s => Uint8Array.from(atob(s), c => c.charCodeAt(0))) - .optional(), - position: z.number().optional(), - enabled: z.boolean().optional(), - }) - .transform(d => ({ - scriptId: d.script_id, - name: d.name, - script: d.script, - position: d.position, - enabled: d.enabled, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalUpdateGlobalInitScript_ResponseSchema: z.ZodType = z.object({}); @@ -206,53 +166,6 @@ export const marshalCreateGlobalInitScriptSchema: z.ZodType = z enabled: d.enabled, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreateGlobalInitScript_ResponseSchema: z.ZodType = z - .object({ - scriptId: z.string().optional(), - }) - .transform(d => ({ - script_id: d.scriptId, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteGlobalInitScript_ResponseSchema: z.ZodType = z.object( - {} -); - -export const marshalGlobalInitScriptDetailsSchema: z.ZodType = z - .object({ - scriptId: z.string().optional(), - name: z.string().optional(), - position: z.number().optional(), - enabled: z.boolean().optional(), - createdBy: z.string().optional(), - createdAt: z.number().optional(), - updatedBy: z.string().optional(), - updatedAt: z.number().optional(), - }) - .transform(d => ({ - script_id: d.scriptId, - name: d.name, - position: d.position, - enabled: d.enabled, - created_by: d.createdBy, - created_at: d.createdAt, - updated_by: d.updatedBy, - updated_at: d.updatedAt, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListGlobalInitScripts_ResponseSchema: z.ZodType = z - .object({ - scripts: z - .array(z.lazy(() => marshalGlobalInitScriptDetailsSchema)) - .optional(), - }) - .transform(d => ({ - scripts: d.scripts, - })); - export const marshalUpdateGlobalInitScriptSchema: z.ZodType = z .object({ scriptId: z.string().optional(), @@ -273,154 +186,3 @@ export const marshalUpdateGlobalInitScriptSchema: z.ZodType = z position: d.position, enabled: d.enabled, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalUpdateGlobalInitScript_ResponseSchema: z.ZodType = z.object( - {} -); - -const createGlobalInitScriptFieldMaskSchema: FieldMaskSchema = { - enabled: {wire: 'enabled'}, - name: {wire: 'name'}, - position: {wire: 'position'}, - script: {wire: 'script'}, -}; - -export function createGlobalInitScriptFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createGlobalInitScriptFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createGlobalInitScript_ResponseFieldMaskSchema: FieldMaskSchema = { - scriptId: {wire: 'script_id'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createGlobalInitScript_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createGlobalInitScript_ResponseFieldMaskSchema - ); -} - -const deleteGlobalInitScriptFieldMaskSchema: FieldMaskSchema = { - scriptId: {wire: 'script_id'}, -}; - -export function deleteGlobalInitScriptFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteGlobalInitScriptFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteGlobalInitScript_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteGlobalInitScript_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteGlobalInitScript_ResponseFieldMaskSchema - ); -} - -const getGlobalInitScriptFieldMaskSchema: FieldMaskSchema = { - scriptId: {wire: 'script_id'}, -}; - -export function getGlobalInitScriptFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getGlobalInitScriptFieldMaskSchema - ); -} - -const globalInitScriptDetailsFieldMaskSchema: FieldMaskSchema = { - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - enabled: {wire: 'enabled'}, - name: {wire: 'name'}, - position: {wire: 'position'}, - scriptId: {wire: 'script_id'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function globalInitScriptDetailsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - globalInitScriptDetailsFieldMaskSchema - ); -} - -const listGlobalInitScriptsFieldMaskSchema: FieldMaskSchema = {}; - -export function listGlobalInitScriptsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listGlobalInitScriptsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listGlobalInitScripts_ResponseFieldMaskSchema: FieldMaskSchema = { - scripts: {wire: 'scripts'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listGlobalInitScripts_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listGlobalInitScripts_ResponseFieldMaskSchema - ); -} - -const updateGlobalInitScriptFieldMaskSchema: FieldMaskSchema = { - enabled: {wire: 'enabled'}, - name: {wire: 'name'}, - position: {wire: 'position'}, - script: {wire: 'script'}, - scriptId: {wire: 'script_id'}, -}; - -export function updateGlobalInitScriptFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateGlobalInitScriptFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateGlobalInitScript_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateGlobalInitScript_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateGlobalInitScript_ResponseFieldMaskSchema - ); -} diff --git a/packages/grants/src/v1/model.ts b/packages/grants/src/v1/model.ts index b81a435b..54e14fba 100644 --- a/packages/grants/src/v1/model.ts +++ b/packages/grants/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface EffectivePrivilege { @@ -291,20 +289,6 @@ export const unmarshalListPrivilegeAssignmentsResponseSchema: z.ZodType = z - .object({ - principal: z.string().optional(), - add: z.array(z.string()).optional(), - remove: z.array(z.string()).optional(), - principal_id: z.number().optional(), - }) - .transform(d => ({ - principal: d.principal, - add: d.add, - remove: d.remove, - principalId: d.principal_id, - })); - export const unmarshalPrivilegeAssignmentSchema: z.ZodType = z .object({ @@ -318,18 +302,6 @@ export const unmarshalPrivilegeAssignmentSchema: z.ZodType principalId: d.principal_id, })); -export const unmarshalUpdatePermissionsSchema: z.ZodType = z - .object({ - securable_type: z.string().optional(), - securable_full_name: z.string().optional(), - changes: z.array(z.lazy(() => unmarshalPermissionsChangeSchema)).optional(), - }) - .transform(d => ({ - securableType: d.securable_type, - securableFullName: d.securable_full_name, - changes: d.changes, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalUpdatePermissions_ResponseSchema: z.ZodType = z @@ -342,81 +314,6 @@ export const unmarshalUpdatePermissions_ResponseSchema: z.ZodType ({ - privilege: d.privilege, - inherited_from_type: d.inheritedFromType, - inherited_from_name: d.inheritedFromName, - })); - -export const marshalEffectivePrivilegeAssignmentSchema: z.ZodType = z - .object({ - principal: z.string().optional(), - privileges: z - .array(z.lazy(() => marshalEffectivePrivilegeSchema)) - .optional(), - }) - .transform(d => ({ - principal: d.principal, - privileges: d.privileges, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetEffectivePermissions_ResponseSchema: z.ZodType = z - .object({ - nextPageToken: z.string().optional(), - privilegeAssignments: z - .array(z.lazy(() => marshalEffectivePrivilegeAssignmentSchema)) - .optional(), - }) - .transform(d => ({ - next_page_token: d.nextPageToken, - privilege_assignments: d.privilegeAssignments, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetPermissions_ResponseSchema: z.ZodType = z - .object({ - nextPageToken: z.string().optional(), - privilegeAssignments: z - .array(z.lazy(() => marshalPrivilegeAssignmentSchema)) - .optional(), - }) - .transform(d => ({ - next_page_token: d.nextPageToken, - privilege_assignments: d.privilegeAssignments, - })); - -export const marshalListEffectivePrivilegeAssignmentsResponseSchema: z.ZodType = - z - .object({ - effectivePrivilegeAssignments: z - .array(z.lazy(() => marshalEffectivePrivilegeAssignmentSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - effective_privilege_assignments: d.effectivePrivilegeAssignments, - next_page_token: d.nextPageToken, - })); - -export const marshalListPrivilegeAssignmentsResponseSchema: z.ZodType = z - .object({ - privilegeAssignments: z - .array(z.lazy(() => marshalPrivilegeAssignmentSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - privilege_assignments: d.privilegeAssignments, - next_page_token: d.nextPageToken, - })); - export const marshalPermissionsChangeSchema: z.ZodType = z .object({ principal: z.string().optional(), @@ -431,18 +328,6 @@ export const marshalPermissionsChangeSchema: z.ZodType = z principal_id: d.principalId, })); -export const marshalPrivilegeAssignmentSchema: z.ZodType = z - .object({ - principal: z.string().optional(), - privileges: z.array(z.string()).optional(), - principalId: z.number().optional(), - }) - .transform(d => ({ - principal: d.principal, - privileges: d.privileges, - principal_id: d.principalId, - })); - export const marshalUpdatePermissionsSchema: z.ZodType = z .object({ securableType: z.string().optional(), @@ -454,234 +339,3 @@ export const marshalUpdatePermissionsSchema: z.ZodType = z securable_full_name: d.securableFullName, changes: d.changes, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalUpdatePermissions_ResponseSchema: z.ZodType = z - .object({ - privilegeAssignments: z - .array(z.lazy(() => marshalPrivilegeAssignmentSchema)) - .optional(), - }) - .transform(d => ({ - privilege_assignments: d.privilegeAssignments, - })); - -const effectivePrivilegeFieldMaskSchema: FieldMaskSchema = { - inheritedFromName: {wire: 'inherited_from_name'}, - inheritedFromType: {wire: 'inherited_from_type'}, - privilege: {wire: 'privilege'}, -}; - -export function effectivePrivilegeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - effectivePrivilegeFieldMaskSchema - ); -} - -const effectivePrivilegeAssignmentFieldMaskSchema: FieldMaskSchema = { - principal: {wire: 'principal'}, - privileges: {wire: 'privileges'}, -}; - -export function effectivePrivilegeAssignmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - effectivePrivilegeAssignmentFieldMaskSchema - ); -} - -const getEffectivePermissionsFieldMaskSchema: FieldMaskSchema = { - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, - principal: {wire: 'principal'}, - securableFullName: {wire: 'securable_full_name'}, - securableType: {wire: 'securable_type'}, -}; - -export function getEffectivePermissionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getEffectivePermissionsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getEffectivePermissions_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - privilegeAssignments: {wire: 'privilege_assignments'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getEffectivePermissions_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getEffectivePermissions_ResponseFieldMaskSchema - ); -} - -const getPermissionsFieldMaskSchema: FieldMaskSchema = { - includeDeletedPrincipals: {wire: 'include_deleted_principals'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, - principal: {wire: 'principal'}, - securableFullName: {wire: 'securable_full_name'}, - securableType: {wire: 'securable_type'}, -}; - -export function getPermissionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, getPermissionsFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getPermissions_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - privilegeAssignments: {wire: 'privilege_assignments'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getPermissions_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getPermissions_ResponseFieldMaskSchema - ); -} - -const listEffectivePrivilegeAssignmentsRequestFieldMaskSchema: FieldMaskSchema = - { - fullName: {wire: 'full_name'}, - includeDeletedPrincipals: {wire: 'include_deleted_principals'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - principal: {wire: 'principal'}, - securableType: {wire: 'securable_type'}, - }; - -export function listEffectivePrivilegeAssignmentsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listEffectivePrivilegeAssignmentsRequestFieldMaskSchema - ); -} - -const listEffectivePrivilegeAssignmentsResponseFieldMaskSchema: FieldMaskSchema = - { - effectivePrivilegeAssignments: {wire: 'effective_privilege_assignments'}, - nextPageToken: {wire: 'next_page_token'}, - }; - -export function listEffectivePrivilegeAssignmentsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listEffectivePrivilegeAssignmentsResponseFieldMaskSchema - ); -} - -const listPrivilegeAssignmentsRequestFieldMaskSchema: FieldMaskSchema = { - fullName: {wire: 'full_name'}, - includeDeletedPrincipals: {wire: 'include_deleted_principals'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - principal: {wire: 'principal'}, - securableType: {wire: 'securable_type'}, -}; - -export function listPrivilegeAssignmentsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPrivilegeAssignmentsRequestFieldMaskSchema - ); -} - -const listPrivilegeAssignmentsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - privilegeAssignments: {wire: 'privilege_assignments'}, -}; - -export function listPrivilegeAssignmentsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPrivilegeAssignmentsResponseFieldMaskSchema - ); -} - -const permissionsChangeFieldMaskSchema: FieldMaskSchema = { - add: {wire: 'add'}, - principal: {wire: 'principal'}, - principalId: {wire: 'principal_id'}, - remove: {wire: 'remove'}, -}; - -export function permissionsChangeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - permissionsChangeFieldMaskSchema - ); -} - -const privilegeAssignmentFieldMaskSchema: FieldMaskSchema = { - principal: {wire: 'principal'}, - principalId: {wire: 'principal_id'}, - privileges: {wire: 'privileges'}, -}; - -export function privilegeAssignmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - privilegeAssignmentFieldMaskSchema - ); -} - -const updatePermissionsFieldMaskSchema: FieldMaskSchema = { - changes: {wire: 'changes'}, - securableFullName: {wire: 'securable_full_name'}, - securableType: {wire: 'securable_type'}, -}; - -export function updatePermissionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updatePermissionsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updatePermissions_ResponseFieldMaskSchema: FieldMaskSchema = { - privilegeAssignments: {wire: 'privilege_assignments'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updatePermissions_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updatePermissions_ResponseFieldMaskSchema - ); -} diff --git a/packages/iam/src/v2/client.ts b/packages/iam/src/v2/client.ts index b93feb78..c98c4238 100644 --- a/packages/iam/src/v2/client.ts +++ b/packages/iam/src/v2/client.ts @@ -874,7 +874,7 @@ export class Client { params.append('account_id', req.accountId); } if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -905,7 +905,7 @@ export class Client { const url = `${this.host}/api/2.0/identity/groups/${String(req.internalId ?? '')}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -1246,7 +1246,7 @@ export class Client { params.append('account_id', req.accountId); } if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -1280,7 +1280,7 @@ export class Client { const url = `${this.host}/api/2.0/identity/servicePrincipals/${String(req.internalId ?? '')}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -1600,7 +1600,7 @@ export class Client { params.append('account_id', req.accountId); } if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -1631,7 +1631,7 @@ export class Client { const url = `${this.host}/api/2.0/identity/users/${String(req.internalId ?? '')}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -2074,7 +2074,7 @@ export class Client { params.append('account_id', req.accountId); } if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -2113,7 +2113,7 @@ export class Client { const url = `${this.host}/api/2.0/identity/workspaceAssignmentDetails/${String(req.principalId ?? '')}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -2171,7 +2171,7 @@ export class Client { const url = `${this.host}/api/2.0/identity/workspaceIdentityDetails/${String(req.principalId ?? '')}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/iam/src/v2/model.ts b/packages/iam/src/v2/model.ts index 8dbd39d4..7249c5a1 100644 --- a/packages/iam/src/v2/model.ts +++ b/packages/iam/src/v2/model.ts @@ -835,7 +835,7 @@ export interface UpdateGroupProxyRequest { /** Required. Group to be updated in */ group?: Group | undefined; /** Optional. The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** TODO: Write description later when this method is implemented */ @@ -847,7 +847,7 @@ export interface UpdateGroupRequest { /** Required. Group to be updated in */ group?: Group | undefined; /** Optional. The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** TODO: Write description later when this method is implemented */ @@ -857,7 +857,7 @@ export interface UpdateServicePrincipalProxyRequest { /** Required. Service principal to be updated in */ servicePrincipal?: ServicePrincipal | undefined; /** Optional. The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** TODO: Write description later when this method is implemented */ @@ -869,7 +869,7 @@ export interface UpdateServicePrincipalRequest { /** Required. Service Principal to be updated in */ servicePrincipal?: ServicePrincipal | undefined; /** Optional. The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** @@ -886,7 +886,7 @@ export interface UpdateUserProxyRequest { /** Required. User to be updated in */ user?: User | undefined; /** Optional. The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** @@ -905,7 +905,7 @@ export interface UpdateUserRequest { /** Required. User to be updated in */ user?: User | undefined; /** Optional. The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** Proxy request for updating a workspace assignment detail for a principal. */ @@ -915,7 +915,7 @@ export interface UpdateWorkspaceAssignmentDetailProxyRequest { /** Required. Workspace assignment detail to be updated in . */ workspaceAssignmentDetail?: WorkspaceAssignmentDetail | undefined; /** Required. The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** TBD since the only updatable field is permissions */ @@ -929,7 +929,7 @@ export interface UpdateWorkspaceAssignmentDetailRequest { /** Required. Workspace assignment detail to be updated in . */ workspaceAssignmentDetail?: WorkspaceAssignmentDetail | undefined; /** Required. The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** Request message for updating the workspace identity details for a principal in a workspace. */ @@ -939,7 +939,7 @@ export interface UpdateWorkspaceIdentityDetailRequest { /** Required. Workspace identity detail to be updated in . */ workspaceIdentityDetail?: WorkspaceIdentityDetail | undefined; /** Required. The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } /** The details of a User resource. */ @@ -1149,26 +1149,6 @@ export const unmarshalListWorkspaceAssignmentDetailsResponseSchema: z.ZodType
  • = - z - .object({ - external_id: z.string().optional(), - }) - .transform(d => ({ - externalId: d.external_id, - })); - -export const unmarshalResolveGroupRequestSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - external_id: z.string().optional(), - }) - .transform(d => ({ - accountId: d.account_id, - externalId: d.external_id, - })); - export const unmarshalResolveGroupResponseSchema: z.ZodType = z .object({ @@ -1178,26 +1158,6 @@ export const unmarshalResolveGroupResponseSchema: z.ZodType = - z - .object({ - external_id: z.string().optional(), - }) - .transform(d => ({ - externalId: d.external_id, - })); - -export const unmarshalResolveServicePrincipalRequestSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - external_id: z.string().optional(), - }) - .transform(d => ({ - accountId: d.account_id, - externalId: d.external_id, - })); - export const unmarshalResolveServicePrincipalResponseSchema: z.ZodType = z .object({ @@ -1209,26 +1169,6 @@ export const unmarshalResolveServicePrincipalResponseSchema: z.ZodType = - z - .object({ - external_id: z.string().optional(), - }) - .transform(d => ({ - externalId: d.external_id, - })); - -export const unmarshalResolveUserRequestSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - external_id: z.string().optional(), - }) - .transform(d => ({ - accountId: d.account_id, - externalId: d.external_id, - })); - export const unmarshalResolveUserResponseSchema: z.ZodType = z .object({ @@ -1399,98 +1339,6 @@ export const marshalGroupSchema: z.ZodType = z group_name: d.groupName, })); -export const marshalListAccountAccessIdentityRulesResponseSchema: z.ZodType = z - .object({ - accountAccessIdentityRules: z - .array(z.lazy(() => marshalAccountAccessIdentityRuleSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - account_access_identity_rules: d.accountAccessIdentityRules, - next_page_token: d.nextPageToken, - })); - -export const marshalListDirectGroupMembersResponseSchema: z.ZodType = z - .object({ - directGroupMembers: z - .array(z.lazy(() => marshalDirectGroupMemberSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - direct_group_members: d.directGroupMembers, - next_page_token: d.nextPageToken, - })); - -export const marshalListGroupsResponseSchema: z.ZodType = z - .object({ - groups: z.array(z.lazy(() => marshalGroupSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - groups: d.groups, - next_page_token: d.nextPageToken, - })); - -export const marshalListServicePrincipalsResponseSchema: z.ZodType = z - .object({ - servicePrincipals: z - .array(z.lazy(() => marshalServicePrincipalSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - service_principals: d.servicePrincipals, - next_page_token: d.nextPageToken, - })); - -export const marshalListTransitiveParentGroupsResponseSchema: z.ZodType = z - .object({ - transitiveParentGroups: z - .array(z.lazy(() => marshalTransitiveParentGroupSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - transitive_parent_groups: d.transitiveParentGroups, - next_page_token: d.nextPageToken, - })); - -export const marshalListUsersResponseSchema: z.ZodType = z - .object({ - users: z.array(z.lazy(() => marshalUserSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - users: d.users, - next_page_token: d.nextPageToken, - })); - -export const marshalListWorkspaceAccessDetailsResponseSchema: z.ZodType = z - .object({ - workspaceAccessDetails: z - .array(z.lazy(() => marshalWorkspaceAccessDetailSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - workspace_access_details: d.workspaceAccessDetails, - next_page_token: d.nextPageToken, - })); - -export const marshalListWorkspaceAssignmentDetailsResponseSchema: z.ZodType = z - .object({ - workspaceAssignmentDetails: z - .array(z.lazy(() => marshalWorkspaceAssignmentDetailSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - workspace_assignment_details: d.workspaceAssignmentDetails, - next_page_token: d.nextPageToken, - })); - export const marshalResolveGroupProxyRequestSchema: z.ZodType = z .object({ externalId: z.string().optional(), @@ -1509,14 +1357,6 @@ export const marshalResolveGroupRequestSchema: z.ZodType = z external_id: d.externalId, })); -export const marshalResolveGroupResponseSchema: z.ZodType = z - .object({ - group: z.lazy(() => marshalGroupSchema).optional(), - }) - .transform(d => ({ - group: d.group, - })); - export const marshalResolveServicePrincipalProxyRequestSchema: z.ZodType = z .object({ externalId: z.string().optional(), @@ -1535,14 +1375,6 @@ export const marshalResolveServicePrincipalRequestSchema: z.ZodType = z external_id: d.externalId, })); -export const marshalResolveServicePrincipalResponseSchema: z.ZodType = z - .object({ - servicePrincipal: z.lazy(() => marshalServicePrincipalSchema).optional(), - }) - .transform(d => ({ - service_principal: d.servicePrincipal, - })); - export const marshalResolveUserProxyRequestSchema: z.ZodType = z .object({ externalId: z.string().optional(), @@ -1561,14 +1393,6 @@ export const marshalResolveUserRequestSchema: z.ZodType = z external_id: d.externalId, })); -export const marshalResolveUserResponseSchema: z.ZodType = z - .object({ - user: z.lazy(() => marshalUserSchema).optional(), - }) - .transform(d => ({ - user: d.user, - })); - export const marshalServicePrincipalSchema: z.ZodType = z .object({ accountId: z.string().optional(), @@ -1587,18 +1411,6 @@ export const marshalServicePrincipalSchema: z.ZodType = z account_sp_status: d.accountSpStatus, })); -export const marshalTransitiveParentGroupSchema: z.ZodType = z - .object({ - accountId: z.string().optional(), - internalId: z.number().optional(), - externalId: z.string().optional(), - }) - .transform(d => ({ - account_id: d.accountId, - internal_id: d.internalId, - external_id: d.externalId, - })); - export const marshalUserSchema: z.ZodType = z .object({ accountId: z.string().optional(), @@ -1628,26 +1440,6 @@ export const marshalUser_NameSchema: z.ZodType = z family_name: d.familyName, })); -export const marshalWorkspaceAccessDetailSchema: z.ZodType = z - .object({ - principalId: z.number().optional(), - workspaceId: z.number().optional(), - accountId: z.string().optional(), - principalType: z.enum(PrincipalType).optional(), - accessType: z.enum(WorkspaceAccessDetail_AccessType).optional(), - status: z.enum(State).optional(), - permissions: z.array(z.enum(WorkspacePermission)).optional(), - }) - .transform(d => ({ - principal_id: d.principalId, - workspace_id: d.workspaceId, - account_id: d.accountId, - principal_type: d.principalType, - access_type: d.accessType, - status: d.status, - permissions: d.permissions, - })); - export const marshalWorkspaceAssignmentDetailSchema: z.ZodType = z .object({ principalId: z.number().optional(), @@ -1678,1245 +1470,52 @@ export const marshalWorkspaceIdentityDetailSchema: z.ZodType = z assignment_type: d.assignmentType, })); -const accountAccessIdentityRuleFieldMaskSchema: FieldMaskSchema = { - action: {wire: 'action'}, - displayName: {wire: 'display_name'}, - externalPrincipalId: {wire: 'external_principal_id'}, - name: {wire: 'name'}, - principalType: {wire: 'principal_type'}, -}; - -export function accountAccessIdentityRuleFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - accountAccessIdentityRuleFieldMaskSchema - ); -} - -const createAccountAccessIdentityRuleRequestFieldMaskSchema: FieldMaskSchema = { - accountAccessIdentityRule: { - wire: 'account_access_identity_rule', - children: () => accountAccessIdentityRuleFieldMaskSchema, - }, - externalPrincipalId: {wire: 'external_principal_id'}, - parent: {wire: 'parent'}, -}; - -export function createAccountAccessIdentityRuleRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createAccountAccessIdentityRuleRequestFieldMaskSchema - ); -} - -const createDirectGroupMemberProxyRequestFieldMaskSchema: FieldMaskSchema = { - directGroupMember: { - wire: 'direct_group_member', - children: () => directGroupMemberFieldMaskSchema, - }, - groupId: {wire: 'group_id'}, -}; - -export function createDirectGroupMemberProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createDirectGroupMemberProxyRequestFieldMaskSchema - ); -} - -const createDirectGroupMemberRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - directGroupMember: { - wire: 'direct_group_member', - children: () => directGroupMemberFieldMaskSchema, - }, - groupId: {wire: 'group_id'}, -}; - -export function createDirectGroupMemberRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createDirectGroupMemberRequestFieldMaskSchema - ); -} - -const createGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { - group: {wire: 'group', children: () => groupFieldMaskSchema}, -}; - -export function createGroupProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createGroupProxyRequestFieldMaskSchema - ); -} - -const createGroupRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - group: {wire: 'group', children: () => groupFieldMaskSchema}, -}; - -export function createGroupRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createGroupRequestFieldMaskSchema - ); -} - -const createServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { - servicePrincipal: { - wire: 'service_principal', - children: () => servicePrincipalFieldMaskSchema, - }, -}; - -export function createServicePrincipalProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createServicePrincipalProxyRequestFieldMaskSchema - ); -} - -const createServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { +const groupFieldMaskSchema: FieldMaskSchema = { accountId: {wire: 'account_id'}, - servicePrincipal: { - wire: 'service_principal', - children: () => servicePrincipalFieldMaskSchema, - }, -}; - -export function createServicePrincipalRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createServicePrincipalRequestFieldMaskSchema - ); -} - -const createUserProxyRequestFieldMaskSchema: FieldMaskSchema = { - user: {wire: 'user', children: () => userFieldMaskSchema}, + externalId: {wire: 'external_id'}, + groupName: {wire: 'group_name'}, + internalId: {wire: 'internal_id'}, }; -export function createUserProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createUserProxyRequestFieldMaskSchema - ); +export function groupFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, groupFieldMaskSchema); } -const createUserRequestFieldMaskSchema: FieldMaskSchema = { +const servicePrincipalFieldMaskSchema: FieldMaskSchema = { accountId: {wire: 'account_id'}, - user: {wire: 'user', children: () => userFieldMaskSchema}, + accountSpStatus: {wire: 'account_sp_status'}, + applicationId: {wire: 'application_id'}, + displayName: {wire: 'display_name'}, + externalId: {wire: 'external_id'}, + internalId: {wire: 'internal_id'}, }; -export function createUserRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createUserRequestFieldMaskSchema - ); -} - -const createWorkspaceAssignmentDetailProxyRequestFieldMaskSchema: FieldMaskSchema = - { - workspaceAssignmentDetail: { - wire: 'workspace_assignment_detail', - children: () => workspaceAssignmentDetailFieldMaskSchema, - }, - }; - -export function createWorkspaceAssignmentDetailProxyRequestFieldMask( +export function servicePrincipalFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( +): FieldMask { + return FieldMask.build( paths, - createWorkspaceAssignmentDetailProxyRequestFieldMaskSchema + servicePrincipalFieldMaskSchema ); } -const createWorkspaceAssignmentDetailRequestFieldMaskSchema: FieldMaskSchema = { +const userFieldMaskSchema: FieldMaskSchema = { accountId: {wire: 'account_id'}, - workspaceAssignmentDetail: { - wire: 'workspace_assignment_detail', - children: () => workspaceAssignmentDetailFieldMaskSchema, - }, - workspaceId: {wire: 'workspace_id'}, -}; - -export function createWorkspaceAssignmentDetailRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createWorkspaceAssignmentDetailRequestFieldMaskSchema - ); -} - -const deleteAccountAccessIdentityRuleRequestFieldMaskSchema: FieldMaskSchema = { - externalPrincipalId: {wire: 'external_principal_id'}, - parent: {wire: 'parent'}, -}; - -export function deleteAccountAccessIdentityRuleRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteAccountAccessIdentityRuleRequestFieldMaskSchema - ); -} - -const deleteDirectGroupMemberProxyRequestFieldMaskSchema: FieldMaskSchema = { - groupId: {wire: 'group_id'}, - principalId: {wire: 'principal_id'}, + accountUserStatus: {wire: 'account_user_status'}, + externalId: {wire: 'external_id'}, + internalId: {wire: 'internal_id'}, + name: {wire: 'name', children: () => user_NameFieldMaskSchema}, + username: {wire: 'username'}, }; -export function deleteDirectGroupMemberProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteDirectGroupMemberProxyRequestFieldMaskSchema - ); +export function userFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, userFieldMaskSchema); } -const deleteDirectGroupMemberRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - groupId: {wire: 'group_id'}, - principalId: {wire: 'principal_id'}, -}; - -export function deleteDirectGroupMemberRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteDirectGroupMemberRequestFieldMaskSchema - ); -} - -const deleteGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { - internalId: {wire: 'internal_id'}, -}; - -export function deleteGroupProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteGroupProxyRequestFieldMaskSchema - ); -} - -const deleteGroupRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - internalId: {wire: 'internal_id'}, -}; - -export function deleteGroupRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteGroupRequestFieldMaskSchema - ); -} - -const deleteServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { - internalId: {wire: 'internal_id'}, -}; - -export function deleteServicePrincipalProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteServicePrincipalProxyRequestFieldMaskSchema - ); -} - -const deleteServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - internalId: {wire: 'internal_id'}, -}; - -export function deleteServicePrincipalRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteServicePrincipalRequestFieldMaskSchema - ); -} - -const deleteUserProxyRequestFieldMaskSchema: FieldMaskSchema = { - internalId: {wire: 'internal_id'}, -}; - -export function deleteUserProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteUserProxyRequestFieldMaskSchema - ); -} - -const deleteUserRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - internalId: {wire: 'internal_id'}, -}; - -export function deleteUserRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteUserRequestFieldMaskSchema - ); -} - -const deleteWorkspaceAssignmentDetailProxyRequestFieldMaskSchema: FieldMaskSchema = - { - principalId: {wire: 'principal_id'}, - }; - -export function deleteWorkspaceAssignmentDetailProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteWorkspaceAssignmentDetailProxyRequestFieldMaskSchema - ); -} - -const deleteWorkspaceAssignmentDetailRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - principalId: {wire: 'principal_id'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function deleteWorkspaceAssignmentDetailRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteWorkspaceAssignmentDetailRequestFieldMaskSchema - ); -} - -const directGroupMemberFieldMaskSchema: FieldMaskSchema = { - displayName: {wire: 'display_name'}, - externalId: {wire: 'external_id'}, - membershipSource: {wire: 'membership_source'}, - principalId: {wire: 'principal_id'}, - principalType: {wire: 'principal_type'}, -}; - -export function directGroupMemberFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - directGroupMemberFieldMaskSchema - ); -} - -const getAccountAccessIdentityRuleRequestFieldMaskSchema: FieldMaskSchema = { - externalPrincipalId: {wire: 'external_principal_id'}, - parent: {wire: 'parent'}, -}; - -export function getAccountAccessIdentityRuleRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getAccountAccessIdentityRuleRequestFieldMaskSchema - ); -} - -const getDirectGroupMemberProxyRequestFieldMaskSchema: FieldMaskSchema = { - groupId: {wire: 'group_id'}, - principalId: {wire: 'principal_id'}, -}; - -export function getDirectGroupMemberProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getDirectGroupMemberProxyRequestFieldMaskSchema - ); -} - -const getDirectGroupMemberRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - groupId: {wire: 'group_id'}, - principalId: {wire: 'principal_id'}, -}; - -export function getDirectGroupMemberRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getDirectGroupMemberRequestFieldMaskSchema - ); -} - -const getGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { - internalId: {wire: 'internal_id'}, -}; - -export function getGroupProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getGroupProxyRequestFieldMaskSchema - ); -} - -const getGroupRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - internalId: {wire: 'internal_id'}, -}; - -export function getGroupRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getGroupRequestFieldMaskSchema - ); -} - -const getServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { - internalId: {wire: 'internal_id'}, -}; - -export function getServicePrincipalProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getServicePrincipalProxyRequestFieldMaskSchema - ); -} - -const getServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - internalId: {wire: 'internal_id'}, -}; - -export function getServicePrincipalRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getServicePrincipalRequestFieldMaskSchema - ); -} - -const getUserProxyRequestFieldMaskSchema: FieldMaskSchema = { - internalId: {wire: 'internal_id'}, -}; - -export function getUserProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getUserProxyRequestFieldMaskSchema - ); -} - -const getUserRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - internalId: {wire: 'internal_id'}, -}; - -export function getUserRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, getUserRequestFieldMaskSchema); -} - -const getWorkspaceAccessDetailLocalRequestFieldMaskSchema: FieldMaskSchema = { - principalId: {wire: 'principal_id'}, - view: {wire: 'view'}, -}; - -export function getWorkspaceAccessDetailLocalRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceAccessDetailLocalRequestFieldMaskSchema - ); -} - -const getWorkspaceAccessDetailRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - principalId: {wire: 'principal_id'}, - view: {wire: 'view'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function getWorkspaceAccessDetailRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceAccessDetailRequestFieldMaskSchema - ); -} - -const getWorkspaceAssignmentDetailProxyRequestFieldMaskSchema: FieldMaskSchema = - { - principalId: {wire: 'principal_id'}, - }; - -export function getWorkspaceAssignmentDetailProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceAssignmentDetailProxyRequestFieldMaskSchema - ); -} - -const getWorkspaceAssignmentDetailRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - principalId: {wire: 'principal_id'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function getWorkspaceAssignmentDetailRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceAssignmentDetailRequestFieldMaskSchema - ); -} - -const getWorkspaceIdentityDetailRequestFieldMaskSchema: FieldMaskSchema = { - principalId: {wire: 'principal_id'}, -}; - -export function getWorkspaceIdentityDetailRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceIdentityDetailRequestFieldMaskSchema - ); -} - -const groupFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - externalId: {wire: 'external_id'}, - groupName: {wire: 'group_name'}, - internalId: {wire: 'internal_id'}, -}; - -export function groupFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, groupFieldMaskSchema); -} - -const listAccountAccessIdentityRulesRequestFieldMaskSchema: FieldMaskSchema = { - filter: {wire: 'filter'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - parent: {wire: 'parent'}, -}; - -export function listAccountAccessIdentityRulesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAccountAccessIdentityRulesRequestFieldMaskSchema - ); -} - -const listAccountAccessIdentityRulesResponseFieldMaskSchema: FieldMaskSchema = { - accountAccessIdentityRules: {wire: 'account_access_identity_rules'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listAccountAccessIdentityRulesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAccountAccessIdentityRulesResponseFieldMaskSchema - ); -} - -const listDirectGroupMembersProxyRequestFieldMaskSchema: FieldMaskSchema = { - groupId: {wire: 'group_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listDirectGroupMembersProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listDirectGroupMembersProxyRequestFieldMaskSchema - ); -} - -const listDirectGroupMembersRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - groupId: {wire: 'group_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listDirectGroupMembersRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listDirectGroupMembersRequestFieldMaskSchema - ); -} - -const listDirectGroupMembersResponseFieldMaskSchema: FieldMaskSchema = { - directGroupMembers: {wire: 'direct_group_members'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listDirectGroupMembersResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listDirectGroupMembersResponseFieldMaskSchema - ); -} - -const listGroupsProxyRequestFieldMaskSchema: FieldMaskSchema = { - filter: {wire: 'filter'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listGroupsProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listGroupsProxyRequestFieldMaskSchema - ); -} - -const listGroupsRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - filter: {wire: 'filter'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listGroupsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listGroupsRequestFieldMaskSchema - ); -} - -const listGroupsResponseFieldMaskSchema: FieldMaskSchema = { - groups: {wire: 'groups'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listGroupsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listGroupsResponseFieldMaskSchema - ); -} - -const listServicePrincipalsProxyRequestFieldMaskSchema: FieldMaskSchema = { - filter: {wire: 'filter'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listServicePrincipalsProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listServicePrincipalsProxyRequestFieldMaskSchema - ); -} - -const listServicePrincipalsRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - filter: {wire: 'filter'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listServicePrincipalsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listServicePrincipalsRequestFieldMaskSchema - ); -} - -const listServicePrincipalsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - servicePrincipals: {wire: 'service_principals'}, -}; - -export function listServicePrincipalsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listServicePrincipalsResponseFieldMaskSchema - ); -} - -const listTransitiveParentGroupsProxyRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - principalId: {wire: 'principal_id'}, -}; - -export function listTransitiveParentGroupsProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTransitiveParentGroupsProxyRequestFieldMaskSchema - ); -} - -const listTransitiveParentGroupsRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - principalId: {wire: 'principal_id'}, -}; - -export function listTransitiveParentGroupsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTransitiveParentGroupsRequestFieldMaskSchema - ); -} - -const listTransitiveParentGroupsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - transitiveParentGroups: {wire: 'transitive_parent_groups'}, -}; - -export function listTransitiveParentGroupsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTransitiveParentGroupsResponseFieldMaskSchema - ); -} - -const listUsersProxyRequestFieldMaskSchema: FieldMaskSchema = { - filter: {wire: 'filter'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listUsersProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listUsersProxyRequestFieldMaskSchema - ); -} - -const listUsersRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - filter: {wire: 'filter'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listUsersRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listUsersRequestFieldMaskSchema - ); -} - -const listUsersResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - users: {wire: 'users'}, -}; - -export function listUsersResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listUsersResponseFieldMaskSchema - ); -} - -const listWorkspaceAccessDetailsLocalRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listWorkspaceAccessDetailsLocalRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceAccessDetailsLocalRequestFieldMaskSchema - ); -} - -const listWorkspaceAccessDetailsRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function listWorkspaceAccessDetailsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceAccessDetailsRequestFieldMaskSchema - ); -} - -const listWorkspaceAccessDetailsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - workspaceAccessDetails: {wire: 'workspace_access_details'}, -}; - -export function listWorkspaceAccessDetailsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceAccessDetailsResponseFieldMaskSchema - ); -} - -const listWorkspaceAssignmentDetailsProxyRequestFieldMaskSchema: FieldMaskSchema = - { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - }; - -export function listWorkspaceAssignmentDetailsProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceAssignmentDetailsProxyRequestFieldMaskSchema - ); -} - -const listWorkspaceAssignmentDetailsRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function listWorkspaceAssignmentDetailsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceAssignmentDetailsRequestFieldMaskSchema - ); -} - -const listWorkspaceAssignmentDetailsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - workspaceAssignmentDetails: {wire: 'workspace_assignment_details'}, -}; - -export function listWorkspaceAssignmentDetailsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceAssignmentDetailsResponseFieldMaskSchema - ); -} - -const resolveGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { - externalId: {wire: 'external_id'}, -}; - -export function resolveGroupProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - resolveGroupProxyRequestFieldMaskSchema - ); -} - -const resolveGroupRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - externalId: {wire: 'external_id'}, -}; - -export function resolveGroupRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - resolveGroupRequestFieldMaskSchema - ); -} - -const resolveGroupResponseFieldMaskSchema: FieldMaskSchema = { - group: {wire: 'group', children: () => groupFieldMaskSchema}, -}; - -export function resolveGroupResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - resolveGroupResponseFieldMaskSchema - ); -} - -const resolveServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { - externalId: {wire: 'external_id'}, -}; - -export function resolveServicePrincipalProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - resolveServicePrincipalProxyRequestFieldMaskSchema - ); -} - -const resolveServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - externalId: {wire: 'external_id'}, -}; - -export function resolveServicePrincipalRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - resolveServicePrincipalRequestFieldMaskSchema - ); -} - -const resolveServicePrincipalResponseFieldMaskSchema: FieldMaskSchema = { - servicePrincipal: { - wire: 'service_principal', - children: () => servicePrincipalFieldMaskSchema, - }, -}; - -export function resolveServicePrincipalResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - resolveServicePrincipalResponseFieldMaskSchema - ); -} - -const resolveUserProxyRequestFieldMaskSchema: FieldMaskSchema = { - externalId: {wire: 'external_id'}, -}; - -export function resolveUserProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - resolveUserProxyRequestFieldMaskSchema - ); -} - -const resolveUserRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - externalId: {wire: 'external_id'}, -}; - -export function resolveUserRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - resolveUserRequestFieldMaskSchema - ); -} - -const resolveUserResponseFieldMaskSchema: FieldMaskSchema = { - user: {wire: 'user', children: () => userFieldMaskSchema}, -}; - -export function resolveUserResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - resolveUserResponseFieldMaskSchema - ); -} - -const servicePrincipalFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - accountSpStatus: {wire: 'account_sp_status'}, - applicationId: {wire: 'application_id'}, - displayName: {wire: 'display_name'}, - externalId: {wire: 'external_id'}, - internalId: {wire: 'internal_id'}, -}; - -export function servicePrincipalFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - servicePrincipalFieldMaskSchema - ); -} - -const transitiveParentGroupFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - externalId: {wire: 'external_id'}, - internalId: {wire: 'internal_id'}, -}; - -export function transitiveParentGroupFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - transitiveParentGroupFieldMaskSchema - ); -} - -const updateGroupProxyRequestFieldMaskSchema: FieldMaskSchema = { - group: {wire: 'group', children: () => groupFieldMaskSchema}, - internalId: {wire: 'internal_id'}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateGroupProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateGroupProxyRequestFieldMaskSchema - ); -} - -const updateGroupRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - group: {wire: 'group', children: () => groupFieldMaskSchema}, - internalId: {wire: 'internal_id'}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateGroupRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateGroupRequestFieldMaskSchema - ); -} - -const updateServicePrincipalProxyRequestFieldMaskSchema: FieldMaskSchema = { - internalId: {wire: 'internal_id'}, - servicePrincipal: { - wire: 'service_principal', - children: () => servicePrincipalFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateServicePrincipalProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateServicePrincipalProxyRequestFieldMaskSchema - ); -} - -const updateServicePrincipalRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - internalId: {wire: 'internal_id'}, - servicePrincipal: { - wire: 'service_principal', - children: () => servicePrincipalFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateServicePrincipalRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateServicePrincipalRequestFieldMaskSchema - ); -} - -const updateUserProxyRequestFieldMaskSchema: FieldMaskSchema = { - internalId: {wire: 'internal_id'}, - updateMask: {wire: 'update_mask'}, - user: {wire: 'user', children: () => userFieldMaskSchema}, -}; - -export function updateUserProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateUserProxyRequestFieldMaskSchema - ); -} - -const updateUserRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - internalId: {wire: 'internal_id'}, - updateMask: {wire: 'update_mask'}, - user: {wire: 'user', children: () => userFieldMaskSchema}, -}; - -export function updateUserRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateUserRequestFieldMaskSchema - ); -} - -const updateWorkspaceAssignmentDetailProxyRequestFieldMaskSchema: FieldMaskSchema = - { - principalId: {wire: 'principal_id'}, - updateMask: {wire: 'update_mask'}, - workspaceAssignmentDetail: { - wire: 'workspace_assignment_detail', - children: () => workspaceAssignmentDetailFieldMaskSchema, - }, - }; - -export function updateWorkspaceAssignmentDetailProxyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateWorkspaceAssignmentDetailProxyRequestFieldMaskSchema - ); -} - -const updateWorkspaceAssignmentDetailRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - principalId: {wire: 'principal_id'}, - updateMask: {wire: 'update_mask'}, - workspaceAssignmentDetail: { - wire: 'workspace_assignment_detail', - children: () => workspaceAssignmentDetailFieldMaskSchema, - }, - workspaceId: {wire: 'workspace_id'}, -}; - -export function updateWorkspaceAssignmentDetailRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateWorkspaceAssignmentDetailRequestFieldMaskSchema - ); -} - -const updateWorkspaceIdentityDetailRequestFieldMaskSchema: FieldMaskSchema = { - principalId: {wire: 'principal_id'}, - updateMask: {wire: 'update_mask'}, - workspaceIdentityDetail: { - wire: 'workspace_identity_detail', - children: () => workspaceIdentityDetailFieldMaskSchema, - }, -}; - -export function updateWorkspaceIdentityDetailRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateWorkspaceIdentityDetailRequestFieldMaskSchema - ); -} - -const userFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - accountUserStatus: {wire: 'account_user_status'}, - externalId: {wire: 'external_id'}, - internalId: {wire: 'internal_id'}, - name: {wire: 'name', children: () => user_NameFieldMaskSchema}, - username: {wire: 'username'}, -}; - -export function userFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, userFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const user_NameFieldMaskSchema: FieldMaskSchema = { - familyName: {wire: 'family_name'}, - givenName: {wire: 'given_name'}, +// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. +const user_NameFieldMaskSchema: FieldMaskSchema = { + familyName: {wire: 'family_name'}, + givenName: {wire: 'given_name'}, }; // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. @@ -2924,25 +1523,6 @@ export function user_NameFieldMask(...paths: string[]): FieldMask { return FieldMask.build(paths, user_NameFieldMaskSchema); } -const workspaceAccessDetailFieldMaskSchema: FieldMaskSchema = { - accessType: {wire: 'access_type'}, - accountId: {wire: 'account_id'}, - permissions: {wire: 'permissions'}, - principalId: {wire: 'principal_id'}, - principalType: {wire: 'principal_type'}, - status: {wire: 'status'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function workspaceAccessDetailFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - workspaceAccessDetailFieldMaskSchema - ); -} - const workspaceAssignmentDetailFieldMaskSchema: FieldMaskSchema = { accountId: {wire: 'account_id'}, entitlements: {wire: 'entitlements'}, diff --git a/packages/instancepools/src/v2/model.ts b/packages/instancepools/src/v2/model.ts index c7dc4cba..1f372005 100644 --- a/packages/instancepools/src/v2/model.ts +++ b/packages/instancepools/src/v2/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** @@ -770,58 +768,6 @@ export interface PendingInstanceError { message?: string | undefined; } -export const unmarshalCreateInstancePoolSchema: z.ZodType = - z - .object({ - instance_pool_name: z.string().optional(), - min_idle_instances: z.number().optional(), - max_capacity: z.number().optional(), - aws_attributes: z - .lazy(() => unmarshalInstancePoolAwsAttributesSchema) - .optional(), - node_type_id: z.string().optional(), - custom_tags: z.record(z.string(), z.string()).optional(), - idle_instance_autotermination_minutes: z.number().optional(), - enable_elastic_disk: z.boolean().optional(), - disk_spec: z.lazy(() => unmarshalDiskSpecSchema).optional(), - preloaded_docker_images: z - .array(z.lazy(() => unmarshalDockerImageSchema)) - .optional(), - preloaded_spark_versions: z.array(z.string()).optional(), - azure_attributes: z - .lazy(() => unmarshalInstancePoolAzureAttributesSchema) - .optional(), - gcp_attributes: z - .lazy(() => unmarshalInstancePoolGcpAttributesSchema) - .optional(), - node_type_flexibility: z - .lazy(() => unmarshalNodeTypeFlexibilitySchema) - .optional(), - enable_auto_alternate_node_types: z.boolean().optional(), - remote_disk_throughput: z.number().optional(), - total_initial_remote_disk_size: z.number().optional(), - }) - .transform(d => ({ - instancePoolName: d.instance_pool_name, - minIdleInstances: d.min_idle_instances, - maxCapacity: d.max_capacity, - awsAttributes: d.aws_attributes, - nodeTypeId: d.node_type_id, - customTags: d.custom_tags, - idleInstanceAutoterminationMinutes: - d.idle_instance_autotermination_minutes, - enableElasticDisk: d.enable_elastic_disk, - diskSpec: d.disk_spec, - preloadedDockerImages: d.preloaded_docker_images, - preloadedSparkVersions: d.preloaded_spark_versions, - azureAttributes: d.azure_attributes, - gcpAttributes: d.gcp_attributes, - nodeTypeFlexibility: d.node_type_flexibility, - enableAutoAlternateNodeTypes: d.enable_auto_alternate_node_types, - remoteDiskThroughput: d.remote_disk_throughput, - totalInitialRemoteDiskSize: d.total_initial_remote_disk_size, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreateInstancePool_ResponseSchema: z.ZodType = z @@ -832,15 +778,6 @@ export const unmarshalCreateInstancePool_ResponseSchema: z.ZodType = - z - .object({ - instance_pool_id: z.string().optional(), - }) - .transform(d => ({ - instancePoolId: d.instance_pool_id, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeleteInstancePool_ResponseSchema: z.ZodType = z.object({}); @@ -891,58 +828,6 @@ export const unmarshalDockerImageSchema: z.ZodType = z basicAuth: d.basic_auth, })); -export const unmarshalEditInstancePoolSchema: z.ZodType = z - .object({ - instance_pool_id: z.string().optional(), - instance_pool_name: z.string().optional(), - min_idle_instances: z.number().optional(), - max_capacity: z.number().optional(), - aws_attributes: z - .lazy(() => unmarshalInstancePoolAwsAttributesSchema) - .optional(), - node_type_id: z.string().optional(), - custom_tags: z.record(z.string(), z.string()).optional(), - idle_instance_autotermination_minutes: z.number().optional(), - enable_elastic_disk: z.boolean().optional(), - disk_spec: z.lazy(() => unmarshalDiskSpecSchema).optional(), - preloaded_docker_images: z - .array(z.lazy(() => unmarshalDockerImageSchema)) - .optional(), - preloaded_spark_versions: z.array(z.string()).optional(), - azure_attributes: z - .lazy(() => unmarshalInstancePoolAzureAttributesSchema) - .optional(), - gcp_attributes: z - .lazy(() => unmarshalInstancePoolGcpAttributesSchema) - .optional(), - node_type_flexibility: z - .lazy(() => unmarshalNodeTypeFlexibilitySchema) - .optional(), - enable_auto_alternate_node_types: z.boolean().optional(), - remote_disk_throughput: z.number().optional(), - total_initial_remote_disk_size: z.number().optional(), - }) - .transform(d => ({ - instancePoolId: d.instance_pool_id, - instancePoolName: d.instance_pool_name, - minIdleInstances: d.min_idle_instances, - maxCapacity: d.max_capacity, - awsAttributes: d.aws_attributes, - nodeTypeId: d.node_type_id, - customTags: d.custom_tags, - idleInstanceAutoterminationMinutes: d.idle_instance_autotermination_minutes, - enableElasticDisk: d.enable_elastic_disk, - diskSpec: d.disk_spec, - preloadedDockerImages: d.preloaded_docker_images, - preloadedSparkVersions: d.preloaded_spark_versions, - azureAttributes: d.azure_attributes, - gcpAttributes: d.gcp_attributes, - nodeTypeFlexibility: d.node_type_flexibility, - enableAutoAlternateNodeTypes: d.enable_auto_alternate_node_types, - remoteDiskThroughput: d.remote_disk_throughput, - totalInitialRemoteDiskSize: d.total_initial_remote_disk_size, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalEditInstancePool_ResponseSchema: z.ZodType = z.object({}); @@ -1218,15 +1103,6 @@ export const marshalCreateInstancePoolSchema: z.ZodType = z total_initial_remote_disk_size: d.totalInitialRemoteDiskSize, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreateInstancePool_ResponseSchema: z.ZodType = z - .object({ - instancePoolId: z.string().optional(), - }) - .transform(d => ({ - instance_pool_id: d.instancePoolId, - })); - export const marshalDeleteInstancePoolSchema: z.ZodType = z .object({ instancePoolId: z.string().optional(), @@ -1235,9 +1111,6 @@ export const marshalDeleteInstancePoolSchema: z.ZodType = z instance_pool_id: d.instancePoolId, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteInstancePool_ResponseSchema: z.ZodType = z.object({}); - export const marshalDiskSpecSchema: z.ZodType = z .object({ diskType: z.lazy(() => marshalDiskTypeSchema).optional(), @@ -1336,130 +1209,6 @@ export const marshalEditInstancePoolSchema: z.ZodType = z total_initial_remote_disk_size: d.totalInitialRemoteDiskSize, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalEditInstancePool_ResponseSchema: z.ZodType = z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetInstancePool_ResponseSchema: z.ZodType = z - .object({ - stats: z.lazy(() => marshalInstancePoolStatsSchema).optional(), - status: z.lazy(() => marshalInstancePoolStatusSchema).optional(), - instancePoolId: z.string().optional(), - defaultTags: z.record(z.string(), z.string()).optional(), - state: z.enum(InstancePoolState).optional(), - instancePoolName: z.string().optional(), - minIdleInstances: z.number().optional(), - maxCapacity: z.number().optional(), - awsAttributes: z - .lazy(() => marshalInstancePoolAwsAttributesSchema) - .optional(), - nodeTypeId: z.string().optional(), - customTags: z.record(z.string(), z.string()).optional(), - idleInstanceAutoterminationMinutes: z.number().optional(), - enableElasticDisk: z.boolean().optional(), - diskSpec: z.lazy(() => marshalDiskSpecSchema).optional(), - preloadedDockerImages: z - .array(z.lazy(() => marshalDockerImageSchema)) - .optional(), - preloadedSparkVersions: z.array(z.string()).optional(), - azureAttributes: z - .lazy(() => marshalInstancePoolAzureAttributesSchema) - .optional(), - gcpAttributes: z - .lazy(() => marshalInstancePoolGcpAttributesSchema) - .optional(), - nodeTypeFlexibility: z - .lazy(() => marshalNodeTypeFlexibilitySchema) - .optional(), - enableAutoAlternateNodeTypes: z.boolean().optional(), - remoteDiskThroughput: z.number().optional(), - totalInitialRemoteDiskSize: z.number().optional(), - }) - .transform(d => ({ - stats: d.stats, - status: d.status, - instance_pool_id: d.instancePoolId, - default_tags: d.defaultTags, - state: d.state, - instance_pool_name: d.instancePoolName, - min_idle_instances: d.minIdleInstances, - max_capacity: d.maxCapacity, - aws_attributes: d.awsAttributes, - node_type_id: d.nodeTypeId, - custom_tags: d.customTags, - idle_instance_autotermination_minutes: d.idleInstanceAutoterminationMinutes, - enable_elastic_disk: d.enableElasticDisk, - disk_spec: d.diskSpec, - preloaded_docker_images: d.preloadedDockerImages, - preloaded_spark_versions: d.preloadedSparkVersions, - azure_attributes: d.azureAttributes, - gcp_attributes: d.gcpAttributes, - node_type_flexibility: d.nodeTypeFlexibility, - enable_auto_alternate_node_types: d.enableAutoAlternateNodeTypes, - remote_disk_throughput: d.remoteDiskThroughput, - total_initial_remote_disk_size: d.totalInitialRemoteDiskSize, - })); - -export const marshalInstancePoolAndStatsSchema: z.ZodType = z - .object({ - stats: z.lazy(() => marshalInstancePoolStatsSchema).optional(), - status: z.lazy(() => marshalInstancePoolStatusSchema).optional(), - instancePoolId: z.string().optional(), - defaultTags: z.record(z.string(), z.string()).optional(), - state: z.enum(InstancePoolState).optional(), - instancePoolName: z.string().optional(), - minIdleInstances: z.number().optional(), - maxCapacity: z.number().optional(), - awsAttributes: z - .lazy(() => marshalInstancePoolAwsAttributesSchema) - .optional(), - nodeTypeId: z.string().optional(), - customTags: z.record(z.string(), z.string()).optional(), - idleInstanceAutoterminationMinutes: z.number().optional(), - enableElasticDisk: z.boolean().optional(), - diskSpec: z.lazy(() => marshalDiskSpecSchema).optional(), - preloadedDockerImages: z - .array(z.lazy(() => marshalDockerImageSchema)) - .optional(), - preloadedSparkVersions: z.array(z.string()).optional(), - azureAttributes: z - .lazy(() => marshalInstancePoolAzureAttributesSchema) - .optional(), - gcpAttributes: z - .lazy(() => marshalInstancePoolGcpAttributesSchema) - .optional(), - nodeTypeFlexibility: z - .lazy(() => marshalNodeTypeFlexibilitySchema) - .optional(), - enableAutoAlternateNodeTypes: z.boolean().optional(), - remoteDiskThroughput: z.number().optional(), - totalInitialRemoteDiskSize: z.number().optional(), - }) - .transform(d => ({ - stats: d.stats, - status: d.status, - instance_pool_id: d.instancePoolId, - default_tags: d.defaultTags, - state: d.state, - instance_pool_name: d.instancePoolName, - min_idle_instances: d.minIdleInstances, - max_capacity: d.maxCapacity, - aws_attributes: d.awsAttributes, - node_type_id: d.nodeTypeId, - custom_tags: d.customTags, - idle_instance_autotermination_minutes: d.idleInstanceAutoterminationMinutes, - enable_elastic_disk: d.enableElasticDisk, - disk_spec: d.diskSpec, - preloaded_docker_images: d.preloadedDockerImages, - preloaded_spark_versions: d.preloadedSparkVersions, - azure_attributes: d.azureAttributes, - gcp_attributes: d.gcpAttributes, - node_type_flexibility: d.nodeTypeFlexibility, - enable_auto_alternate_node_types: d.enableAutoAlternateNodeTypes, - remote_disk_throughput: d.remoteDiskThroughput, - total_initial_remote_disk_size: d.totalInitialRemoteDiskSize, - })); - export const marshalInstancePoolAwsAttributesSchema: z.ZodType = z .object({ availability: z.enum(AwsAvailability).optional(), @@ -1496,41 +1245,6 @@ export const marshalInstancePoolGcpAttributesSchema: z.ZodType = z zone_id: d.zoneId, })); -export const marshalInstancePoolStatsSchema: z.ZodType = z - .object({ - usedCount: z.number().optional(), - idleCount: z.number().optional(), - pendingUsedCount: z.number().optional(), - pendingIdleCount: z.number().optional(), - }) - .transform(d => ({ - used_count: d.usedCount, - idle_count: d.idleCount, - pending_used_count: d.pendingUsedCount, - pending_idle_count: d.pendingIdleCount, - })); - -export const marshalInstancePoolStatusSchema: z.ZodType = z - .object({ - pendingInstanceErrors: z - .array(z.lazy(() => marshalPendingInstanceErrorSchema)) - .optional(), - }) - .transform(d => ({ - pending_instance_errors: d.pendingInstanceErrors, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListInstancePools_ResponseSchema: z.ZodType = z - .object({ - instancePools: z - .array(z.lazy(() => marshalInstancePoolAndStatsSchema)) - .optional(), - }) - .transform(d => ({ - instance_pools: d.instancePools, - })); - export const marshalNodeTypeFlexibilitySchema: z.ZodType = z .object({ alternateNodeTypeIds: z.array(z.string()).optional(), @@ -1538,539 +1252,3 @@ export const marshalNodeTypeFlexibilitySchema: z.ZodType = z .transform(d => ({ alternate_node_type_ids: d.alternateNodeTypeIds, })); - -export const marshalPendingInstanceErrorSchema: z.ZodType = z - .object({ - instanceId: z.string().optional(), - message: z.string().optional(), - }) - .transform(d => ({ - instance_id: d.instanceId, - message: d.message, - })); - -const createInstancePoolFieldMaskSchema: FieldMaskSchema = { - awsAttributes: { - wire: 'aws_attributes', - children: () => instancePoolAwsAttributesFieldMaskSchema, - }, - azureAttributes: { - wire: 'azure_attributes', - children: () => instancePoolAzureAttributesFieldMaskSchema, - }, - customTags: {wire: 'custom_tags'}, - diskSpec: {wire: 'disk_spec', children: () => diskSpecFieldMaskSchema}, - enableAutoAlternateNodeTypes: {wire: 'enable_auto_alternate_node_types'}, - enableElasticDisk: {wire: 'enable_elastic_disk'}, - gcpAttributes: { - wire: 'gcp_attributes', - children: () => instancePoolGcpAttributesFieldMaskSchema, - }, - idleInstanceAutoterminationMinutes: { - wire: 'idle_instance_autotermination_minutes', - }, - instancePoolName: {wire: 'instance_pool_name'}, - maxCapacity: {wire: 'max_capacity'}, - minIdleInstances: {wire: 'min_idle_instances'}, - nodeTypeFlexibility: { - wire: 'node_type_flexibility', - children: () => nodeTypeFlexibilityFieldMaskSchema, - }, - nodeTypeId: {wire: 'node_type_id'}, - preloadedDockerImages: {wire: 'preloaded_docker_images'}, - preloadedSparkVersions: {wire: 'preloaded_spark_versions'}, - remoteDiskThroughput: {wire: 'remote_disk_throughput'}, - totalInitialRemoteDiskSize: {wire: 'total_initial_remote_disk_size'}, -}; - -export function createInstancePoolFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createInstancePoolFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createInstancePool_CustomTagsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createInstancePool_CustomTagsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createInstancePool_CustomTagsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createInstancePool_ResponseFieldMaskSchema: FieldMaskSchema = { - instancePoolId: {wire: 'instance_pool_id'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createInstancePool_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createInstancePool_ResponseFieldMaskSchema - ); -} - -const deleteInstancePoolFieldMaskSchema: FieldMaskSchema = { - instancePoolId: {wire: 'instance_pool_id'}, -}; - -export function deleteInstancePoolFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteInstancePoolFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteInstancePool_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteInstancePool_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteInstancePool_ResponseFieldMaskSchema - ); -} - -const diskSpecFieldMaskSchema: FieldMaskSchema = { - diskCount: {wire: 'disk_count'}, - diskIops: {wire: 'disk_iops'}, - diskSize: {wire: 'disk_size'}, - diskThroughput: {wire: 'disk_throughput'}, - diskType: {wire: 'disk_type', children: () => diskTypeFieldMaskSchema}, -}; - -export function diskSpecFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, diskSpecFieldMaskSchema); -} - -const diskTypeFieldMaskSchema: FieldMaskSchema = { - azureDiskVolumeType: {wire: 'azure_disk_volume_type'}, - ebsVolumeType: {wire: 'ebs_volume_type'}, -}; - -export function diskTypeFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, diskTypeFieldMaskSchema); -} - -const dockerBasicAuthFieldMaskSchema: FieldMaskSchema = { - password: {wire: 'password'}, - username: {wire: 'username'}, -}; - -export function dockerBasicAuthFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - dockerBasicAuthFieldMaskSchema - ); -} - -const dockerImageFieldMaskSchema: FieldMaskSchema = { - basicAuth: { - wire: 'basic_auth', - children: () => dockerBasicAuthFieldMaskSchema, - }, - url: {wire: 'url'}, -}; - -export function dockerImageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, dockerImageFieldMaskSchema); -} - -const editInstancePoolFieldMaskSchema: FieldMaskSchema = { - awsAttributes: { - wire: 'aws_attributes', - children: () => instancePoolAwsAttributesFieldMaskSchema, - }, - azureAttributes: { - wire: 'azure_attributes', - children: () => instancePoolAzureAttributesFieldMaskSchema, - }, - customTags: {wire: 'custom_tags'}, - diskSpec: {wire: 'disk_spec', children: () => diskSpecFieldMaskSchema}, - enableAutoAlternateNodeTypes: {wire: 'enable_auto_alternate_node_types'}, - enableElasticDisk: {wire: 'enable_elastic_disk'}, - gcpAttributes: { - wire: 'gcp_attributes', - children: () => instancePoolGcpAttributesFieldMaskSchema, - }, - idleInstanceAutoterminationMinutes: { - wire: 'idle_instance_autotermination_minutes', - }, - instancePoolId: {wire: 'instance_pool_id'}, - instancePoolName: {wire: 'instance_pool_name'}, - maxCapacity: {wire: 'max_capacity'}, - minIdleInstances: {wire: 'min_idle_instances'}, - nodeTypeFlexibility: { - wire: 'node_type_flexibility', - children: () => nodeTypeFlexibilityFieldMaskSchema, - }, - nodeTypeId: {wire: 'node_type_id'}, - preloadedDockerImages: {wire: 'preloaded_docker_images'}, - preloadedSparkVersions: {wire: 'preloaded_spark_versions'}, - remoteDiskThroughput: {wire: 'remote_disk_throughput'}, - totalInitialRemoteDiskSize: {wire: 'total_initial_remote_disk_size'}, -}; - -export function editInstancePoolFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - editInstancePoolFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const editInstancePool_CustomTagsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function editInstancePool_CustomTagsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - editInstancePool_CustomTagsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const editInstancePool_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function editInstancePool_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - editInstancePool_ResponseFieldMaskSchema - ); -} - -const getInstancePoolFieldMaskSchema: FieldMaskSchema = { - instancePoolId: {wire: 'instance_pool_id'}, -}; - -export function getInstancePoolFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getInstancePoolFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getInstancePool_ResponseFieldMaskSchema: FieldMaskSchema = { - awsAttributes: { - wire: 'aws_attributes', - children: () => instancePoolAwsAttributesFieldMaskSchema, - }, - azureAttributes: { - wire: 'azure_attributes', - children: () => instancePoolAzureAttributesFieldMaskSchema, - }, - customTags: {wire: 'custom_tags'}, - defaultTags: {wire: 'default_tags'}, - diskSpec: {wire: 'disk_spec', children: () => diskSpecFieldMaskSchema}, - enableAutoAlternateNodeTypes: {wire: 'enable_auto_alternate_node_types'}, - enableElasticDisk: {wire: 'enable_elastic_disk'}, - gcpAttributes: { - wire: 'gcp_attributes', - children: () => instancePoolGcpAttributesFieldMaskSchema, - }, - idleInstanceAutoterminationMinutes: { - wire: 'idle_instance_autotermination_minutes', - }, - instancePoolId: {wire: 'instance_pool_id'}, - instancePoolName: {wire: 'instance_pool_name'}, - maxCapacity: {wire: 'max_capacity'}, - minIdleInstances: {wire: 'min_idle_instances'}, - nodeTypeFlexibility: { - wire: 'node_type_flexibility', - children: () => nodeTypeFlexibilityFieldMaskSchema, - }, - nodeTypeId: {wire: 'node_type_id'}, - preloadedDockerImages: {wire: 'preloaded_docker_images'}, - preloadedSparkVersions: {wire: 'preloaded_spark_versions'}, - remoteDiskThroughput: {wire: 'remote_disk_throughput'}, - state: {wire: 'state'}, - stats: {wire: 'stats', children: () => instancePoolStatsFieldMaskSchema}, - status: {wire: 'status', children: () => instancePoolStatusFieldMaskSchema}, - totalInitialRemoteDiskSize: {wire: 'total_initial_remote_disk_size'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getInstancePool_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getInstancePool_ResponseFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getInstancePool_Response_CustomTagsEntryFieldMaskSchema: FieldMaskSchema = - { - key: {wire: 'key'}, - value: {wire: 'value'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getInstancePool_Response_CustomTagsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getInstancePool_Response_CustomTagsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getInstancePool_Response_DefaultTagsEntryFieldMaskSchema: FieldMaskSchema = - { - key: {wire: 'key'}, - value: {wire: 'value'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getInstancePool_Response_DefaultTagsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getInstancePool_Response_DefaultTagsEntryFieldMaskSchema - ); -} - -const instancePoolAndStatsFieldMaskSchema: FieldMaskSchema = { - awsAttributes: { - wire: 'aws_attributes', - children: () => instancePoolAwsAttributesFieldMaskSchema, - }, - azureAttributes: { - wire: 'azure_attributes', - children: () => instancePoolAzureAttributesFieldMaskSchema, - }, - customTags: {wire: 'custom_tags'}, - defaultTags: {wire: 'default_tags'}, - diskSpec: {wire: 'disk_spec', children: () => diskSpecFieldMaskSchema}, - enableAutoAlternateNodeTypes: {wire: 'enable_auto_alternate_node_types'}, - enableElasticDisk: {wire: 'enable_elastic_disk'}, - gcpAttributes: { - wire: 'gcp_attributes', - children: () => instancePoolGcpAttributesFieldMaskSchema, - }, - idleInstanceAutoterminationMinutes: { - wire: 'idle_instance_autotermination_minutes', - }, - instancePoolId: {wire: 'instance_pool_id'}, - instancePoolName: {wire: 'instance_pool_name'}, - maxCapacity: {wire: 'max_capacity'}, - minIdleInstances: {wire: 'min_idle_instances'}, - nodeTypeFlexibility: { - wire: 'node_type_flexibility', - children: () => nodeTypeFlexibilityFieldMaskSchema, - }, - nodeTypeId: {wire: 'node_type_id'}, - preloadedDockerImages: {wire: 'preloaded_docker_images'}, - preloadedSparkVersions: {wire: 'preloaded_spark_versions'}, - remoteDiskThroughput: {wire: 'remote_disk_throughput'}, - state: {wire: 'state'}, - stats: {wire: 'stats', children: () => instancePoolStatsFieldMaskSchema}, - status: {wire: 'status', children: () => instancePoolStatusFieldMaskSchema}, - totalInitialRemoteDiskSize: {wire: 'total_initial_remote_disk_size'}, -}; - -export function instancePoolAndStatsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - instancePoolAndStatsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const instancePoolAndStats_CustomTagsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function instancePoolAndStats_CustomTagsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - instancePoolAndStats_CustomTagsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const instancePoolAndStats_DefaultTagsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function instancePoolAndStats_DefaultTagsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - instancePoolAndStats_DefaultTagsEntryFieldMaskSchema - ); -} - -const instancePoolAwsAttributesFieldMaskSchema: FieldMaskSchema = { - availability: {wire: 'availability'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - spotBidPricePercent: {wire: 'spot_bid_price_percent'}, - zoneId: {wire: 'zone_id'}, -}; - -export function instancePoolAwsAttributesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - instancePoolAwsAttributesFieldMaskSchema - ); -} - -const instancePoolAzureAttributesFieldMaskSchema: FieldMaskSchema = { - availability: {wire: 'availability'}, - spotBidMaxPrice: {wire: 'spot_bid_max_price'}, -}; - -export function instancePoolAzureAttributesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - instancePoolAzureAttributesFieldMaskSchema - ); -} - -const instancePoolGcpAttributesFieldMaskSchema: FieldMaskSchema = { - gcpAvailability: {wire: 'gcp_availability'}, - localSsdCount: {wire: 'local_ssd_count'}, - zoneId: {wire: 'zone_id'}, -}; - -export function instancePoolGcpAttributesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - instancePoolGcpAttributesFieldMaskSchema - ); -} - -const instancePoolStatsFieldMaskSchema: FieldMaskSchema = { - idleCount: {wire: 'idle_count'}, - pendingIdleCount: {wire: 'pending_idle_count'}, - pendingUsedCount: {wire: 'pending_used_count'}, - usedCount: {wire: 'used_count'}, -}; - -export function instancePoolStatsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - instancePoolStatsFieldMaskSchema - ); -} - -const instancePoolStatusFieldMaskSchema: FieldMaskSchema = { - pendingInstanceErrors: {wire: 'pending_instance_errors'}, -}; - -export function instancePoolStatusFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - instancePoolStatusFieldMaskSchema - ); -} - -const listInstancePoolsFieldMaskSchema: FieldMaskSchema = {}; - -export function listInstancePoolsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listInstancePoolsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listInstancePools_ResponseFieldMaskSchema: FieldMaskSchema = { - instancePools: {wire: 'instance_pools'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listInstancePools_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listInstancePools_ResponseFieldMaskSchema - ); -} - -const nodeTypeFlexibilityFieldMaskSchema: FieldMaskSchema = { - alternateNodeTypeIds: {wire: 'alternate_node_type_ids'}, -}; - -export function nodeTypeFlexibilityFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - nodeTypeFlexibilityFieldMaskSchema - ); -} - -const pendingInstanceErrorFieldMaskSchema: FieldMaskSchema = { - instanceId: {wire: 'instance_id'}, - message: {wire: 'message'}, -}; - -export function pendingInstanceErrorFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - pendingInstanceErrorFieldMaskSchema - ); -} diff --git a/packages/instanceprofiles/src/v2/model.ts b/packages/instanceprofiles/src/v2/model.ts index 263b26c0..5c403b01 100644 --- a/packages/instanceprofiles/src/v2/model.ts +++ b/packages/instanceprofiles/src/v2/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface AddInstanceProfile { @@ -102,38 +100,10 @@ export interface RemoveInstanceProfile { // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name. export interface RemoveInstanceProfile_Response {} -export const unmarshalAddInstanceProfileSchema: z.ZodType = - z - .object({ - skip_validation: z.boolean().optional(), - instance_profile_arn: z.string().optional(), - is_meta_instance_profile: z.boolean().optional(), - iam_role_arn: z.string().optional(), - }) - .transform(d => ({ - skipValidation: d.skip_validation, - instanceProfileArn: d.instance_profile_arn, - isMetaInstanceProfile: d.is_meta_instance_profile, - iamRoleArn: d.iam_role_arn, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalAddInstanceProfile_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalEditInstanceProfileSchema: z.ZodType = - z - .object({ - instance_profile_arn: z.string().optional(), - is_meta_instance_profile: z.boolean().optional(), - iam_role_arn: z.string().optional(), - }) - .transform(d => ({ - instanceProfileArn: d.instance_profile_arn, - isMetaInstanceProfile: d.is_meta_instance_profile, - iamRoleArn: d.iam_role_arn, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalEditInstanceProfile_ResponseSchema: z.ZodType = z.object({}); @@ -162,15 +132,6 @@ export const unmarshalListInstanceProfiles_ResponseSchema: z.ZodType = - z - .object({ - instance_profile_arn: z.string().optional(), - }) - .transform(d => ({ - instanceProfileArn: d.instance_profile_arn, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalRemoveInstanceProfile_ResponseSchema: z.ZodType = z.object({}); @@ -189,9 +150,6 @@ export const marshalAddInstanceProfileSchema: z.ZodType = z iam_role_arn: d.iamRoleArn, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalAddInstanceProfile_ResponseSchema: z.ZodType = z.object({}); - export const marshalEditInstanceProfileSchema: z.ZodType = z .object({ instanceProfileArn: z.string().optional(), @@ -204,34 +162,6 @@ export const marshalEditInstanceProfileSchema: z.ZodType = z iam_role_arn: d.iamRoleArn, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalEditInstanceProfile_ResponseSchema: z.ZodType = z.object( - {} -); - -export const marshalInstanceProfileSchema: z.ZodType = z - .object({ - instanceProfileArn: z.string().optional(), - isMetaInstanceProfile: z.boolean().optional(), - iamRoleArn: z.string().optional(), - }) - .transform(d => ({ - instance_profile_arn: d.instanceProfileArn, - is_meta_instance_profile: d.isMetaInstanceProfile, - iam_role_arn: d.iamRoleArn, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListInstanceProfiles_ResponseSchema: z.ZodType = z - .object({ - instanceProfiles: z - .array(z.lazy(() => marshalInstanceProfileSchema)) - .optional(), - }) - .transform(d => ({ - instance_profiles: d.instanceProfiles, - })); - export const marshalRemoveInstanceProfileSchema: z.ZodType = z .object({ instanceProfileArn: z.string().optional(), @@ -239,132 +169,3 @@ export const marshalRemoveInstanceProfileSchema: z.ZodType = z .transform(d => ({ instance_profile_arn: d.instanceProfileArn, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalRemoveInstanceProfile_ResponseSchema: z.ZodType = z.object( - {} -); - -const addInstanceProfileFieldMaskSchema: FieldMaskSchema = { - iamRoleArn: {wire: 'iam_role_arn'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - isMetaInstanceProfile: {wire: 'is_meta_instance_profile'}, - skipValidation: {wire: 'skip_validation'}, -}; - -export function addInstanceProfileFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - addInstanceProfileFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const addInstanceProfile_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function addInstanceProfile_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - addInstanceProfile_ResponseFieldMaskSchema - ); -} - -const editInstanceProfileFieldMaskSchema: FieldMaskSchema = { - iamRoleArn: {wire: 'iam_role_arn'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - isMetaInstanceProfile: {wire: 'is_meta_instance_profile'}, -}; - -export function editInstanceProfileFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - editInstanceProfileFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const editInstanceProfile_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function editInstanceProfile_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - editInstanceProfile_ResponseFieldMaskSchema - ); -} - -const instanceProfileFieldMaskSchema: FieldMaskSchema = { - iamRoleArn: {wire: 'iam_role_arn'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - isMetaInstanceProfile: {wire: 'is_meta_instance_profile'}, -}; - -export function instanceProfileFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - instanceProfileFieldMaskSchema - ); -} - -const listInstanceProfilesFieldMaskSchema: FieldMaskSchema = {}; - -export function listInstanceProfilesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listInstanceProfilesFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listInstanceProfiles_ResponseFieldMaskSchema: FieldMaskSchema = { - instanceProfiles: {wire: 'instance_profiles'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listInstanceProfiles_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listInstanceProfiles_ResponseFieldMaskSchema - ); -} - -const removeInstanceProfileFieldMaskSchema: FieldMaskSchema = { - instanceProfileArn: {wire: 'instance_profile_arn'}, -}; - -export function removeInstanceProfileFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - removeInstanceProfileFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const removeInstanceProfile_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function removeInstanceProfile_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - removeInstanceProfile_ResponseFieldMaskSchema - ); -} diff --git a/packages/materializedfeatures/src/v1/client.ts b/packages/materializedfeatures/src/v1/client.ts index fac8a34b..5020b623 100644 --- a/packages/materializedfeatures/src/v1/client.ts +++ b/packages/materializedfeatures/src/v1/client.ts @@ -196,7 +196,7 @@ export class Client { const url = `${this.host}/api/2.0/feature-store/feature-tables/${req.tableName ?? ''}/features/${req.featureName ?? ''}/tags/${req.featureTag?.key ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/materializedfeatures/src/v1/model.ts b/packages/materializedfeatures/src/v1/model.ts index df1d38b7..723a3974 100644 --- a/packages/materializedfeatures/src/v1/model.ts +++ b/packages/materializedfeatures/src/v1/model.ts @@ -95,7 +95,7 @@ export interface UpdateFeatureTagRequest { featureName?: string | undefined; featureTag?: FeatureTag | undefined; /** The list of fields to update. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalFeatureLineageSchema: z.ZodType = z @@ -171,53 +171,6 @@ export const unmarshalListFeatureTagsResponseSchema: z.ZodType marshalFeatureLineage_ModelSchema)).optional(), - featureSpecs: z - .array(z.lazy(() => marshalFeatureLineage_FeatureSpecSchema)) - .optional(), - onlineFeatures: z - .array(z.lazy(() => marshalFeatureLineage_OnlineFeatureSchema)) - .optional(), - }) - .transform(d => ({ - models: d.models, - feature_specs: d.featureSpecs, - online_features: d.onlineFeatures, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalFeatureLineage_FeatureSpecSchema: z.ZodType = z - .object({ - name: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalFeatureLineage_ModelSchema: z.ZodType = z - .object({ - name: z.string().optional(), - version: z.number().optional(), - }) - .transform(d => ({ - name: d.name, - version: d.version, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalFeatureLineage_OnlineFeatureSchema: z.ZodType = z - .object({ - featureName: z.string().optional(), - tableName: z.string().optional(), - }) - .transform(d => ({ - feature_name: d.featureName, - table_name: d.tableName, - })); - export const marshalFeatureTagSchema: z.ZodType = z .object({ key: z.string().optional(), @@ -228,105 +181,6 @@ export const marshalFeatureTagSchema: z.ZodType = z value: d.value, })); -export const marshalListFeatureTagsResponseSchema: z.ZodType = z - .object({ - featureTags: z.array(z.lazy(() => marshalFeatureTagSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - feature_tags: d.featureTags, - next_page_token: d.nextPageToken, - })); - -const createFeatureTagRequestFieldMaskSchema: FieldMaskSchema = { - featureName: {wire: 'feature_name'}, - featureTag: {wire: 'feature_tag', children: () => featureTagFieldMaskSchema}, - tableName: {wire: 'table_name'}, -}; - -export function createFeatureTagRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createFeatureTagRequestFieldMaskSchema - ); -} - -const deleteFeatureTagRequestFieldMaskSchema: FieldMaskSchema = { - featureName: {wire: 'feature_name'}, - key: {wire: 'key'}, - tableName: {wire: 'table_name'}, -}; - -export function deleteFeatureTagRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteFeatureTagRequestFieldMaskSchema - ); -} - -const featureLineageFieldMaskSchema: FieldMaskSchema = { - featureSpecs: {wire: 'feature_specs'}, - models: {wire: 'models'}, - onlineFeatures: {wire: 'online_features'}, -}; - -export function featureLineageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, featureLineageFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const featureLineage_FeatureSpecFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function featureLineage_FeatureSpecFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - featureLineage_FeatureSpecFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const featureLineage_ModelFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - version: {wire: 'version'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function featureLineage_ModelFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - featureLineage_ModelFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const featureLineage_OnlineFeatureFieldMaskSchema: FieldMaskSchema = { - featureName: {wire: 'feature_name'}, - tableName: {wire: 'table_name'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function featureLineage_OnlineFeatureFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - featureLineage_OnlineFeatureFieldMaskSchema - ); -} - const featureTagFieldMaskSchema: FieldMaskSchema = { key: {wire: 'key'}, value: {wire: 'value'}, @@ -335,78 +189,3 @@ const featureTagFieldMaskSchema: FieldMaskSchema = { export function featureTagFieldMask(...paths: string[]): FieldMask { return FieldMask.build(paths, featureTagFieldMaskSchema); } - -const getFeatureLineageRequestFieldMaskSchema: FieldMaskSchema = { - featureName: {wire: 'feature_name'}, - tableName: {wire: 'table_name'}, -}; - -export function getFeatureLineageRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getFeatureLineageRequestFieldMaskSchema - ); -} - -const getFeatureTagRequestFieldMaskSchema: FieldMaskSchema = { - featureName: {wire: 'feature_name'}, - key: {wire: 'key'}, - tableName: {wire: 'table_name'}, -}; - -export function getFeatureTagRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getFeatureTagRequestFieldMaskSchema - ); -} - -const listFeatureTagsRequestFieldMaskSchema: FieldMaskSchema = { - featureName: {wire: 'feature_name'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - tableName: {wire: 'table_name'}, -}; - -export function listFeatureTagsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listFeatureTagsRequestFieldMaskSchema - ); -} - -const listFeatureTagsResponseFieldMaskSchema: FieldMaskSchema = { - featureTags: {wire: 'feature_tags'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listFeatureTagsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listFeatureTagsResponseFieldMaskSchema - ); -} - -const updateFeatureTagRequestFieldMaskSchema: FieldMaskSchema = { - featureName: {wire: 'feature_name'}, - featureTag: {wire: 'feature_tag', children: () => featureTagFieldMaskSchema}, - tableName: {wire: 'table_name'}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateFeatureTagRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateFeatureTagRequestFieldMaskSchema - ); -} diff --git a/packages/metastores/src/v1/model.ts b/packages/metastores/src/v1/model.ts index aceb1a14..b6a792d2 100644 --- a/packages/metastores/src/v1/model.ts +++ b/packages/metastores/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name. @@ -292,64 +290,6 @@ export interface UpdateMetastoreAssignment { // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name. export interface UpdateMetastoreAssignment_Response {} -export const unmarshalCreateMetastoreSchema: z.ZodType = z - .object({ - name: z.string().optional(), - storage_root: z.string().optional(), - default_data_access_config_id: z.string().optional(), - storage_root_credential_id: z.string().optional(), - delta_sharing_scope: z.enum(DeltaSharingScope_Enum).optional(), - delta_sharing_recipient_token_lifetime_in_seconds: z.number().optional(), - delta_sharing_organization_name: z.string().optional(), - owner: z.string().optional(), - privilege_model_version: z.string().optional(), - region: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - storage_root_credential_name: z.string().optional(), - cloud: z.string().optional(), - global_metastore_id: z.string().optional(), - external_access_enabled: z.boolean().optional(), - }) - .transform(d => ({ - name: d.name, - storageRoot: d.storage_root, - defaultDataAccessConfigId: d.default_data_access_config_id, - storageRootCredentialId: d.storage_root_credential_id, - deltaSharingScope: d.delta_sharing_scope, - deltaSharingRecipientTokenLifetimeInSeconds: - d.delta_sharing_recipient_token_lifetime_in_seconds, - deltaSharingOrganizationName: d.delta_sharing_organization_name, - owner: d.owner, - privilegeModelVersion: d.privilege_model_version, - region: d.region, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - storageRootCredentialName: d.storage_root_credential_name, - cloud: d.cloud, - globalMetastoreId: d.global_metastore_id, - externalAccessEnabled: d.external_access_enabled, - })); - -export const unmarshalCreateMetastoreAssignmentSchema: z.ZodType = - z - .object({ - workspace_id: z.number().optional(), - metastore_id: z.string().optional(), - default_catalog_name: z.string().optional(), - }) - .transform(d => ({ - workspaceId: d.workspace_id, - metastoreId: d.metastore_id, - defaultCatalogName: d.default_catalog_name, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreateMetastoreAssignment_ResponseSchema: z.ZodType = z.object({}); @@ -481,68 +421,6 @@ export const unmarshalMetastoreInfoSchema: z.ZodType = z externalAccessEnabled: d.external_access_enabled, })); -export const unmarshalUpdateMetastoreSchema: z.ZodType = z - .object({ - id: z.string().optional(), - new_name: z.string().optional(), - name: z.string().optional(), - storage_root: z.string().optional(), - default_data_access_config_id: z.string().optional(), - storage_root_credential_id: z.string().optional(), - delta_sharing_scope: z.enum(DeltaSharingScope_Enum).optional(), - delta_sharing_recipient_token_lifetime_in_seconds: z.number().optional(), - delta_sharing_organization_name: z.string().optional(), - owner: z.string().optional(), - privilege_model_version: z.string().optional(), - region: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - storage_root_credential_name: z.string().optional(), - cloud: z.string().optional(), - global_metastore_id: z.string().optional(), - external_access_enabled: z.boolean().optional(), - }) - .transform(d => ({ - id: d.id, - newName: d.new_name, - name: d.name, - storageRoot: d.storage_root, - defaultDataAccessConfigId: d.default_data_access_config_id, - storageRootCredentialId: d.storage_root_credential_id, - deltaSharingScope: d.delta_sharing_scope, - deltaSharingRecipientTokenLifetimeInSeconds: - d.delta_sharing_recipient_token_lifetime_in_seconds, - deltaSharingOrganizationName: d.delta_sharing_organization_name, - owner: d.owner, - privilegeModelVersion: d.privilege_model_version, - region: d.region, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - storageRootCredentialName: d.storage_root_credential_name, - cloud: d.cloud, - globalMetastoreId: d.global_metastore_id, - externalAccessEnabled: d.external_access_enabled, - })); - -export const unmarshalUpdateMetastoreAssignmentSchema: z.ZodType = - z - .object({ - workspace_id: z.number().optional(), - metastore_id: z.string().optional(), - default_catalog_name: z.string().optional(), - }) - .transform(d => ({ - workspaceId: d.workspace_id, - metastoreId: d.metastore_id, - defaultCatalogName: d.default_catalog_name, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalUpdateMetastoreAssignment_ResponseSchema: z.ZodType = z.object({}); @@ -604,131 +482,6 @@ export const marshalCreateMetastoreAssignmentSchema: z.ZodType = z default_catalog_name: d.defaultCatalogName, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreateMetastoreAssignment_ResponseSchema: z.ZodType = - z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteMetastore_ResponseSchema: z.ZodType = z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteMetastoreAssignment_ResponseSchema: z.ZodType = - z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetMetastoreSummary_ResponseSchema: z.ZodType = z - .object({ - metastoreId: z.string().optional(), - name: z.string().optional(), - defaultDataAccessConfigId: z.string().optional(), - storageRootCredentialId: z.string().optional(), - cloud: z.string().optional(), - region: z.string().optional(), - globalMetastoreId: z.string().optional(), - storageRootCredentialName: z.string().optional(), - privilegeModelVersion: z.string().optional(), - deltaSharingScope: z.enum(DeltaSharingScope_Enum).optional(), - deltaSharingRecipientTokenLifetimeInSeconds: z.number().optional(), - deltaSharingOrganizationName: z.string().optional(), - storageRoot: z.string().optional(), - owner: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - externalAccessEnabled: z.boolean().optional(), - }) - .transform(d => ({ - metastore_id: d.metastoreId, - name: d.name, - default_data_access_config_id: d.defaultDataAccessConfigId, - storage_root_credential_id: d.storageRootCredentialId, - cloud: d.cloud, - region: d.region, - global_metastore_id: d.globalMetastoreId, - storage_root_credential_name: d.storageRootCredentialName, - privilege_model_version: d.privilegeModelVersion, - delta_sharing_scope: d.deltaSharingScope, - delta_sharing_recipient_token_lifetime_in_seconds: - d.deltaSharingRecipientTokenLifetimeInSeconds, - delta_sharing_organization_name: d.deltaSharingOrganizationName, - storage_root: d.storageRoot, - owner: d.owner, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - external_access_enabled: d.externalAccessEnabled, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListMetastores_ResponseSchema: z.ZodType = z - .object({ - metastores: z.array(z.lazy(() => marshalMetastoreInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - metastores: d.metastores, - next_page_token: d.nextPageToken, - })); - -export const marshalMetastoreAssignmentSchema: z.ZodType = z - .object({ - workspaceId: z.number().optional(), - metastoreId: z.string().optional(), - defaultCatalogName: z.string().optional(), - }) - .transform(d => ({ - workspace_id: d.workspaceId, - metastore_id: d.metastoreId, - default_catalog_name: d.defaultCatalogName, - })); - -export const marshalMetastoreInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - storageRoot: z.string().optional(), - defaultDataAccessConfigId: z.string().optional(), - storageRootCredentialId: z.string().optional(), - deltaSharingScope: z.enum(DeltaSharingScope_Enum).optional(), - deltaSharingRecipientTokenLifetimeInSeconds: z.number().optional(), - deltaSharingOrganizationName: z.string().optional(), - owner: z.string().optional(), - privilegeModelVersion: z.string().optional(), - region: z.string().optional(), - metastoreId: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - storageRootCredentialName: z.string().optional(), - cloud: z.string().optional(), - globalMetastoreId: z.string().optional(), - externalAccessEnabled: z.boolean().optional(), - }) - .transform(d => ({ - name: d.name, - storage_root: d.storageRoot, - default_data_access_config_id: d.defaultDataAccessConfigId, - storage_root_credential_id: d.storageRootCredentialId, - delta_sharing_scope: d.deltaSharingScope, - delta_sharing_recipient_token_lifetime_in_seconds: - d.deltaSharingRecipientTokenLifetimeInSeconds, - delta_sharing_organization_name: d.deltaSharingOrganizationName, - owner: d.owner, - privilege_model_version: d.privilegeModelVersion, - region: d.region, - metastore_id: d.metastoreId, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - storage_root_credential_name: d.storageRootCredentialName, - cloud: d.cloud, - global_metastore_id: d.globalMetastoreId, - external_access_enabled: d.externalAccessEnabled, - })); - export const marshalUpdateMetastoreSchema: z.ZodType = z .object({ id: z.string().optional(), @@ -789,335 +542,3 @@ export const marshalUpdateMetastoreAssignmentSchema: z.ZodType = z metastore_id: d.metastoreId, default_catalog_name: d.defaultCatalogName, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalUpdateMetastoreAssignment_ResponseSchema: z.ZodType = - z.object({}); - -const createMetastoreFieldMaskSchema: FieldMaskSchema = { - cloud: {wire: 'cloud'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - defaultDataAccessConfigId: {wire: 'default_data_access_config_id'}, - deltaSharingOrganizationName: {wire: 'delta_sharing_organization_name'}, - deltaSharingRecipientTokenLifetimeInSeconds: { - wire: 'delta_sharing_recipient_token_lifetime_in_seconds', - }, - deltaSharingScope: {wire: 'delta_sharing_scope'}, - externalAccessEnabled: {wire: 'external_access_enabled'}, - globalMetastoreId: {wire: 'global_metastore_id'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - privilegeModelVersion: {wire: 'privilege_model_version'}, - region: {wire: 'region'}, - storageRoot: {wire: 'storage_root'}, - storageRootCredentialId: {wire: 'storage_root_credential_id'}, - storageRootCredentialName: {wire: 'storage_root_credential_name'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function createMetastoreFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createMetastoreFieldMaskSchema - ); -} - -const createMetastoreAssignmentFieldMaskSchema: FieldMaskSchema = { - defaultCatalogName: {wire: 'default_catalog_name'}, - metastoreId: {wire: 'metastore_id'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function createMetastoreAssignmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createMetastoreAssignmentFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createMetastoreAssignment_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createMetastoreAssignment_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createMetastoreAssignment_ResponseFieldMaskSchema - ); -} - -const deleteMetastoreFieldMaskSchema: FieldMaskSchema = { - force: {wire: 'force'}, - id: {wire: 'id'}, -}; - -export function deleteMetastoreFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteMetastoreFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteMetastore_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteMetastore_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteMetastore_ResponseFieldMaskSchema - ); -} - -const deleteMetastoreAssignmentFieldMaskSchema: FieldMaskSchema = { - metastoreId: {wire: 'metastore_id'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function deleteMetastoreAssignmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteMetastoreAssignmentFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteMetastoreAssignment_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteMetastoreAssignment_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteMetastoreAssignment_ResponseFieldMaskSchema - ); -} - -const deltaSharingScopeFieldMaskSchema: FieldMaskSchema = {}; - -export function deltaSharingScopeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deltaSharingScopeFieldMaskSchema - ); -} - -const getCurrentMetastoreAssignmentFieldMaskSchema: FieldMaskSchema = {}; - -export function getCurrentMetastoreAssignmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getCurrentMetastoreAssignmentFieldMaskSchema - ); -} - -const getMetastoreFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function getMetastoreFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, getMetastoreFieldMaskSchema); -} - -const getMetastoreSummaryFieldMaskSchema: FieldMaskSchema = {}; - -export function getMetastoreSummaryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getMetastoreSummaryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getMetastoreSummary_ResponseFieldMaskSchema: FieldMaskSchema = { - cloud: {wire: 'cloud'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - defaultDataAccessConfigId: {wire: 'default_data_access_config_id'}, - deltaSharingOrganizationName: {wire: 'delta_sharing_organization_name'}, - deltaSharingRecipientTokenLifetimeInSeconds: { - wire: 'delta_sharing_recipient_token_lifetime_in_seconds', - }, - deltaSharingScope: {wire: 'delta_sharing_scope'}, - externalAccessEnabled: {wire: 'external_access_enabled'}, - globalMetastoreId: {wire: 'global_metastore_id'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - privilegeModelVersion: {wire: 'privilege_model_version'}, - region: {wire: 'region'}, - storageRoot: {wire: 'storage_root'}, - storageRootCredentialId: {wire: 'storage_root_credential_id'}, - storageRootCredentialName: {wire: 'storage_root_credential_name'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getMetastoreSummary_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getMetastoreSummary_ResponseFieldMaskSchema - ); -} - -const listMetastoresFieldMaskSchema: FieldMaskSchema = { - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listMetastoresFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listMetastoresFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listMetastores_ResponseFieldMaskSchema: FieldMaskSchema = { - metastores: {wire: 'metastores'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listMetastores_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listMetastores_ResponseFieldMaskSchema - ); -} - -const metastoreAssignmentFieldMaskSchema: FieldMaskSchema = { - defaultCatalogName: {wire: 'default_catalog_name'}, - metastoreId: {wire: 'metastore_id'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function metastoreAssignmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - metastoreAssignmentFieldMaskSchema - ); -} - -const metastoreInfoFieldMaskSchema: FieldMaskSchema = { - cloud: {wire: 'cloud'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - defaultDataAccessConfigId: {wire: 'default_data_access_config_id'}, - deltaSharingOrganizationName: {wire: 'delta_sharing_organization_name'}, - deltaSharingRecipientTokenLifetimeInSeconds: { - wire: 'delta_sharing_recipient_token_lifetime_in_seconds', - }, - deltaSharingScope: {wire: 'delta_sharing_scope'}, - externalAccessEnabled: {wire: 'external_access_enabled'}, - globalMetastoreId: {wire: 'global_metastore_id'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - privilegeModelVersion: {wire: 'privilege_model_version'}, - region: {wire: 'region'}, - storageRoot: {wire: 'storage_root'}, - storageRootCredentialId: {wire: 'storage_root_credential_id'}, - storageRootCredentialName: {wire: 'storage_root_credential_name'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function metastoreInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, metastoreInfoFieldMaskSchema); -} - -const updateMetastoreFieldMaskSchema: FieldMaskSchema = { - cloud: {wire: 'cloud'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - defaultDataAccessConfigId: {wire: 'default_data_access_config_id'}, - deltaSharingOrganizationName: {wire: 'delta_sharing_organization_name'}, - deltaSharingRecipientTokenLifetimeInSeconds: { - wire: 'delta_sharing_recipient_token_lifetime_in_seconds', - }, - deltaSharingScope: {wire: 'delta_sharing_scope'}, - externalAccessEnabled: {wire: 'external_access_enabled'}, - globalMetastoreId: {wire: 'global_metastore_id'}, - id: {wire: 'id'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - newName: {wire: 'new_name'}, - owner: {wire: 'owner'}, - privilegeModelVersion: {wire: 'privilege_model_version'}, - region: {wire: 'region'}, - storageRoot: {wire: 'storage_root'}, - storageRootCredentialId: {wire: 'storage_root_credential_id'}, - storageRootCredentialName: {wire: 'storage_root_credential_name'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function updateMetastoreFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateMetastoreFieldMaskSchema - ); -} - -const updateMetastoreAssignmentFieldMaskSchema: FieldMaskSchema = { - defaultCatalogName: {wire: 'default_catalog_name'}, - metastoreId: {wire: 'metastore_id'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function updateMetastoreAssignmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateMetastoreAssignmentFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateMetastoreAssignment_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateMetastoreAssignment_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateMetastoreAssignment_ResponseFieldMaskSchema - ); -} diff --git a/packages/notificationdestinations/src/v1/model.ts b/packages/notificationdestinations/src/v1/model.ts index 462e7289..fb875916 100644 --- a/packages/notificationdestinations/src/v1/model.ts +++ b/packages/notificationdestinations/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum DestinationType { @@ -165,17 +163,6 @@ export const unmarshalConfigSchema: z.ZodType = z microsoftTeams: d.microsoft_teams, })); -export const unmarshalCreateNotificationDestinationRequestSchema: z.ZodType = - z - .object({ - display_name: z.string().optional(), - config: z.lazy(() => unmarshalConfigSchema).optional(), - }) - .transform(d => ({ - displayName: d.display_name, - config: d.config, - })); - export const unmarshalEmailConfigSchema: z.ZodType = z .object({ addresses: z.array(z.string()).optional(), @@ -303,19 +290,6 @@ export const unmarshalSlackConfigSchema: z.ZodType = z channelIdSet: d.channel_id_set, })); -export const unmarshalUpdateNotificationDestinationRequestSchema: z.ZodType = - z - .object({ - id: z.string().optional(), - display_name: z.string().optional(), - config: z.lazy(() => unmarshalConfigSchema).optional(), - }) - .transform(d => ({ - id: d.id, - displayName: d.display_name, - config: d.config, - })); - export const marshalConfigSchema: z.ZodType = z .object({ slack: z.lazy(() => marshalSlackConfigSchema).optional(), @@ -350,8 +324,6 @@ export const marshalEmailConfigSchema: z.ZodType = z addresses: d.addresses, })); -export const marshalEmptySchema: z.ZodType = z.object({}); - export const marshalGenericWebhookConfigSchema: z.ZodType = z .object({ url: z.string().optional(), @@ -370,32 +342,6 @@ export const marshalGenericWebhookConfigSchema: z.ZodType = z password_set: d.passwordSet, })); -export const marshalListNotificationDestinationsResponseSchema: z.ZodType = z - .object({ - results: z - .array(z.lazy(() => marshalListNotificationDestinationsResultSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - results: d.results, - next_page_token: d.nextPageToken, - })); - -export const marshalListNotificationDestinationsResultSchema: z.ZodType = z - .object({ - id: z.string().optional(), - displayName: z.string().optional(), - destinationType: z.enum(DestinationType).optional(), - config: z.lazy(() => marshalConfigSchema).optional(), - }) - .transform(d => ({ - id: d.id, - display_name: d.displayName, - destination_type: d.destinationType, - config: d.config, - })); - export const marshalMicrosoftTeamsConfigSchema: z.ZodType = z .object({ url: z.string().optional(), @@ -422,20 +368,6 @@ export const marshalMicrosoftTeamsConfigSchema: z.ZodType = z tenant_id_set: d.tenantIdSet, })); -export const marshalNotificationDestinationSchema: z.ZodType = z - .object({ - id: z.string().optional(), - displayName: z.string().optional(), - destinationType: z.enum(DestinationType).optional(), - config: z.lazy(() => marshalConfigSchema).optional(), - }) - .transform(d => ({ - id: d.id, - display_name: d.displayName, - destination_type: d.destinationType, - config: d.config, - })); - export const marshalPagerdutyConfigSchema: z.ZodType = z .object({ integrationKey: z.string().optional(), @@ -475,224 +407,3 @@ export const marshalUpdateNotificationDestinationRequestSchema: z.ZodType = z display_name: d.displayName, config: d.config, })); - -const configFieldMaskSchema: FieldMaskSchema = { - email: {wire: 'email', children: () => emailConfigFieldMaskSchema}, - genericWebhook: { - wire: 'generic_webhook', - children: () => genericWebhookConfigFieldMaskSchema, - }, - microsoftTeams: { - wire: 'microsoft_teams', - children: () => microsoftTeamsConfigFieldMaskSchema, - }, - pagerduty: { - wire: 'pagerduty', - children: () => pagerdutyConfigFieldMaskSchema, - }, - slack: {wire: 'slack', children: () => slackConfigFieldMaskSchema}, -}; - -export function configFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, configFieldMaskSchema); -} - -const createNotificationDestinationRequestFieldMaskSchema: FieldMaskSchema = { - config: {wire: 'config', children: () => configFieldMaskSchema}, - displayName: {wire: 'display_name'}, -}; - -export function createNotificationDestinationRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createNotificationDestinationRequestFieldMaskSchema - ); -} - -const deleteNotificationDestinationRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function deleteNotificationDestinationRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteNotificationDestinationRequestFieldMaskSchema - ); -} - -const emailConfigFieldMaskSchema: FieldMaskSchema = { - addresses: {wire: 'addresses'}, -}; - -export function emailConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, emailConfigFieldMaskSchema); -} - -const emptyFieldMaskSchema: FieldMaskSchema = {}; - -export function emptyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, emptyFieldMaskSchema); -} - -const genericWebhookConfigFieldMaskSchema: FieldMaskSchema = { - password: {wire: 'password'}, - passwordSet: {wire: 'password_set'}, - url: {wire: 'url'}, - urlSet: {wire: 'url_set'}, - username: {wire: 'username'}, - usernameSet: {wire: 'username_set'}, -}; - -export function genericWebhookConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - genericWebhookConfigFieldMaskSchema - ); -} - -const getNotificationDestinationRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function getNotificationDestinationRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getNotificationDestinationRequestFieldMaskSchema - ); -} - -const listNotificationDestinationsRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listNotificationDestinationsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listNotificationDestinationsRequestFieldMaskSchema - ); -} - -const listNotificationDestinationsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - results: {wire: 'results'}, -}; - -export function listNotificationDestinationsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listNotificationDestinationsResponseFieldMaskSchema - ); -} - -const listNotificationDestinationsResultFieldMaskSchema: FieldMaskSchema = { - config: {wire: 'config', children: () => configFieldMaskSchema}, - destinationType: {wire: 'destination_type'}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, -}; - -export function listNotificationDestinationsResultFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listNotificationDestinationsResultFieldMaskSchema - ); -} - -const microsoftTeamsConfigFieldMaskSchema: FieldMaskSchema = { - appId: {wire: 'app_id'}, - appIdSet: {wire: 'app_id_set'}, - authSecret: {wire: 'auth_secret'}, - authSecretSet: {wire: 'auth_secret_set'}, - channelUrl: {wire: 'channel_url'}, - channelUrlSet: {wire: 'channel_url_set'}, - tenantId: {wire: 'tenant_id'}, - tenantIdSet: {wire: 'tenant_id_set'}, - url: {wire: 'url'}, - urlSet: {wire: 'url_set'}, -}; - -export function microsoftTeamsConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - microsoftTeamsConfigFieldMaskSchema - ); -} - -const notificationDestinationFieldMaskSchema: FieldMaskSchema = { - config: {wire: 'config', children: () => configFieldMaskSchema}, - destinationType: {wire: 'destination_type'}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, -}; - -export function notificationDestinationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - notificationDestinationFieldMaskSchema - ); -} - -const pagerdutyConfigFieldMaskSchema: FieldMaskSchema = { - integrationKey: {wire: 'integration_key'}, - integrationKeySet: {wire: 'integration_key_set'}, -}; - -export function pagerdutyConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - pagerdutyConfigFieldMaskSchema - ); -} - -const slackConfigFieldMaskSchema: FieldMaskSchema = { - channelId: {wire: 'channel_id'}, - channelIdSet: {wire: 'channel_id_set'}, - oauthToken: {wire: 'oauth_token'}, - oauthTokenSet: {wire: 'oauth_token_set'}, - url: {wire: 'url'}, - urlSet: {wire: 'url_set'}, -}; - -export function slackConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, slackConfigFieldMaskSchema); -} - -const updateNotificationDestinationRequestFieldMaskSchema: FieldMaskSchema = { - config: {wire: 'config', children: () => configFieldMaskSchema}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, -}; - -export function updateNotificationDestinationRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateNotificationDestinationRequestFieldMaskSchema - ); -} diff --git a/packages/oauthcustomappintegration/src/v1/model.ts b/packages/oauthcustomappintegration/src/v1/model.ts index 508b8544..5e5a6e9d 100644 --- a/packages/oauthcustomappintegration/src/v1/model.ts +++ b/packages/oauthcustomappintegration/src/v1/model.ts @@ -1,8 +1,6 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface CreateCustomOAuthAppIntegration { @@ -217,44 +215,6 @@ export interface UpdatePublishedOAuthAppIntegration { // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name. export interface UpdatePublishedOAuthAppIntegration_Response {} -export const unmarshalCreateCustomOAuthAppIntegrationSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - redirect_urls: z.array(z.string()).optional(), - name: z.string().optional(), - confidential: z.boolean().optional(), - token_access_policy: z - .lazy(() => unmarshalTokenAccessPolicySchema) - .optional(), - scopes: z.array(z.string()).optional(), - user_authorized_scopes: z.array(z.string()).optional(), - }) - .transform(d => ({ - accountId: d.account_id, - redirectUrls: d.redirect_urls, - name: d.name, - confidential: d.confidential, - tokenAccessPolicy: d.token_access_policy, - scopes: d.scopes, - userAuthorizedScopes: d.user_authorized_scopes, - })); - -export const unmarshalCreatePublishedOAuthAppIntegrationSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - app_id: z.string().optional(), - token_access_policy: z - .lazy(() => unmarshalTokenAccessPolicySchema) - .optional(), - }) - .transform(d => ({ - accountId: d.account_id, - appId: d.app_id, - tokenAccessPolicy: d.token_access_policy, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreatePublishedOAuthAppIntegration_ResponseSchema: z.ZodType = z @@ -389,46 +349,10 @@ export const unmarshalTokenAccessPolicySchema: z.ZodType = z absoluteSessionLifetimeInMinutes: d.absolute_session_lifetime_in_minutes, })); -export const unmarshalUpdateCustomOAuthAppIntegrationSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - integration_id: z.string().optional(), - redirect_urls: z.array(z.string()).optional(), - token_access_policy: z - .lazy(() => unmarshalTokenAccessPolicySchema) - .optional(), - scopes: z.array(z.string()).optional(), - user_authorized_scopes: z.array(z.string()).optional(), - }) - .transform(d => ({ - accountId: d.account_id, - integrationId: d.integration_id, - redirectUrls: d.redirect_urls, - tokenAccessPolicy: d.token_access_policy, - scopes: d.scopes, - userAuthorizedScopes: d.user_authorized_scopes, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalUpdateCustomOAuthAppIntegration_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalUpdatePublishedOAuthAppIntegrationSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - integration_id: z.string().optional(), - token_access_policy: z - .lazy(() => unmarshalTokenAccessPolicySchema) - .optional(), - }) - .transform(d => ({ - accountId: d.account_id, - integrationId: d.integration_id, - tokenAccessPolicy: d.token_access_policy, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalUpdatePublishedOAuthAppIntegration_ResponseSchema: z.ZodType = z.object({}); @@ -465,118 +389,6 @@ export const marshalCreatePublishedOAuthAppIntegrationSchema: z.ZodType = z token_access_policy: d.tokenAccessPolicy, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreatePublishedOAuthAppIntegration_ResponseSchema: z.ZodType = - z - .object({ - integrationId: z.string().optional(), - }) - .transform(d => ({ - integration_id: d.integrationId, - })); - -export const marshalCustomOAuthAppIntegrationSchema: z.ZodType = z - .object({ - integrationId: z.string().optional(), - clientId: z.string().optional(), - redirectUrls: z.array(z.string()).optional(), - name: z.string().optional(), - confidential: z.boolean().optional(), - tokenAccessPolicy: z.lazy(() => marshalTokenAccessPolicySchema).optional(), - scopes: z.array(z.string()).optional(), - createdBy: z.number().optional(), - createTime: z.string().optional(), - creatorUsername: z.string().optional(), - userAuthorizedScopes: z.array(z.string()).optional(), - principalId: z.number().optional(), - }) - .transform(d => ({ - integration_id: d.integrationId, - client_id: d.clientId, - redirect_urls: d.redirectUrls, - name: d.name, - confidential: d.confidential, - token_access_policy: d.tokenAccessPolicy, - scopes: d.scopes, - created_by: d.createdBy, - create_time: d.createTime, - creator_username: d.creatorUsername, - user_authorized_scopes: d.userAuthorizedScopes, - principal_id: d.principalId, - })); - -export const marshalCustomOAuthAppIntegrationSecretSchema: z.ZodType = z - .object({ - integrationId: z.string().optional(), - clientId: z.string().optional(), - clientSecret: z.string().optional(), - principalId: z.number().optional(), - clientSecretExpireTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - }) - .transform(d => ({ - integration_id: d.integrationId, - client_id: d.clientId, - client_secret: d.clientSecret, - principal_id: d.principalId, - client_secret_expire_time: d.clientSecretExpireTime, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteCustomOAuthAppIntegration_ResponseSchema: z.ZodType = - z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeletePublishedOAuthAppIntegration_ResponseSchema: z.ZodType = - z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListCustomOAuthAppIntegrations_ResponseSchema: z.ZodType = z - .object({ - apps: z - .array(z.lazy(() => marshalCustomOAuthAppIntegrationSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - apps: d.apps, - next_page_token: d.nextPageToken, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListPublishedOAuthAppIntegrations_ResponseSchema: z.ZodType = - z - .object({ - apps: z - .array(z.lazy(() => marshalPublishedOAuthAppIntegrationSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - apps: d.apps, - next_page_token: d.nextPageToken, - })); - -export const marshalPublishedOAuthAppIntegrationSchema: z.ZodType = z - .object({ - appId: z.string().optional(), - integrationId: z.string().optional(), - name: z.string().optional(), - tokenAccessPolicy: z.lazy(() => marshalTokenAccessPolicySchema).optional(), - createdBy: z.number().optional(), - createTime: z.string().optional(), - }) - .transform(d => ({ - app_id: d.appId, - integration_id: d.integrationId, - name: d.name, - token_access_policy: d.tokenAccessPolicy, - created_by: d.createdBy, - create_time: d.createTime, - })); - export const marshalTokenAccessPolicySchema: z.ZodType = z .object({ accessTokenTtlInMinutes: z.number().optional(), @@ -609,10 +421,6 @@ export const marshalUpdateCustomOAuthAppIntegrationSchema: z.ZodType = z user_authorized_scopes: d.userAuthorizedScopes, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalUpdateCustomOAuthAppIntegration_ResponseSchema: z.ZodType = - z.object({}); - export const marshalUpdatePublishedOAuthAppIntegrationSchema: z.ZodType = z .object({ accountId: z.string().optional(), @@ -624,362 +432,3 @@ export const marshalUpdatePublishedOAuthAppIntegrationSchema: z.ZodType = z integration_id: d.integrationId, token_access_policy: d.tokenAccessPolicy, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalUpdatePublishedOAuthAppIntegration_ResponseSchema: z.ZodType = - z.object({}); - -const createCustomOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - confidential: {wire: 'confidential'}, - name: {wire: 'name'}, - redirectUrls: {wire: 'redirect_urls'}, - scopes: {wire: 'scopes'}, - tokenAccessPolicy: { - wire: 'token_access_policy', - children: () => tokenAccessPolicyFieldMaskSchema, - }, - userAuthorizedScopes: {wire: 'user_authorized_scopes'}, -}; - -export function createCustomOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createCustomOAuthAppIntegrationFieldMaskSchema - ); -} - -const createPublishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - appId: {wire: 'app_id'}, - tokenAccessPolicy: { - wire: 'token_access_policy', - children: () => tokenAccessPolicyFieldMaskSchema, - }, -}; - -export function createPublishedOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createPublishedOAuthAppIntegrationFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createPublishedOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = - { - integrationId: {wire: 'integration_id'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createPublishedOAuthAppIntegration_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createPublishedOAuthAppIntegration_ResponseFieldMaskSchema - ); -} - -const customOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - clientId: {wire: 'client_id'}, - confidential: {wire: 'confidential'}, - createTime: {wire: 'create_time'}, - createdBy: {wire: 'created_by'}, - creatorUsername: {wire: 'creator_username'}, - integrationId: {wire: 'integration_id'}, - name: {wire: 'name'}, - principalId: {wire: 'principal_id'}, - redirectUrls: {wire: 'redirect_urls'}, - scopes: {wire: 'scopes'}, - tokenAccessPolicy: { - wire: 'token_access_policy', - children: () => tokenAccessPolicyFieldMaskSchema, - }, - userAuthorizedScopes: {wire: 'user_authorized_scopes'}, -}; - -export function customOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - customOAuthAppIntegrationFieldMaskSchema - ); -} - -const customOAuthAppIntegrationSecretFieldMaskSchema: FieldMaskSchema = { - clientId: {wire: 'client_id'}, - clientSecret: {wire: 'client_secret'}, - clientSecretExpireTime: {wire: 'client_secret_expire_time'}, - integrationId: {wire: 'integration_id'}, - principalId: {wire: 'principal_id'}, -}; - -export function customOAuthAppIntegrationSecretFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - customOAuthAppIntegrationSecretFieldMaskSchema - ); -} - -const deleteCustomOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - integrationId: {wire: 'integration_id'}, -}; - -export function deleteCustomOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteCustomOAuthAppIntegrationFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteCustomOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = - {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteCustomOAuthAppIntegration_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteCustomOAuthAppIntegration_ResponseFieldMaskSchema - ); -} - -const deletePublishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - integrationId: {wire: 'integration_id'}, -}; - -export function deletePublishedOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deletePublishedOAuthAppIntegrationFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deletePublishedOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = - {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deletePublishedOAuthAppIntegration_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deletePublishedOAuthAppIntegration_ResponseFieldMaskSchema - ); -} - -const getCustomOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - integrationId: {wire: 'integration_id'}, -}; - -export function getCustomOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getCustomOAuthAppIntegrationFieldMaskSchema - ); -} - -const getPublishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - integrationId: {wire: 'integration_id'}, -}; - -export function getPublishedOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getPublishedOAuthAppIntegrationFieldMaskSchema - ); -} - -const listCustomOAuthAppIntegrationsFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - includeCreatorUsername: {wire: 'include_creator_username'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listCustomOAuthAppIntegrationsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listCustomOAuthAppIntegrationsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listCustomOAuthAppIntegrations_ResponseFieldMaskSchema: FieldMaskSchema = - { - apps: {wire: 'apps'}, - nextPageToken: {wire: 'next_page_token'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listCustomOAuthAppIntegrations_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listCustomOAuthAppIntegrations_ResponseFieldMaskSchema - ); -} - -const listPublishedOAuthAppIntegrationsFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listPublishedOAuthAppIntegrationsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPublishedOAuthAppIntegrationsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listPublishedOAuthAppIntegrations_ResponseFieldMaskSchema: FieldMaskSchema = - { - apps: {wire: 'apps'}, - nextPageToken: {wire: 'next_page_token'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listPublishedOAuthAppIntegrations_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPublishedOAuthAppIntegrations_ResponseFieldMaskSchema - ); -} - -const publishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - appId: {wire: 'app_id'}, - createTime: {wire: 'create_time'}, - createdBy: {wire: 'created_by'}, - integrationId: {wire: 'integration_id'}, - name: {wire: 'name'}, - tokenAccessPolicy: { - wire: 'token_access_policy', - children: () => tokenAccessPolicyFieldMaskSchema, - }, -}; - -export function publishedOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - publishedOAuthAppIntegrationFieldMaskSchema - ); -} - -const tokenAccessPolicyFieldMaskSchema: FieldMaskSchema = { - absoluteSessionLifetimeInMinutes: { - wire: 'absolute_session_lifetime_in_minutes', - }, - accessTokenTtlInMinutes: {wire: 'access_token_ttl_in_minutes'}, - enableSingleUseRefreshTokens: {wire: 'enable_single_use_refresh_tokens'}, - refreshTokenTtlInMinutes: {wire: 'refresh_token_ttl_in_minutes'}, -}; - -export function tokenAccessPolicyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - tokenAccessPolicyFieldMaskSchema - ); -} - -const updateCustomOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - integrationId: {wire: 'integration_id'}, - redirectUrls: {wire: 'redirect_urls'}, - scopes: {wire: 'scopes'}, - tokenAccessPolicy: { - wire: 'token_access_policy', - children: () => tokenAccessPolicyFieldMaskSchema, - }, - userAuthorizedScopes: {wire: 'user_authorized_scopes'}, -}; - -export function updateCustomOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateCustomOAuthAppIntegrationFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateCustomOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = - {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateCustomOAuthAppIntegration_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateCustomOAuthAppIntegration_ResponseFieldMaskSchema - ); -} - -const updatePublishedOAuthAppIntegrationFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - integrationId: {wire: 'integration_id'}, - tokenAccessPolicy: { - wire: 'token_access_policy', - children: () => tokenAccessPolicyFieldMaskSchema, - }, -}; - -export function updatePublishedOAuthAppIntegrationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updatePublishedOAuthAppIntegrationFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updatePublishedOAuthAppIntegration_ResponseFieldMaskSchema: FieldMaskSchema = - {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updatePublishedOAuthAppIntegration_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updatePublishedOAuthAppIntegration_ResponseFieldMaskSchema - ); -} diff --git a/packages/oauthpublishedapp/src/v1/model.ts b/packages/oauthpublishedapp/src/v1/model.ts index 77911af8..a71a9a86 100644 --- a/packages/oauthpublishedapp/src/v1/model.ts +++ b/packages/oauthpublishedapp/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface ListPublishedOAuthApps { @@ -69,84 +67,3 @@ export const unmarshalPublishedOAuthAppSchema: z.ZodType = z redirectUrls: d.redirect_urls, scopes: d.scopes, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListPublishedOAuthApps_ResponseSchema: z.ZodType = z - .object({ - apps: z.array(z.lazy(() => marshalPublishedOAuthAppSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - apps: d.apps, - next_page_token: d.nextPageToken, - })); - -export const marshalPublishedOAuthAppSchema: z.ZodType = z - .object({ - appId: z.string().optional(), - clientId: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - isConfidentialClient: z.boolean().optional(), - redirectUrls: z.array(z.string()).optional(), - scopes: z.array(z.string()).optional(), - }) - .transform(d => ({ - app_id: d.appId, - client_id: d.clientId, - name: d.name, - description: d.description, - is_confidential_client: d.isConfidentialClient, - redirect_urls: d.redirectUrls, - scopes: d.scopes, - })); - -const listPublishedOAuthAppsFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listPublishedOAuthAppsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPublishedOAuthAppsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listPublishedOAuthApps_ResponseFieldMaskSchema: FieldMaskSchema = { - apps: {wire: 'apps'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listPublishedOAuthApps_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPublishedOAuthApps_ResponseFieldMaskSchema - ); -} - -const publishedOAuthAppFieldMaskSchema: FieldMaskSchema = { - appId: {wire: 'app_id'}, - clientId: {wire: 'client_id'}, - description: {wire: 'description'}, - isConfidentialClient: {wire: 'is_confidential_client'}, - name: {wire: 'name'}, - redirectUrls: {wire: 'redirect_urls'}, - scopes: {wire: 'scopes'}, -}; - -export function publishedOAuthAppFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - publishedOAuthAppFieldMaskSchema - ); -} diff --git a/packages/permissions/src/v1/model.ts b/packages/permissions/src/v1/model.ts index 78ad4df4..a36f0c7f 100644 --- a/packages/permissions/src/v1/model.ts +++ b/packages/permissions/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Permission level */ @@ -108,21 +106,6 @@ export interface UpdateObjectPermissions { accessControlList?: AccessControlRequest[] | undefined; } -export const unmarshalAccessControlRequestSchema: z.ZodType = - z - .object({ - user_name: z.string().optional(), - group_name: z.string().optional(), - service_principal_name: z.string().optional(), - permission_level: z.enum(PermissionLevel).optional(), - }) - .transform(d => ({ - userName: d.user_name, - groupName: d.group_name, - servicePrincipalName: d.service_principal_name, - permissionLevel: d.permission_level, - })); - export const unmarshalAccessControlResponseSchema: z.ZodType = z .object({ @@ -192,36 +175,6 @@ export const unmarshalPermissionsResponseSchema: z.ZodType accessControlList: d.access_control_list, })); -export const unmarshalSetObjectPermissionsSchema: z.ZodType = - z - .object({ - request_object_type: z.string().optional(), - request_object_id: z.string().optional(), - access_control_list: z - .array(z.lazy(() => unmarshalAccessControlRequestSchema)) - .optional(), - }) - .transform(d => ({ - requestObjectType: d.request_object_type, - requestObjectId: d.request_object_id, - accessControlList: d.access_control_list, - })); - -export const unmarshalUpdateObjectPermissionsSchema: z.ZodType = - z - .object({ - request_object_type: z.string().optional(), - request_object_id: z.string().optional(), - access_control_list: z - .array(z.lazy(() => unmarshalAccessControlRequestSchema)) - .optional(), - }) - .transform(d => ({ - requestObjectType: d.request_object_type, - requestObjectId: d.request_object_id, - accessControlList: d.access_control_list, - })); - export const marshalAccessControlRequestSchema: z.ZodType = z .object({ userName: z.string().optional(), @@ -236,69 +189,6 @@ export const marshalAccessControlRequestSchema: z.ZodType = z permission_level: d.permissionLevel, })); -export const marshalAccessControlResponseSchema: z.ZodType = z - .object({ - userName: z.string().optional(), - groupName: z.string().optional(), - servicePrincipalName: z.string().optional(), - displayName: z.string().optional(), - allPermissions: z.array(z.lazy(() => marshalPermissionSchema)).optional(), - }) - .transform(d => ({ - user_name: d.userName, - group_name: d.groupName, - service_principal_name: d.servicePrincipalName, - display_name: d.displayName, - all_permissions: d.allPermissions, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetPermissionLevels_ResponseSchema: z.ZodType = z - .object({ - permissionLevels: z - .array(z.lazy(() => marshalPermissionsDescriptionSchema)) - .optional(), - }) - .transform(d => ({ - permission_levels: d.permissionLevels, - })); - -export const marshalPermissionSchema: z.ZodType = z - .object({ - permissionLevel: z.enum(PermissionLevel).optional(), - inherited: z.boolean().optional(), - inheritedFromObject: z.array(z.string()).optional(), - }) - .transform(d => ({ - permission_level: d.permissionLevel, - inherited: d.inherited, - inherited_from_object: d.inheritedFromObject, - })); - -export const marshalPermissionsDescriptionSchema: z.ZodType = z - .object({ - permissionLevel: z.enum(PermissionLevel).optional(), - description: z.string().optional(), - }) - .transform(d => ({ - permission_level: d.permissionLevel, - description: d.description, - })); - -export const marshalPermissionsResponseSchema: z.ZodType = z - .object({ - objectId: z.string().optional(), - objectType: z.string().optional(), - accessControlList: z - .array(z.lazy(() => marshalAccessControlResponseSchema)) - .optional(), - }) - .transform(d => ({ - object_id: d.objectId, - object_type: d.objectType, - access_control_list: d.accessControlList, - })); - export const marshalSetObjectPermissionsSchema: z.ZodType = z .object({ requestObjectType: z.string().optional(), @@ -326,148 +216,3 @@ export const marshalUpdateObjectPermissionsSchema: z.ZodType = z request_object_id: d.requestObjectId, access_control_list: d.accessControlList, })); - -const accessControlRequestFieldMaskSchema: FieldMaskSchema = { - groupName: {wire: 'group_name'}, - permissionLevel: {wire: 'permission_level'}, - servicePrincipalName: {wire: 'service_principal_name'}, - userName: {wire: 'user_name'}, -}; - -export function accessControlRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - accessControlRequestFieldMaskSchema - ); -} - -const accessControlResponseFieldMaskSchema: FieldMaskSchema = { - allPermissions: {wire: 'all_permissions'}, - displayName: {wire: 'display_name'}, - groupName: {wire: 'group_name'}, - servicePrincipalName: {wire: 'service_principal_name'}, - userName: {wire: 'user_name'}, -}; - -export function accessControlResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - accessControlResponseFieldMaskSchema - ); -} - -const getObjectPermissionsFieldMaskSchema: FieldMaskSchema = { - requestObjectId: {wire: 'request_object_id'}, - requestObjectType: {wire: 'request_object_type'}, -}; - -export function getObjectPermissionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getObjectPermissionsFieldMaskSchema - ); -} - -const getPermissionLevelsFieldMaskSchema: FieldMaskSchema = { - requestObjectId: {wire: 'request_object_id'}, - requestObjectType: {wire: 'request_object_type'}, -}; - -export function getPermissionLevelsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getPermissionLevelsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getPermissionLevels_ResponseFieldMaskSchema: FieldMaskSchema = { - permissionLevels: {wire: 'permission_levels'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getPermissionLevels_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getPermissionLevels_ResponseFieldMaskSchema - ); -} - -const permissionFieldMaskSchema: FieldMaskSchema = { - inherited: {wire: 'inherited'}, - inheritedFromObject: {wire: 'inherited_from_object'}, - permissionLevel: {wire: 'permission_level'}, -}; - -export function permissionFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, permissionFieldMaskSchema); -} - -const permissionsDescriptionFieldMaskSchema: FieldMaskSchema = { - description: {wire: 'description'}, - permissionLevel: {wire: 'permission_level'}, -}; - -export function permissionsDescriptionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - permissionsDescriptionFieldMaskSchema - ); -} - -const permissionsResponseFieldMaskSchema: FieldMaskSchema = { - accessControlList: {wire: 'access_control_list'}, - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, -}; - -export function permissionsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - permissionsResponseFieldMaskSchema - ); -} - -const setObjectPermissionsFieldMaskSchema: FieldMaskSchema = { - accessControlList: {wire: 'access_control_list'}, - requestObjectId: {wire: 'request_object_id'}, - requestObjectType: {wire: 'request_object_type'}, -}; - -export function setObjectPermissionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - setObjectPermissionsFieldMaskSchema - ); -} - -const updateObjectPermissionsFieldMaskSchema: FieldMaskSchema = { - accessControlList: {wire: 'access_control_list'}, - requestObjectId: {wire: 'request_object_id'}, - requestObjectType: {wire: 'request_object_type'}, -}; - -export function updateObjectPermissionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateObjectPermissionsFieldMaskSchema - ); -} diff --git a/packages/policyfamilies/src/v2/model.ts b/packages/policyfamilies/src/v2/model.ts index 6491544f..6eac4d0a 100644 --- a/packages/policyfamilies/src/v2/model.ts +++ b/packages/policyfamilies/src/v2/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Returns the details of a policy family at a specific version */ @@ -66,85 +64,3 @@ export const unmarshalPolicyFamilySchema: z.ZodType = z description: d.description, definition: d.definition, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListPolicyFamilies_ResponseSchema: z.ZodType = z - .object({ - policyFamilies: z.array(z.lazy(() => marshalPolicyFamilySchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - policy_families: d.policyFamilies, - next_page_token: d.nextPageToken, - })); - -export const marshalPolicyFamilySchema: z.ZodType = z - .object({ - policyFamilyId: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - definition: z.string().optional(), - }) - .transform(d => ({ - policy_family_id: d.policyFamilyId, - name: d.name, - description: d.description, - definition: d.definition, - })); - -const getPolicyFamilyFieldMaskSchema: FieldMaskSchema = { - policyFamilyId: {wire: 'policy_family_id'}, - version: {wire: 'version'}, -}; - -export function getPolicyFamilyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getPolicyFamilyFieldMaskSchema - ); -} - -const listPolicyFamiliesFieldMaskSchema: FieldMaskSchema = { - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listPolicyFamiliesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPolicyFamiliesFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listPolicyFamilies_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - policyFamilies: {wire: 'policy_families'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listPolicyFamilies_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listPolicyFamilies_ResponseFieldMaskSchema - ); -} - -const policyFamilyFieldMaskSchema: FieldMaskSchema = { - definition: {wire: 'definition'}, - description: {wire: 'description'}, - name: {wire: 'name'}, - policyFamilyId: {wire: 'policy_family_id'}, -}; - -export function policyFamilyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, policyFamilyFieldMaskSchema); -} diff --git a/packages/postgres/src/v1/client.ts b/packages/postgres/src/v1/client.ts index 0dead3c5..4b8641e9 100644 --- a/packages/postgres/src/v1/client.ts +++ b/packages/postgres/src/v1/client.ts @@ -1539,7 +1539,7 @@ export class Client { const url = `${this.host}/api/2.0/postgres/${req.branch?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -1579,7 +1579,7 @@ export class Client { const url = `${this.host}/api/2.0/postgres/${req.database?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -1619,7 +1619,7 @@ export class Client { const url = `${this.host}/api/2.0/postgres/${req.endpoint?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -1659,7 +1659,7 @@ export class Client { const url = `${this.host}/api/2.0/postgres/${req.project?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; @@ -1699,7 +1699,7 @@ export class Client { const url = `${this.host}/api/2.0/postgres/${req.role?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/postgres/src/v1/model.ts b/packages/postgres/src/v1/model.ts index 4efe85c9..4908da83 100644 --- a/packages/postgres/src/v1/model.ts +++ b/packages/postgres/src/v1/model.ts @@ -2299,7 +2299,7 @@ export interface UpdateBranchRequest { */ branch?: Branch | undefined; /** The list of fields to update. If unspecified, all fields will be updated when possible. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export interface UpdateDatabaseRequest { @@ -2311,7 +2311,7 @@ export interface UpdateDatabaseRequest { */ database?: Database | undefined; /** The list of fields to update. If unspecified, all fields will be updated when possible. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export interface UpdateEndpointRequest { @@ -2323,7 +2323,7 @@ export interface UpdateEndpointRequest { */ endpoint?: Endpoint | undefined; /** The list of fields to update. If unspecified, all fields will be updated when possible. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export interface UpdateProjectRequest { @@ -2335,7 +2335,7 @@ export interface UpdateProjectRequest { */ project?: Project | undefined; /** The list of fields to update. If unspecified, all fields will be updated when possible. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export interface UpdateRoleRequest { @@ -2350,7 +2350,7 @@ export interface UpdateRoleRequest { * The list of fields to update in Postgres Role. * If unspecified, all fields will be updated when possible. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalBranchSchema: z.ZodType = z @@ -2891,29 +2891,6 @@ export const unmarshalForwardEtlTableMappingSchema: z.ZodType = - z - .object({ - claims: z.array(z.lazy(() => unmarshalRequestedClaimsSchema)).optional(), - endpoint: z.string().optional(), - group_name: z.string().optional(), - ttl: z - .string() - .transform(s => Temporal.Duration.from('PT' + s.toUpperCase())) - .optional(), - expire_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - }) - .transform(d => ({ - claims: d.claims, - endpoint: d.endpoint, - groupName: d.group_name, - ttl: d.ttl, - expireTime: d.expire_time, - })); - export const unmarshalInitialEndpointSpecSchema: z.ZodType = z .object({ @@ -3166,28 +3143,6 @@ export const unmarshalProjectStatusSchema: z.ZodType = z projectId: d.project_id, })); -export const unmarshalRequestedClaimsSchema: z.ZodType = z - .object({ - permission_set: z.enum(RequestedClaims_PermissionSet).optional(), - resources: z - .array(z.lazy(() => unmarshalRequestedResourceSchema)) - .optional(), - }) - .transform(d => ({ - permissionSet: d.permission_set, - resources: d.resources, - })); - -export const unmarshalRequestedResourceSchema: z.ZodType = z - .object({ - unspecified_resource_name: z.string().optional(), - table_name: z.string().optional(), - }) - .transform(d => ({ - unspecifiedResourceName: d.unspecified_resource_name, - tableName: d.table_name, - })); - export const unmarshalRoleSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -3409,24 +3364,6 @@ export const unmarshalTableSchema: z.ZodType
  • = z tableServingUrl: d.table_serving_url, })); -export const unmarshalUndeleteBranchRequestSchema: z.ZodType = - z - .object({ - name: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - })); - -export const unmarshalUndeleteProjectRequestSchema: z.ZodType = - z - .object({ - name: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - })); - export const marshalBranchSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -3453,8 +3390,6 @@ export const marshalBranchSchema: z.ZodType = z status: d.status, })); -export const marshalBranchOperationMetadataSchema: z.ZodType = z.object({}); - export const marshalBranchSpecSchema: z.ZodType = z .object({ sourceBranch: z.string().optional(), @@ -3583,36 +3518,6 @@ export const marshalCatalog_CatalogStatusSchema: z.ZodType = z catalog_id: d.catalogId, })); -export const marshalCatalogOperationMetadataSchema: z.ZodType = z.object({}); - -export const marshalComputeInstanceSchema: z.ZodType = z - .object({ - name: z.string().optional(), - computeInstanceId: z.string().optional(), - currentState: z.enum(ComputeInstance_ComputeState).optional(), - pendingState: z.enum(ComputeInstance_ComputeState).optional(), - role: z.enum(ComputeInstance_ComputeType).optional(), - computeHost: z.string().optional(), - startTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - suspendTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - }) - .transform(d => ({ - name: d.name, - compute_instance_id: d.computeInstanceId, - current_state: d.currentState, - pending_state: d.pendingState, - role: d.role, - compute_host: d.computeHost, - start_time: d.startTime, - suspend_time: d.suspendTime, - })); - export const marshalDatabaseSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -3661,46 +3566,6 @@ export const marshalDatabase_DatabaseStatusSchema: z.ZodType = z database_id: d.databaseId, })); -export const marshalDatabaseCredentialSchema: z.ZodType = z - .object({ - token: z.string().optional(), - expireTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - }) - .transform(d => ({ - token: d.token, - expire_time: d.expireTime, - })); - -export const marshalDatabaseOperationMetadataSchema: z.ZodType = z.object({}); - -export const marshalDatabricksServiceExceptionWithDetailsProtoSchema: z.ZodType = - z - .object({ - errorCode: z.enum(ErrorCode).optional(), - message: z.string().optional(), - stackTrace: z.string().optional(), - details: z.array(z.record(z.string(), z.unknown())).optional(), - }) - .transform(d => ({ - error_code: d.errorCode, - message: d.message, - stack_trace: d.stackTrace, - details: d.details, - })); - -export const marshalDeleteForwardEtlConfigurationResponseSchema: z.ZodType = z - .object({ - deletedConfigs: z.number().optional(), - deletedMappings: z.number().optional(), - }) - .transform(d => ({ - deleted_configs: d.deletedConfigs, - deleted_mappings: d.deletedMappings, - })); - export const marshalDeltaTableSyncInfoSchema: z.ZodType = z .object({ deltaCommitVersion: z.number().optional(), @@ -3714,14 +3579,6 @@ export const marshalDeltaTableSyncInfoSchema: z.ZodType = z delta_commit_time: d.deltaCommitTime, })); -export const marshalDisableForwardEtlResponseSchema: z.ZodType = z - .object({ - disabled: z.boolean().optional(), - }) - .transform(d => ({ - disabled: d.disabled, - })); - export const marshalEndpointSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -3786,8 +3643,6 @@ export const marshalEndpointHostsSchema: z.ZodType = z read_only_pooled_host: d.readOnlyPooledHost, })); -export const marshalEndpointOperationMetadataSchema: z.ZodType = z.object({}); - export const marshalEndpointSettingsSchema: z.ZodType = z .object({ pgSettings: z.record(z.string(), z.string()).optional(), @@ -3857,96 +3712,6 @@ export const marshalEndpointStatusSchema: z.ZodType = z endpoint_id: d.endpointId, })); -export const marshalForwardEtlConfigSchema: z.ZodType = z - .object({ - workspaceId: z.number().optional(), - tenantId: z.string().optional(), - timelineId: z.string().optional(), - pgDatabaseOid: z.number().optional(), - pgSchemaOid: z.number().optional(), - ucCatalogId: z.string().optional(), - ucSchemaId: z.string().optional(), - enabled: z.boolean().optional(), - createTimeMillis: z.number().optional(), - updateTimeMillis: z.number().optional(), - }) - .transform(d => ({ - workspace_id: d.workspaceId, - tenant_id: d.tenantId, - timeline_id: d.timelineId, - pg_database_oid: d.pgDatabaseOid, - pg_schema_oid: d.pgSchemaOid, - uc_catalog_id: d.ucCatalogId, - uc_schema_id: d.ucSchemaId, - enabled: d.enabled, - create_time_millis: d.createTimeMillis, - update_time_millis: d.updateTimeMillis, - })); - -export const marshalForwardEtlDatabaseSchema: z.ZodType = z - .object({ - name: z.string().optional(), - oid: z.number().optional(), - }) - .transform(d => ({ - name: d.name, - oid: d.oid, - })); - -export const marshalForwardEtlMetadataSchema: z.ZodType = z - .object({ - databases: z - .array(z.lazy(() => marshalForwardEtlDatabaseSchema)) - .optional(), - schemas: z.array(z.lazy(() => marshalForwardEtlSchemaSchema)).optional(), - }) - .transform(d => ({ - databases: d.databases, - schemas: d.schemas, - })); - -export const marshalForwardEtlSchemaSchema: z.ZodType = z - .object({ - name: z.string().optional(), - oid: z.number().optional(), - }) - .transform(d => ({ - name: d.name, - oid: d.oid, - })); - -export const marshalForwardEtlStatusSchema: z.ZodType = z - .object({ - configurations: z - .array(z.lazy(() => marshalForwardEtlConfigSchema)) - .optional(), - tableMappings: z - .array(z.lazy(() => marshalForwardEtlTableMappingSchema)) - .optional(), - }) - .transform(d => ({ - configurations: d.configurations, - table_mappings: d.tableMappings, - })); - -export const marshalForwardEtlTableMappingSchema: z.ZodType = z - .object({ - pgTableOid: z.number().optional(), - ucTableId: z.string().optional(), - lastSyncedLsn: z.string().optional(), - pgTableName: z.string().optional(), - ucTableName: z.string().optional(), - enabled: z.boolean().optional(), - }) - .transform(d => ({ - pg_table_oid: d.pgTableOid, - uc_table_id: d.ucTableId, - last_synced_lsn: d.lastSyncedLsn, - pg_table_name: d.pgTableName, - uc_table_name: d.ucTableName, - enabled: d.enabled, - })); - export const marshalGenerateDatabaseCredentialRequestSchema: z.ZodType = z .object({ claims: z.array(z.lazy(() => marshalRequestedClaimsSchema)).optional(), @@ -3977,68 +3742,6 @@ export const marshalInitialEndpointSpecSchema: z.ZodType = z group: d.group, })); -export const marshalListBranchesResponseSchema: z.ZodType = z - .object({ - branches: z.array(z.lazy(() => marshalBranchSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - branches: d.branches, - next_page_token: d.nextPageToken, - })); - -export const marshalListComputeInstancesResponseSchema: z.ZodType = z - .object({ - computeInstances: z - .array(z.lazy(() => marshalComputeInstanceSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - compute_instances: d.computeInstances, - next_page_token: d.nextPageToken, - })); - -export const marshalListDatabasesResponseSchema: z.ZodType = z - .object({ - databases: z.array(z.lazy(() => marshalDatabaseSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - databases: d.databases, - next_page_token: d.nextPageToken, - })); - -export const marshalListEndpointsResponseSchema: z.ZodType = z - .object({ - endpoints: z.array(z.lazy(() => marshalEndpointSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - endpoints: d.endpoints, - next_page_token: d.nextPageToken, - })); - -export const marshalListProjectsResponseSchema: z.ZodType = z - .object({ - projects: z.array(z.lazy(() => marshalProjectSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - projects: d.projects, - next_page_token: d.nextPageToken, - })); - -export const marshalListRolesResponseSchema: z.ZodType = z - .object({ - roles: z.array(z.lazy(() => marshalRoleSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - roles: d.roles, - next_page_token: d.nextPageToken, - })); - export const marshalNewPipelineSpecSchema: z.ZodType = z .object({ storageCatalog: z.string().optional(), @@ -4053,24 +3756,6 @@ export const marshalNewPipelineSpecSchema: z.ZodType = z pipeline_channel: d.pipelineChannel, })); -export const marshalOperationSchema: z.ZodType = z - .object({ - name: z.string().optional(), - metadata: z.record(z.string(), z.unknown()).optional(), - done: z.boolean().optional(), - error: z - .lazy(() => marshalDatabricksServiceExceptionWithDetailsProtoSchema) - .optional(), - response: z.record(z.string(), z.unknown()).optional(), - }) - .transform(d => ({ - name: d.name, - metadata: d.metadata, - done: d.done, - error: d.error, - response: d.response, - })); - export const marshalProjectSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -4138,8 +3823,6 @@ export const marshalProjectDefaultEndpointSettingsSchema: z.ZodType = z pg_settings: d.pgSettings, })); -export const marshalProjectOperationMetadataSchema: z.ZodType = z.object({}); - export const marshalProjectSpecSchema: z.ZodType = z .object({ displayName: z.string().optional(), @@ -4302,8 +3985,6 @@ export const marshalRole_RoleStatusSchema: z.ZodType = z role_id: d.roleId, })); -export const marshalRoleOperationMetadataSchema: z.ZodType = z.object({}); - export const marshalSyncedTableSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -4384,10 +4065,6 @@ export const marshalSyncedTable_SyncedTableStatusSchema: z.ZodType = z project: d.project, })); -export const marshalSyncedTableOperationMetadataSchema: z.ZodType = z.object( - {} -); - export const marshalSyncedTablePipelineProgressSchema: z.ZodType = z .object({ latestVersionCurrentlyProcessing: z.number().optional(), @@ -4470,17 +4147,6 @@ export function branchFieldMask(...paths: string[]): FieldMask { return FieldMask.build(paths, branchFieldMaskSchema); } -const branchOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; - -export function branchOperationMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - branchOperationMetadataFieldMaskSchema - ); -} - const branchSpecFieldMaskSchema: FieldMaskSchema = { expireTime: {wire: 'expire_time'}, isProtected: {wire: 'is_protected'}, @@ -4517,1104 +4183,176 @@ export function branchStatusFieldMask( return FieldMask.build(paths, branchStatusFieldMaskSchema); } -const catalogFieldMaskSchema: FieldMaskSchema = { +const databaseFieldMaskSchema: FieldMaskSchema = { createTime: {wire: 'create_time'}, name: {wire: 'name'}, - spec: {wire: 'spec', children: () => catalog_CatalogSpecFieldMaskSchema}, + parent: {wire: 'parent'}, + spec: {wire: 'spec', children: () => database_DatabaseSpecFieldMaskSchema}, status: { wire: 'status', - children: () => catalog_CatalogStatusFieldMaskSchema, + children: () => database_DatabaseStatusFieldMaskSchema, }, - uid: {wire: 'uid'}, updateTime: {wire: 'update_time'}, }; -export function catalogFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, catalogFieldMaskSchema); +export function databaseFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, databaseFieldMaskSchema); } // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const catalog_CatalogSpecFieldMaskSchema: FieldMaskSchema = { - branch: {wire: 'branch'}, - createDatabaseIfMissing: {wire: 'create_database_if_missing'}, +const database_DatabaseSpecFieldMaskSchema: FieldMaskSchema = { postgresDatabase: {wire: 'postgres_database'}, + role: {wire: 'role'}, }; // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function catalog_CatalogSpecFieldMask( +export function database_DatabaseSpecFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( +): FieldMask { + return FieldMask.build( paths, - catalog_CatalogSpecFieldMaskSchema + database_DatabaseSpecFieldMaskSchema ); } // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const catalog_CatalogStatusFieldMaskSchema: FieldMaskSchema = { - branch: {wire: 'branch'}, - catalogId: {wire: 'catalog_id'}, +const database_DatabaseStatusFieldMaskSchema: FieldMaskSchema = { + databaseId: {wire: 'database_id'}, postgresDatabase: {wire: 'postgres_database'}, - project: {wire: 'project'}, + role: {wire: 'role'}, }; // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function catalog_CatalogStatusFieldMask( +export function database_DatabaseStatusFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( +): FieldMask { + return FieldMask.build( paths, - catalog_CatalogStatusFieldMaskSchema + database_DatabaseStatusFieldMaskSchema ); } -const catalogOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; +const endpointFieldMaskSchema: FieldMaskSchema = { + createTime: {wire: 'create_time'}, + name: {wire: 'name'}, + parent: {wire: 'parent'}, + spec: {wire: 'spec', children: () => endpointSpecFieldMaskSchema}, + status: {wire: 'status', children: () => endpointStatusFieldMaskSchema}, + uid: {wire: 'uid'}, + updateTime: {wire: 'update_time'}, +}; -export function catalogOperationMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - catalogOperationMetadataFieldMaskSchema - ); +export function endpointFieldMask(...paths: string[]): FieldMask { + return FieldMask.build(paths, endpointFieldMaskSchema); } -const computeInstanceFieldMaskSchema: FieldMaskSchema = { - computeHost: {wire: 'compute_host'}, - computeInstanceId: {wire: 'compute_instance_id'}, - currentState: {wire: 'current_state'}, - name: {wire: 'name'}, - pendingState: {wire: 'pending_state'}, - role: {wire: 'role'}, - startTime: {wire: 'start_time'}, - suspendTime: {wire: 'suspend_time'}, +const endpointGroupSpecFieldMaskSchema: FieldMaskSchema = { + enableReadableSecondaries: {wire: 'enable_readable_secondaries'}, + max: {wire: 'max'}, + min: {wire: 'min'}, }; -export function computeInstanceFieldMask( +export function endpointGroupSpecFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( +): FieldMask { + return FieldMask.build( paths, - computeInstanceFieldMaskSchema + endpointGroupSpecFieldMaskSchema ); } -const createBranchRequestFieldMaskSchema: FieldMaskSchema = { - branch: {wire: 'branch', children: () => branchFieldMaskSchema}, - branchId: {wire: 'branch_id'}, - parent: {wire: 'parent'}, +const endpointGroupStatusFieldMaskSchema: FieldMaskSchema = { + enableReadableSecondaries: {wire: 'enable_readable_secondaries'}, + max: {wire: 'max'}, + min: {wire: 'min'}, }; -export function createBranchRequestFieldMask( +export function endpointGroupStatusFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( +): FieldMask { + return FieldMask.build( paths, - createBranchRequestFieldMaskSchema + endpointGroupStatusFieldMaskSchema ); } -const createCatalogRequestFieldMaskSchema: FieldMaskSchema = { - catalog: {wire: 'catalog', children: () => catalogFieldMaskSchema}, - catalogId: {wire: 'catalog_id'}, -}; - -export function createCatalogRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createCatalogRequestFieldMaskSchema - ); -} - -const createDatabaseRequestFieldMaskSchema: FieldMaskSchema = { - database: {wire: 'database', children: () => databaseFieldMaskSchema}, - databaseId: {wire: 'database_id'}, - parent: {wire: 'parent'}, -}; - -export function createDatabaseRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createDatabaseRequestFieldMaskSchema - ); -} - -const createEndpointRequestFieldMaskSchema: FieldMaskSchema = { - endpoint: {wire: 'endpoint', children: () => endpointFieldMaskSchema}, - endpointId: {wire: 'endpoint_id'}, - parent: {wire: 'parent'}, -}; - -export function createEndpointRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createEndpointRequestFieldMaskSchema - ); -} - -const createProjectRequestFieldMaskSchema: FieldMaskSchema = { - project: {wire: 'project', children: () => projectFieldMaskSchema}, - projectId: {wire: 'project_id'}, -}; - -export function createProjectRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createProjectRequestFieldMaskSchema - ); -} - -const createRoleRequestFieldMaskSchema: FieldMaskSchema = { - parent: {wire: 'parent'}, - role: {wire: 'role', children: () => roleFieldMaskSchema}, - roleId: {wire: 'role_id'}, -}; - -export function createRoleRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createRoleRequestFieldMaskSchema - ); -} - -const createSyncedTableRequestFieldMaskSchema: FieldMaskSchema = { - syncedTable: { - wire: 'synced_table', - children: () => syncedTableFieldMaskSchema, - }, - syncedTableId: {wire: 'synced_table_id'}, -}; - -export function createSyncedTableRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createSyncedTableRequestFieldMaskSchema - ); -} - -const createTableRequestFieldMaskSchema: FieldMaskSchema = { - table: {wire: 'table', children: () => tableFieldMaskSchema}, -}; - -export function createTableRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createTableRequestFieldMaskSchema - ); -} - -const databaseFieldMaskSchema: FieldMaskSchema = { - createTime: {wire: 'create_time'}, - name: {wire: 'name'}, - parent: {wire: 'parent'}, - spec: {wire: 'spec', children: () => database_DatabaseSpecFieldMaskSchema}, - status: { - wire: 'status', - children: () => database_DatabaseStatusFieldMaskSchema, - }, - updateTime: {wire: 'update_time'}, -}; - -export function databaseFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, databaseFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const database_DatabaseSpecFieldMaskSchema: FieldMaskSchema = { - postgresDatabase: {wire: 'postgres_database'}, - role: {wire: 'role'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function database_DatabaseSpecFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - database_DatabaseSpecFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const database_DatabaseStatusFieldMaskSchema: FieldMaskSchema = { - databaseId: {wire: 'database_id'}, - postgresDatabase: {wire: 'postgres_database'}, - role: {wire: 'role'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function database_DatabaseStatusFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - database_DatabaseStatusFieldMaskSchema - ); -} - -const databaseCredentialFieldMaskSchema: FieldMaskSchema = { - expireTime: {wire: 'expire_time'}, - token: {wire: 'token'}, -}; - -export function databaseCredentialFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - databaseCredentialFieldMaskSchema - ); -} - -const databaseOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; - -export function databaseOperationMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - databaseOperationMetadataFieldMaskSchema - ); -} - -const databricksServiceExceptionWithDetailsProtoFieldMaskSchema: FieldMaskSchema = - { - details: {wire: 'details'}, - errorCode: {wire: 'error_code'}, - message: {wire: 'message'}, - stackTrace: {wire: 'stack_trace'}, - }; - -export function databricksServiceExceptionWithDetailsProtoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - databricksServiceExceptionWithDetailsProtoFieldMaskSchema - ); -} - -const deleteBranchRequestFieldMaskSchema: FieldMaskSchema = { - allowMissing: {wire: 'allow_missing'}, - name: {wire: 'name'}, - purge: {wire: 'purge'}, -}; - -export function deleteBranchRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteBranchRequestFieldMaskSchema - ); -} - -const deleteCatalogRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteCatalogRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteCatalogRequestFieldMaskSchema - ); -} - -const deleteDatabaseRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteDatabaseRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteDatabaseRequestFieldMaskSchema - ); -} - -const deleteEndpointRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteEndpointRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteEndpointRequestFieldMaskSchema - ); -} - -const deleteForwardEtlConfigurationRequestFieldMaskSchema: FieldMaskSchema = { - parent: {wire: 'parent'}, - pgDatabaseOid: {wire: 'pg_database_oid'}, - pgSchemaOid: {wire: 'pg_schema_oid'}, - tenantId: {wire: 'tenant_id'}, - timelineId: {wire: 'timeline_id'}, -}; - -export function deleteForwardEtlConfigurationRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteForwardEtlConfigurationRequestFieldMaskSchema - ); -} - -const deleteForwardEtlConfigurationResponseFieldMaskSchema: FieldMaskSchema = { - deletedConfigs: {wire: 'deleted_configs'}, - deletedMappings: {wire: 'deleted_mappings'}, -}; - -export function deleteForwardEtlConfigurationResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteForwardEtlConfigurationResponseFieldMaskSchema - ); -} - -const deleteProjectRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - purge: {wire: 'purge'}, -}; - -export function deleteProjectRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteProjectRequestFieldMaskSchema - ); -} - -const deleteRoleRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - reassignOwnedTo: {wire: 'reassign_owned_to'}, -}; - -export function deleteRoleRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteRoleRequestFieldMaskSchema - ); -} - -const deleteSyncedTableRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteSyncedTableRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteSyncedTableRequestFieldMaskSchema - ); -} - -const deleteTableRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteTableRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteTableRequestFieldMaskSchema - ); -} - -const deltaTableSyncInfoFieldMaskSchema: FieldMaskSchema = { - deltaCommitTime: {wire: 'delta_commit_time'}, - deltaCommitVersion: {wire: 'delta_commit_version'}, -}; - -export function deltaTableSyncInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deltaTableSyncInfoFieldMaskSchema - ); -} - -const disableForwardEtlRequestFieldMaskSchema: FieldMaskSchema = { - parent: {wire: 'parent'}, - pgDatabaseOid: {wire: 'pg_database_oid'}, - pgSchemaOid: {wire: 'pg_schema_oid'}, - tenantId: {wire: 'tenant_id'}, - timelineId: {wire: 'timeline_id'}, -}; - -export function disableForwardEtlRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - disableForwardEtlRequestFieldMaskSchema - ); -} - -const disableForwardEtlResponseFieldMaskSchema: FieldMaskSchema = { - disabled: {wire: 'disabled'}, -}; - -export function disableForwardEtlResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - disableForwardEtlResponseFieldMaskSchema - ); -} - -const endpointFieldMaskSchema: FieldMaskSchema = { - createTime: {wire: 'create_time'}, - name: {wire: 'name'}, - parent: {wire: 'parent'}, - spec: {wire: 'spec', children: () => endpointSpecFieldMaskSchema}, - status: {wire: 'status', children: () => endpointStatusFieldMaskSchema}, - uid: {wire: 'uid'}, - updateTime: {wire: 'update_time'}, -}; - -export function endpointFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, endpointFieldMaskSchema); -} - -const endpointGroupSpecFieldMaskSchema: FieldMaskSchema = { - enableReadableSecondaries: {wire: 'enable_readable_secondaries'}, - max: {wire: 'max'}, - min: {wire: 'min'}, -}; - -export function endpointGroupSpecFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - endpointGroupSpecFieldMaskSchema - ); -} - -const endpointGroupStatusFieldMaskSchema: FieldMaskSchema = { - enableReadableSecondaries: {wire: 'enable_readable_secondaries'}, - max: {wire: 'max'}, - min: {wire: 'min'}, -}; - -export function endpointGroupStatusFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - endpointGroupStatusFieldMaskSchema - ); -} - -const endpointHostsFieldMaskSchema: FieldMaskSchema = { - host: {wire: 'host'}, - readOnlyHost: {wire: 'read_only_host'}, - readOnlyPooledHost: {wire: 'read_only_pooled_host'}, - readWritePooledHost: {wire: 'read_write_pooled_host'}, -}; - -export function endpointHostsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, endpointHostsFieldMaskSchema); -} - -const endpointOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; - -export function endpointOperationMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - endpointOperationMetadataFieldMaskSchema - ); -} - -const endpointSettingsFieldMaskSchema: FieldMaskSchema = { - pgSettings: {wire: 'pg_settings'}, -}; - -export function endpointSettingsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - endpointSettingsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const endpointSettings_PgSettingsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function endpointSettings_PgSettingsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - endpointSettings_PgSettingsEntryFieldMaskSchema - ); -} - -const endpointSpecFieldMaskSchema: FieldMaskSchema = { - autoscalingLimitMaxCu: {wire: 'autoscaling_limit_max_cu'}, - autoscalingLimitMinCu: {wire: 'autoscaling_limit_min_cu'}, - disabled: {wire: 'disabled'}, - endpointType: {wire: 'endpoint_type'}, - group: {wire: 'group', children: () => endpointGroupSpecFieldMaskSchema}, - noSuspension: {wire: 'no_suspension'}, - settings: {wire: 'settings', children: () => endpointSettingsFieldMaskSchema}, - suspendTimeoutDuration: {wire: 'suspend_timeout_duration'}, -}; - -export function endpointSpecFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, endpointSpecFieldMaskSchema); -} - -const endpointStatusFieldMaskSchema: FieldMaskSchema = { - autoscalingLimitMaxCu: {wire: 'autoscaling_limit_max_cu'}, - autoscalingLimitMinCu: {wire: 'autoscaling_limit_min_cu'}, - currentState: {wire: 'current_state'}, - disabled: {wire: 'disabled'}, - endpointId: {wire: 'endpoint_id'}, - endpointType: {wire: 'endpoint_type'}, - group: {wire: 'group', children: () => endpointGroupStatusFieldMaskSchema}, - hosts: {wire: 'hosts', children: () => endpointHostsFieldMaskSchema}, - lastActiveTime: {wire: 'last_active_time'}, - pendingState: {wire: 'pending_state'}, - settings: {wire: 'settings', children: () => endpointSettingsFieldMaskSchema}, - suspendTimeoutDuration: {wire: 'suspend_timeout_duration'}, -}; - -export function endpointStatusFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, endpointStatusFieldMaskSchema); -} - -const forwardEtlConfigFieldMaskSchema: FieldMaskSchema = { - createTimeMillis: {wire: 'create_time_millis'}, - enabled: {wire: 'enabled'}, - pgDatabaseOid: {wire: 'pg_database_oid'}, - pgSchemaOid: {wire: 'pg_schema_oid'}, - tenantId: {wire: 'tenant_id'}, - timelineId: {wire: 'timeline_id'}, - ucCatalogId: {wire: 'uc_catalog_id'}, - ucSchemaId: {wire: 'uc_schema_id'}, - updateTimeMillis: {wire: 'update_time_millis'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function forwardEtlConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - forwardEtlConfigFieldMaskSchema - ); -} - -const forwardEtlDatabaseFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - oid: {wire: 'oid'}, -}; - -export function forwardEtlDatabaseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - forwardEtlDatabaseFieldMaskSchema - ); -} - -const forwardEtlMetadataFieldMaskSchema: FieldMaskSchema = { - databases: {wire: 'databases'}, - schemas: {wire: 'schemas'}, -}; - -export function forwardEtlMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - forwardEtlMetadataFieldMaskSchema - ); -} - -const forwardEtlSchemaFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - oid: {wire: 'oid'}, -}; - -export function forwardEtlSchemaFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - forwardEtlSchemaFieldMaskSchema - ); -} - -const forwardEtlStatusFieldMaskSchema: FieldMaskSchema = { - configurations: {wire: 'configurations'}, - tableMappings: {wire: 'table_mappings'}, -}; - -export function forwardEtlStatusFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - forwardEtlStatusFieldMaskSchema - ); -} - -const forwardEtlTableMappingFieldMaskSchema: FieldMaskSchema = { - enabled: {wire: 'enabled'}, - lastSyncedLsn: {wire: 'last_synced_lsn'}, - pgTableName: {wire: 'pg_table_name'}, - pgTableOid: {wire: 'pg_table_oid'}, - ucTableId: {wire: 'uc_table_id'}, - ucTableName: {wire: 'uc_table_name'}, -}; - -export function forwardEtlTableMappingFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - forwardEtlTableMappingFieldMaskSchema - ); -} - -const generateDatabaseCredentialRequestFieldMaskSchema: FieldMaskSchema = { - claims: {wire: 'claims'}, - endpoint: {wire: 'endpoint'}, - expireTime: {wire: 'expire_time'}, - groupName: {wire: 'group_name'}, - ttl: {wire: 'ttl'}, -}; - -export function generateDatabaseCredentialRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - generateDatabaseCredentialRequestFieldMaskSchema - ); -} - -const getBranchRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getBranchRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getBranchRequestFieldMaskSchema - ); -} - -const getCatalogRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getCatalogRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getCatalogRequestFieldMaskSchema - ); -} - -const getComputeInstanceRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getComputeInstanceRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getComputeInstanceRequestFieldMaskSchema - ); -} - -const getDatabaseRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getDatabaseRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getDatabaseRequestFieldMaskSchema - ); -} - -const getEndpointRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getEndpointRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getEndpointRequestFieldMaskSchema - ); -} - -const getForwardEtlMetadataRequestFieldMaskSchema: FieldMaskSchema = { - parent: {wire: 'parent'}, - tenantId: {wire: 'tenant_id'}, - timelineId: {wire: 'timeline_id'}, -}; - -export function getForwardEtlMetadataRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getForwardEtlMetadataRequestFieldMaskSchema - ); -} - -const getForwardEtlStatusRequestFieldMaskSchema: FieldMaskSchema = { - parent: {wire: 'parent'}, - tenantId: {wire: 'tenant_id'}, - timelineId: {wire: 'timeline_id'}, -}; - -export function getForwardEtlStatusRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getForwardEtlStatusRequestFieldMaskSchema - ); -} - -const getOperationRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getOperationRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getOperationRequestFieldMaskSchema - ); -} - -const getProjectRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getProjectRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getProjectRequestFieldMaskSchema - ); -} - -const getRoleRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getRoleRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, getRoleRequestFieldMaskSchema); -} - -const getSyncedTableRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getSyncedTableRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getSyncedTableRequestFieldMaskSchema - ); -} - -const getTableRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getTableRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getTableRequestFieldMaskSchema - ); -} - -const initialEndpointSpecFieldMaskSchema: FieldMaskSchema = { - group: {wire: 'group', children: () => endpointGroupSpecFieldMaskSchema}, -}; - -export function initialEndpointSpecFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - initialEndpointSpecFieldMaskSchema - ); -} - -const listBranchesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - parent: {wire: 'parent'}, - showDeleted: {wire: 'show_deleted'}, -}; - -export function listBranchesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listBranchesRequestFieldMaskSchema - ); -} - -const listBranchesResponseFieldMaskSchema: FieldMaskSchema = { - branches: {wire: 'branches'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listBranchesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listBranchesResponseFieldMaskSchema - ); -} - -const listComputeInstancesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - parent: {wire: 'parent'}, -}; - -export function listComputeInstancesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listComputeInstancesRequestFieldMaskSchema - ); -} - -const listComputeInstancesResponseFieldMaskSchema: FieldMaskSchema = { - computeInstances: {wire: 'compute_instances'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listComputeInstancesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listComputeInstancesResponseFieldMaskSchema - ); -} - -const listDatabasesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - parent: {wire: 'parent'}, -}; - -export function listDatabasesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listDatabasesRequestFieldMaskSchema - ); -} - -const listDatabasesResponseFieldMaskSchema: FieldMaskSchema = { - databases: {wire: 'databases'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listDatabasesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listDatabasesResponseFieldMaskSchema - ); -} - -const listEndpointsRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - parent: {wire: 'parent'}, -}; - -export function listEndpointsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listEndpointsRequestFieldMaskSchema - ); -} - -const listEndpointsResponseFieldMaskSchema: FieldMaskSchema = { - endpoints: {wire: 'endpoints'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listEndpointsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listEndpointsResponseFieldMaskSchema - ); -} - -const listProjectsRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - showDeleted: {wire: 'show_deleted'}, +const endpointHostsFieldMaskSchema: FieldMaskSchema = { + host: {wire: 'host'}, + readOnlyHost: {wire: 'read_only_host'}, + readOnlyPooledHost: {wire: 'read_only_pooled_host'}, + readWritePooledHost: {wire: 'read_write_pooled_host'}, }; -export function listProjectsRequestFieldMask( +export function endpointHostsFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listProjectsRequestFieldMaskSchema - ); +): FieldMask { + return FieldMask.build(paths, endpointHostsFieldMaskSchema); } -const listProjectsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - projects: {wire: 'projects'}, +const endpointSettingsFieldMaskSchema: FieldMaskSchema = { + pgSettings: {wire: 'pg_settings'}, }; -export function listProjectsResponseFieldMask( +export function endpointSettingsFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( +): FieldMask { + return FieldMask.build( paths, - listProjectsResponseFieldMaskSchema + endpointSettingsFieldMaskSchema ); } -const listRolesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - parent: {wire: 'parent'}, +const endpointSpecFieldMaskSchema: FieldMaskSchema = { + autoscalingLimitMaxCu: {wire: 'autoscaling_limit_max_cu'}, + autoscalingLimitMinCu: {wire: 'autoscaling_limit_min_cu'}, + disabled: {wire: 'disabled'}, + endpointType: {wire: 'endpoint_type'}, + group: {wire: 'group', children: () => endpointGroupSpecFieldMaskSchema}, + noSuspension: {wire: 'no_suspension'}, + settings: {wire: 'settings', children: () => endpointSettingsFieldMaskSchema}, + suspendTimeoutDuration: {wire: 'suspend_timeout_duration'}, }; -export function listRolesRequestFieldMask( +export function endpointSpecFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listRolesRequestFieldMaskSchema - ); +): FieldMask { + return FieldMask.build(paths, endpointSpecFieldMaskSchema); } -const listRolesResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - roles: {wire: 'roles'}, +const endpointStatusFieldMaskSchema: FieldMaskSchema = { + autoscalingLimitMaxCu: {wire: 'autoscaling_limit_max_cu'}, + autoscalingLimitMinCu: {wire: 'autoscaling_limit_min_cu'}, + currentState: {wire: 'current_state'}, + disabled: {wire: 'disabled'}, + endpointId: {wire: 'endpoint_id'}, + endpointType: {wire: 'endpoint_type'}, + group: {wire: 'group', children: () => endpointGroupStatusFieldMaskSchema}, + hosts: {wire: 'hosts', children: () => endpointHostsFieldMaskSchema}, + lastActiveTime: {wire: 'last_active_time'}, + pendingState: {wire: 'pending_state'}, + settings: {wire: 'settings', children: () => endpointSettingsFieldMaskSchema}, + suspendTimeoutDuration: {wire: 'suspend_timeout_duration'}, }; -export function listRolesResponseFieldMask( +export function endpointStatusFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listRolesResponseFieldMaskSchema - ); +): FieldMask { + return FieldMask.build(paths, endpointStatusFieldMaskSchema); } -const newPipelineSpecFieldMaskSchema: FieldMaskSchema = { - budgetPolicyId: {wire: 'budget_policy_id'}, - pipelineChannel: {wire: 'pipeline_channel'}, - storageCatalog: {wire: 'storage_catalog'}, - storageSchema: {wire: 'storage_schema'}, +const initialEndpointSpecFieldMaskSchema: FieldMaskSchema = { + group: {wire: 'group', children: () => endpointGroupSpecFieldMaskSchema}, }; -export function newPipelineSpecFieldMask( +export function initialEndpointSpecFieldMask( ...paths: string[] -): FieldMask { - return FieldMask.build( +): FieldMask { + return FieldMask.build( paths, - newPipelineSpecFieldMaskSchema + initialEndpointSpecFieldMaskSchema ); } -const operationFieldMaskSchema: FieldMaskSchema = { - done: {wire: 'done'}, - error: { - wire: 'error', - children: () => databricksServiceExceptionWithDetailsProtoFieldMaskSchema, - }, - metadata: {wire: 'metadata'}, - name: {wire: 'name'}, - response: {wire: 'response'}, -}; - -export function operationFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, operationFieldMaskSchema); -} - const projectFieldMaskSchema: FieldMaskSchema = { createTime: {wire: 'create_time'}, deleteTime: {wire: 'delete_time'}, @@ -5665,34 +4403,6 @@ export function projectDefaultEndpointSettingsFieldMask( ); } -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const projectDefaultEndpointSettings_PgSettingsEntryFieldMaskSchema: FieldMaskSchema = - { - key: {wire: 'key'}, - value: {wire: 'value'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function projectDefaultEndpointSettings_PgSettingsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - projectDefaultEndpointSettings_PgSettingsEntryFieldMaskSchema - ); -} - -const projectOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; - -export function projectOperationMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - projectOperationMetadataFieldMaskSchema - ); -} - const projectSpecFieldMaskSchema: FieldMaskSchema = { budgetPolicyId: {wire: 'budget_policy_id'}, customTags: {wire: 'custom_tags'}, @@ -5739,45 +4449,6 @@ export function projectStatusFieldMask( return FieldMask.build(paths, projectStatusFieldMaskSchema); } -const provisioningInfoFieldMaskSchema: FieldMaskSchema = {}; - -export function provisioningInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - provisioningInfoFieldMaskSchema - ); -} - -const requestedClaimsFieldMaskSchema: FieldMaskSchema = { - permissionSet: {wire: 'permission_set'}, - resources: {wire: 'resources'}, -}; - -export function requestedClaimsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - requestedClaimsFieldMaskSchema - ); -} - -const requestedResourceFieldMaskSchema: FieldMaskSchema = { - tableName: {wire: 'table_name'}, - unspecifiedResourceName: {wire: 'unspecified_resource_name'}, -}; - -export function requestedResourceFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - requestedResourceFieldMaskSchema - ); -} - const roleFieldMaskSchema: FieldMaskSchema = { createTime: {wire: 'create_time'}, name: {wire: 'name'}, @@ -5849,247 +4520,3 @@ export function role_RoleStatusFieldMask( role_RoleStatusFieldMaskSchema ); } - -const roleOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; - -export function roleOperationMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - roleOperationMetadataFieldMaskSchema - ); -} - -const syncedTableFieldMaskSchema: FieldMaskSchema = { - createTime: {wire: 'create_time'}, - name: {wire: 'name'}, - spec: { - wire: 'spec', - children: () => syncedTable_SyncedTableSpecFieldMaskSchema, - }, - status: { - wire: 'status', - children: () => syncedTable_SyncedTableStatusFieldMaskSchema, - }, - uid: {wire: 'uid'}, -}; - -export function syncedTableFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, syncedTableFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const syncedTable_SyncedTableSpecFieldMaskSchema: FieldMaskSchema = { - acceleratedSync: {wire: 'accelerated_sync'}, - branch: {wire: 'branch'}, - createDatabaseObjectsIfMissing: {wire: 'create_database_objects_if_missing'}, - existingPipelineId: {wire: 'existing_pipeline_id'}, - newPipelineSpec: { - wire: 'new_pipeline_spec', - children: () => newPipelineSpecFieldMaskSchema, - }, - postgresDatabase: {wire: 'postgres_database'}, - primaryKeyColumns: {wire: 'primary_key_columns'}, - schedulingPolicy: {wire: 'scheduling_policy'}, - sourceTableFullName: {wire: 'source_table_full_name'}, - timeseriesKey: {wire: 'timeseries_key'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function syncedTable_SyncedTableSpecFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - syncedTable_SyncedTableSpecFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const syncedTable_SyncedTableStatusFieldMaskSchema: FieldMaskSchema = { - detailedState: {wire: 'detailed_state'}, - lastProcessedCommitVersion: {wire: 'last_processed_commit_version'}, - lastSync: { - wire: 'last_sync', - children: () => syncedTablePositionFieldMaskSchema, - }, - lastSyncTime: {wire: 'last_sync_time'}, - message: {wire: 'message'}, - ongoingSyncProgress: { - wire: 'ongoing_sync_progress', - children: () => syncedTablePipelineProgressFieldMaskSchema, - }, - pipelineId: {wire: 'pipeline_id'}, - project: {wire: 'project'}, - provisioningPhase: {wire: 'provisioning_phase'}, - unityCatalogProvisioningState: {wire: 'unity_catalog_provisioning_state'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function syncedTable_SyncedTableStatusFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - syncedTable_SyncedTableStatusFieldMaskSchema - ); -} - -const syncedTableOperationMetadataFieldMaskSchema: FieldMaskSchema = {}; - -export function syncedTableOperationMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - syncedTableOperationMetadataFieldMaskSchema - ); -} - -const syncedTablePipelineProgressFieldMaskSchema: FieldMaskSchema = { - estimatedCompletionTimeSeconds: {wire: 'estimated_completion_time_seconds'}, - latestVersionCurrentlyProcessing: { - wire: 'latest_version_currently_processing', - }, - syncProgressCompletion: {wire: 'sync_progress_completion'}, - syncedRowCount: {wire: 'synced_row_count'}, - totalRowCount: {wire: 'total_row_count'}, -}; - -export function syncedTablePipelineProgressFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - syncedTablePipelineProgressFieldMaskSchema - ); -} - -const syncedTablePositionFieldMaskSchema: FieldMaskSchema = { - deltaTableSyncInfo: { - wire: 'delta_table_sync_info', - children: () => deltaTableSyncInfoFieldMaskSchema, - }, - syncEndTime: {wire: 'sync_end_time'}, - syncStartTime: {wire: 'sync_start_time'}, -}; - -export function syncedTablePositionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - syncedTablePositionFieldMaskSchema - ); -} - -const tableFieldMaskSchema: FieldMaskSchema = { - branch: {wire: 'branch'}, - database: {wire: 'database'}, - name: {wire: 'name'}, - project: {wire: 'project'}, - tableServingUrl: {wire: 'table_serving_url'}, -}; - -export function tableFieldMask(...paths: string[]): FieldMask
    { - return FieldMask.build
    (paths, tableFieldMaskSchema); -} - -const undeleteBranchRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function undeleteBranchRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - undeleteBranchRequestFieldMaskSchema - ); -} - -const undeleteProjectRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function undeleteProjectRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - undeleteProjectRequestFieldMaskSchema - ); -} - -const updateBranchRequestFieldMaskSchema: FieldMaskSchema = { - branch: {wire: 'branch', children: () => branchFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateBranchRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateBranchRequestFieldMaskSchema - ); -} - -const updateDatabaseRequestFieldMaskSchema: FieldMaskSchema = { - database: {wire: 'database', children: () => databaseFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateDatabaseRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateDatabaseRequestFieldMaskSchema - ); -} - -const updateEndpointRequestFieldMaskSchema: FieldMaskSchema = { - endpoint: {wire: 'endpoint', children: () => endpointFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateEndpointRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateEndpointRequestFieldMaskSchema - ); -} - -const updateProjectRequestFieldMaskSchema: FieldMaskSchema = { - project: {wire: 'project', children: () => projectFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateProjectRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateProjectRequestFieldMaskSchema - ); -} - -const updateRoleRequestFieldMaskSchema: FieldMaskSchema = { - role: {wire: 'role', children: () => roleFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateRoleRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateRoleRequestFieldMaskSchema - ); -} diff --git a/packages/qualitymonitor/src/v2/model.ts b/packages/qualitymonitor/src/v2/model.ts index 53c51b73..56f70048 100644 --- a/packages/qualitymonitor/src/v2/model.ts +++ b/packages/qualitymonitor/src/v2/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum AnomalyDetectionJobType { @@ -382,18 +380,6 @@ export const marshalCustomScalarCheckSchema: z.ZodType = z thresholds: d.thresholds, })); -export const marshalListQualityMonitorResponseSchema: z.ZodType = z - .object({ - qualityMonitors: z - .array(z.lazy(() => marshalQualityMonitorSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - quality_monitors: d.qualityMonitors, - next_page_token: d.nextPageToken, - })); - export const marshalPercentNullValidityCheckSchema: z.ZodType = z .object({ columnNames: z.array(z.string()).optional(), @@ -471,263 +457,3 @@ export const marshalValidityCheckConfigurationSchema: z.ZodType = z range_validity_check: d.rangeValidityCheck, uniqueness_validity_check: d.uniquenessValidityCheck, })); - -const anomalyDetectionConfigFieldMaskSchema: FieldMaskSchema = { - customCheckConfigurations: {wire: 'custom_check_configurations'}, - excludedTableFullNames: {wire: 'excluded_table_full_names'}, - jobType: {wire: 'job_type'}, - lastRunId: {wire: 'last_run_id'}, - latestRunStatus: {wire: 'latest_run_status'}, - validityCheckConfigurations: {wire: 'validity_check_configurations'}, -}; - -export function anomalyDetectionConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - anomalyDetectionConfigFieldMaskSchema - ); -} - -const columnMatcherFieldMaskSchema: FieldMaskSchema = { - columnNames: {wire: 'column_names'}, - variableName: {wire: 'variable_name'}, -}; - -export function columnMatcherFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, columnMatcherFieldMaskSchema); -} - -const createQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { - qualityMonitor: { - wire: 'quality_monitor', - children: () => qualityMonitorFieldMaskSchema, - }, -}; - -export function createQualityMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createQualityMonitorRequestFieldMaskSchema - ); -} - -const customCheckConfigurationFieldMaskSchema: FieldMaskSchema = { - scalarCheck: { - wire: 'scalar_check', - children: () => customScalarCheckFieldMaskSchema, - }, -}; - -export function customCheckConfigurationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - customCheckConfigurationFieldMaskSchema - ); -} - -const customCheckThresholdsFieldMaskSchema: FieldMaskSchema = { - lowerBound: {wire: 'lower_bound', children: () => thresholdFieldMaskSchema}, - upperBound: {wire: 'upper_bound', children: () => thresholdFieldMaskSchema}, -}; - -export function customCheckThresholdsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - customCheckThresholdsFieldMaskSchema - ); -} - -const customScalarCheckFieldMaskSchema: FieldMaskSchema = { - checkName: {wire: 'check_name'}, - columnMatchers: {wire: 'column_matchers'}, - sqlQuery: {wire: 'sql_query'}, - thresholds: { - wire: 'thresholds', - children: () => customCheckThresholdsFieldMaskSchema, - }, -}; - -export function customScalarCheckFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - customScalarCheckFieldMaskSchema - ); -} - -const deleteQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, -}; - -export function deleteQualityMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteQualityMonitorRequestFieldMaskSchema - ); -} - -const getQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, -}; - -export function getQualityMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getQualityMonitorRequestFieldMaskSchema - ); -} - -const listQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listQualityMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listQualityMonitorRequestFieldMaskSchema - ); -} - -const listQualityMonitorResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - qualityMonitors: {wire: 'quality_monitors'}, -}; - -export function listQualityMonitorResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listQualityMonitorResponseFieldMaskSchema - ); -} - -const percentNullValidityCheckFieldMaskSchema: FieldMaskSchema = { - columnNames: {wire: 'column_names'}, - upperBound: {wire: 'upper_bound'}, -}; - -export function percentNullValidityCheckFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - percentNullValidityCheckFieldMaskSchema - ); -} - -const qualityMonitorFieldMaskSchema: FieldMaskSchema = { - anomalyDetectionConfig: { - wire: 'anomaly_detection_config', - children: () => anomalyDetectionConfigFieldMaskSchema, - }, - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, - validityCheckConfigurations: {wire: 'validity_check_configurations'}, -}; - -export function qualityMonitorFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, qualityMonitorFieldMaskSchema); -} - -const rangeValidityCheckFieldMaskSchema: FieldMaskSchema = { - columnNames: {wire: 'column_names'}, - lowerBound: {wire: 'lower_bound'}, - upperBound: {wire: 'upper_bound'}, -}; - -export function rangeValidityCheckFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - rangeValidityCheckFieldMaskSchema - ); -} - -const thresholdFieldMaskSchema: FieldMaskSchema = { - boundValue: {wire: 'bound_value'}, - thresholdType: {wire: 'threshold_type'}, -}; - -export function thresholdFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, thresholdFieldMaskSchema); -} - -const uniquenessValidityCheckFieldMaskSchema: FieldMaskSchema = { - columnNames: {wire: 'column_names'}, -}; - -export function uniquenessValidityCheckFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - uniquenessValidityCheckFieldMaskSchema - ); -} - -const updateQualityMonitorRequestFieldMaskSchema: FieldMaskSchema = { - objectId: {wire: 'object_id'}, - objectType: {wire: 'object_type'}, - qualityMonitor: { - wire: 'quality_monitor', - children: () => qualityMonitorFieldMaskSchema, - }, -}; - -export function updateQualityMonitorRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateQualityMonitorRequestFieldMaskSchema - ); -} - -const validityCheckConfigurationFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - percentNullValidityCheck: { - wire: 'percent_null_validity_check', - children: () => percentNullValidityCheckFieldMaskSchema, - }, - rangeValidityCheck: { - wire: 'range_validity_check', - children: () => rangeValidityCheckFieldMaskSchema, - }, - uniquenessValidityCheck: { - wire: 'uniqueness_validity_check', - children: () => uniquenessValidityCheckFieldMaskSchema, - }, -}; - -export function validityCheckConfigurationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - validityCheckConfigurationFieldMaskSchema - ); -} diff --git a/packages/qualitymonitors/src/v1/model.ts b/packages/qualitymonitors/src/v1/model.ts index b0b92d6d..c84a1a76 100644 --- a/packages/qualitymonitors/src/v1/model.ts +++ b/packages/qualitymonitors/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** @@ -463,76 +461,10 @@ export interface UpdateMonitor { monitorVersion?: number | undefined; } -export const unmarshalCancelRefreshSchema: z.ZodType = z - .object({ - full_table_name_arg: z.string().optional(), - refresh_id: z.number().optional(), - }) - .transform(d => ({ - fullTableNameArg: d.full_table_name_arg, - refreshId: d.refresh_id, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCancelRefresh_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalCreateMonitorSchema: z.ZodType = z - .object({ - full_table_name_arg: z.string().optional(), - skip_builtin_dashboard: z.boolean().optional(), - warehouse_id: z.string().optional(), - output_schema_name: z.string().optional(), - assets_dir: z.string().optional(), - inference_log: z - .lazy(() => unmarshalInferenceLogAnalysisConfigSchema) - .optional(), - time_series: z - .lazy(() => unmarshalTimeSeriesAnalysisConfigSchema) - .optional(), - snapshot: z.lazy(() => unmarshalSnapshotAnalysisConfigSchema).optional(), - slicing_exprs: z.array(z.string()).optional(), - custom_metrics: z - .array(z.lazy(() => unmarshalCustomMetricSchema)) - .optional(), - baseline_table_name: z.string().optional(), - schedule: z.lazy(() => unmarshalMonitorCronScheduleSchema).optional(), - notifications: z.lazy(() => unmarshalNotificationsSchema).optional(), - data_classification_config: z - .lazy(() => unmarshalDataClassificationConfigSchema) - .optional(), - table_name: z.string().optional(), - status: z.enum(MonitorStatus).optional(), - latest_monitor_failure_msg: z.string().optional(), - profile_metrics_table_name: z.string().optional(), - drift_metrics_table_name: z.string().optional(), - dashboard_id: z.string().optional(), - monitor_version: z.number().optional(), - }) - .transform(d => ({ - fullTableNameArg: d.full_table_name_arg, - skipBuiltinDashboard: d.skip_builtin_dashboard, - warehouseId: d.warehouse_id, - outputSchemaName: d.output_schema_name, - assetsDir: d.assets_dir, - inferenceLog: d.inference_log, - timeSeries: d.time_series, - snapshot: d.snapshot, - slicingExprs: d.slicing_exprs, - customMetrics: d.custom_metrics, - baselineTableName: d.baseline_table_name, - schedule: d.schedule, - notifications: d.notifications, - dataClassificationConfig: d.data_classification_config, - tableName: d.table_name, - status: d.status, - latestMonitorFailureMsg: d.latest_monitor_failure_msg, - profileMetricsTableName: d.profile_metrics_table_name, - driftMetricsTableName: d.drift_metrics_table_name, - dashboardId: d.dashboard_id, - monitorVersion: d.monitor_version, - })); - export const unmarshalCustomMetricSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -694,17 +626,6 @@ export const unmarshalRefreshInfoSchema: z.ZodType = z trigger: d.trigger, })); -export const unmarshalRegenerateDashboardSchema: z.ZodType = - z - .object({ - full_table_name_arg: z.string().optional(), - warehouse_id: z.string().optional(), - }) - .transform(d => ({ - fullTableNameArg: d.full_table_name_arg, - warehouseId: d.warehouse_id, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalRegenerateDashboard_ResponseSchema: z.ZodType = z @@ -717,14 +638,6 @@ export const unmarshalRegenerateDashboard_ResponseSchema: z.ZodType = z - .object({ - full_table_name_arg: z.string().optional(), - }) - .transform(d => ({ - fullTableNameArg: d.full_table_name_arg, - })); - export const unmarshalSnapshotAnalysisConfigSchema: z.ZodType = z.object({}); @@ -739,58 +652,6 @@ export const unmarshalTimeSeriesAnalysisConfigSchema: z.ZodType = z - .object({ - full_table_name_arg: z.string().optional(), - output_schema_name: z.string().optional(), - assets_dir: z.string().optional(), - inference_log: z - .lazy(() => unmarshalInferenceLogAnalysisConfigSchema) - .optional(), - time_series: z - .lazy(() => unmarshalTimeSeriesAnalysisConfigSchema) - .optional(), - snapshot: z.lazy(() => unmarshalSnapshotAnalysisConfigSchema).optional(), - slicing_exprs: z.array(z.string()).optional(), - custom_metrics: z - .array(z.lazy(() => unmarshalCustomMetricSchema)) - .optional(), - baseline_table_name: z.string().optional(), - schedule: z.lazy(() => unmarshalMonitorCronScheduleSchema).optional(), - notifications: z.lazy(() => unmarshalNotificationsSchema).optional(), - data_classification_config: z - .lazy(() => unmarshalDataClassificationConfigSchema) - .optional(), - table_name: z.string().optional(), - status: z.enum(MonitorStatus).optional(), - latest_monitor_failure_msg: z.string().optional(), - profile_metrics_table_name: z.string().optional(), - drift_metrics_table_name: z.string().optional(), - dashboard_id: z.string().optional(), - monitor_version: z.number().optional(), - }) - .transform(d => ({ - fullTableNameArg: d.full_table_name_arg, - outputSchemaName: d.output_schema_name, - assetsDir: d.assets_dir, - inferenceLog: d.inference_log, - timeSeries: d.time_series, - snapshot: d.snapshot, - slicingExprs: d.slicing_exprs, - customMetrics: d.custom_metrics, - baselineTableName: d.baseline_table_name, - schedule: d.schedule, - notifications: d.notifications, - dataClassificationConfig: d.data_classification_config, - tableName: d.table_name, - status: d.status, - latestMonitorFailureMsg: d.latest_monitor_failure_msg, - profileMetricsTableName: d.profile_metrics_table_name, - driftMetricsTableName: d.drift_metrics_table_name, - dashboardId: d.dashboard_id, - monitorVersion: d.monitor_version, - })); - export const marshalCancelRefreshSchema: z.ZodType = z .object({ fullTableNameArg: z.string().optional(), @@ -801,9 +662,6 @@ export const marshalCancelRefreshSchema: z.ZodType = z refresh_id: d.refreshId, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCancelRefresh_ResponseSchema: z.ZodType = z.object({}); - export const marshalCreateMonitorSchema: z.ZodType = z .object({ fullTableNameArg: z.string().optional(), @@ -880,55 +738,6 @@ export const marshalDataClassificationConfigSchema: z.ZodType = z enabled: d.enabled, })); -export const marshalDataMonitorInfoSchema: z.ZodType = z - .object({ - outputSchemaName: z.string().optional(), - assetsDir: z.string().optional(), - inferenceLog: z - .lazy(() => marshalInferenceLogAnalysisConfigSchema) - .optional(), - timeSeries: z.lazy(() => marshalTimeSeriesAnalysisConfigSchema).optional(), - snapshot: z.lazy(() => marshalSnapshotAnalysisConfigSchema).optional(), - slicingExprs: z.array(z.string()).optional(), - customMetrics: z.array(z.lazy(() => marshalCustomMetricSchema)).optional(), - baselineTableName: z.string().optional(), - schedule: z.lazy(() => marshalMonitorCronScheduleSchema).optional(), - notifications: z.lazy(() => marshalNotificationsSchema).optional(), - dataClassificationConfig: z - .lazy(() => marshalDataClassificationConfigSchema) - .optional(), - tableName: z.string().optional(), - status: z.enum(MonitorStatus).optional(), - latestMonitorFailureMsg: z.string().optional(), - profileMetricsTableName: z.string().optional(), - driftMetricsTableName: z.string().optional(), - dashboardId: z.string().optional(), - monitorVersion: z.number().optional(), - }) - .transform(d => ({ - output_schema_name: d.outputSchemaName, - assets_dir: d.assetsDir, - inference_log: d.inferenceLog, - time_series: d.timeSeries, - snapshot: d.snapshot, - slicing_exprs: d.slicingExprs, - custom_metrics: d.customMetrics, - baseline_table_name: d.baselineTableName, - schedule: d.schedule, - notifications: d.notifications, - data_classification_config: d.dataClassificationConfig, - table_name: d.tableName, - status: d.status, - latest_monitor_failure_msg: d.latestMonitorFailureMsg, - profile_metrics_table_name: d.profileMetricsTableName, - drift_metrics_table_name: d.driftMetricsTableName, - dashboard_id: d.dashboardId, - monitor_version: d.monitorVersion, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteMonitor_ResponseSchema: z.ZodType = z.object({}); - export const marshalDestinationSchema: z.ZodType = z .object({ emailAddresses: z.array(z.string()).optional(), @@ -957,15 +766,6 @@ export const marshalInferenceLogAnalysisConfigSchema: z.ZodType = z prediction_proba_col: d.predictionProbaCol, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListRefreshes_ResponseSchema: z.ZodType = z - .object({ - refreshes: z.array(z.lazy(() => marshalRefreshInfoSchema)).optional(), - }) - .transform(d => ({ - refreshes: d.refreshes, - })); - export const marshalMonitorCronScheduleSchema: z.ZodType = z .object({ quartzCronExpression: z.string().optional(), @@ -990,24 +790,6 @@ export const marshalNotificationsSchema: z.ZodType = z on_new_classification_tag_detected: d.onNewClassificationTagDetected, })); -export const marshalRefreshInfoSchema: z.ZodType = z - .object({ - refreshId: z.number().optional(), - state: z.enum(RefreshState).optional(), - message: z.string().optional(), - startTimeMs: z.number().optional(), - endTimeMs: z.number().optional(), - trigger: z.enum(RefreshTrigger).optional(), - }) - .transform(d => ({ - refresh_id: d.refreshId, - state: d.state, - message: d.message, - start_time_ms: d.startTimeMs, - end_time_ms: d.endTimeMs, - trigger: d.trigger, - })); - export const marshalRegenerateDashboardSchema: z.ZodType = z .object({ fullTableNameArg: z.string().optional(), @@ -1018,17 +800,6 @@ export const marshalRegenerateDashboardSchema: z.ZodType = z warehouse_id: d.warehouseId, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalRegenerateDashboard_ResponseSchema: z.ZodType = z - .object({ - dashboardId: z.string().optional(), - parentFolder: z.string().optional(), - }) - .transform(d => ({ - dashboard_id: d.dashboardId, - parent_folder: d.parentFolder, - })); - export const marshalRunRefreshSchema: z.ZodType = z .object({ fullTableNameArg: z.string().optional(), @@ -1096,397 +867,3 @@ export const marshalUpdateMonitorSchema: z.ZodType = z dashboard_id: d.dashboardId, monitor_version: d.monitorVersion, })); - -const cancelRefreshFieldMaskSchema: FieldMaskSchema = { - fullTableNameArg: {wire: 'full_table_name_arg'}, - refreshId: {wire: 'refresh_id'}, -}; - -export function cancelRefreshFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, cancelRefreshFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const cancelRefresh_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function cancelRefresh_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - cancelRefresh_ResponseFieldMaskSchema - ); -} - -const createMonitorFieldMaskSchema: FieldMaskSchema = { - assetsDir: {wire: 'assets_dir'}, - baselineTableName: {wire: 'baseline_table_name'}, - customMetrics: {wire: 'custom_metrics'}, - dashboardId: {wire: 'dashboard_id'}, - dataClassificationConfig: { - wire: 'data_classification_config', - children: () => dataClassificationConfigFieldMaskSchema, - }, - driftMetricsTableName: {wire: 'drift_metrics_table_name'}, - fullTableNameArg: {wire: 'full_table_name_arg'}, - inferenceLog: { - wire: 'inference_log', - children: () => inferenceLogAnalysisConfigFieldMaskSchema, - }, - latestMonitorFailureMsg: {wire: 'latest_monitor_failure_msg'}, - monitorVersion: {wire: 'monitor_version'}, - notifications: { - wire: 'notifications', - children: () => notificationsFieldMaskSchema, - }, - outputSchemaName: {wire: 'output_schema_name'}, - profileMetricsTableName: {wire: 'profile_metrics_table_name'}, - schedule: { - wire: 'schedule', - children: () => monitorCronScheduleFieldMaskSchema, - }, - skipBuiltinDashboard: {wire: 'skip_builtin_dashboard'}, - slicingExprs: {wire: 'slicing_exprs'}, - snapshot: { - wire: 'snapshot', - children: () => snapshotAnalysisConfigFieldMaskSchema, - }, - status: {wire: 'status'}, - tableName: {wire: 'table_name'}, - timeSeries: { - wire: 'time_series', - children: () => timeSeriesAnalysisConfigFieldMaskSchema, - }, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function createMonitorFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createMonitorFieldMaskSchema); -} - -const customMetricFieldMaskSchema: FieldMaskSchema = { - definition: {wire: 'definition'}, - inputColumns: {wire: 'input_columns'}, - name: {wire: 'name'}, - outputDataType: {wire: 'output_data_type'}, - type: {wire: 'type'}, -}; - -export function customMetricFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, customMetricFieldMaskSchema); -} - -const dataClassificationConfigFieldMaskSchema: FieldMaskSchema = { - enabled: {wire: 'enabled'}, -}; - -export function dataClassificationConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - dataClassificationConfigFieldMaskSchema - ); -} - -const dataMonitorInfoFieldMaskSchema: FieldMaskSchema = { - assetsDir: {wire: 'assets_dir'}, - baselineTableName: {wire: 'baseline_table_name'}, - customMetrics: {wire: 'custom_metrics'}, - dashboardId: {wire: 'dashboard_id'}, - dataClassificationConfig: { - wire: 'data_classification_config', - children: () => dataClassificationConfigFieldMaskSchema, - }, - driftMetricsTableName: {wire: 'drift_metrics_table_name'}, - inferenceLog: { - wire: 'inference_log', - children: () => inferenceLogAnalysisConfigFieldMaskSchema, - }, - latestMonitorFailureMsg: {wire: 'latest_monitor_failure_msg'}, - monitorVersion: {wire: 'monitor_version'}, - notifications: { - wire: 'notifications', - children: () => notificationsFieldMaskSchema, - }, - outputSchemaName: {wire: 'output_schema_name'}, - profileMetricsTableName: {wire: 'profile_metrics_table_name'}, - schedule: { - wire: 'schedule', - children: () => monitorCronScheduleFieldMaskSchema, - }, - slicingExprs: {wire: 'slicing_exprs'}, - snapshot: { - wire: 'snapshot', - children: () => snapshotAnalysisConfigFieldMaskSchema, - }, - status: {wire: 'status'}, - tableName: {wire: 'table_name'}, - timeSeries: { - wire: 'time_series', - children: () => timeSeriesAnalysisConfigFieldMaskSchema, - }, -}; - -export function dataMonitorInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - dataMonitorInfoFieldMaskSchema - ); -} - -const deleteMonitorFieldMaskSchema: FieldMaskSchema = { - fullTableNameArg: {wire: 'full_table_name_arg'}, -}; - -export function deleteMonitorFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deleteMonitorFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteMonitor_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteMonitor_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteMonitor_ResponseFieldMaskSchema - ); -} - -const destinationFieldMaskSchema: FieldMaskSchema = { - emailAddresses: {wire: 'email_addresses'}, -}; - -export function destinationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, destinationFieldMaskSchema); -} - -const getMonitorFieldMaskSchema: FieldMaskSchema = { - fullTableNameArg: {wire: 'full_table_name_arg'}, -}; - -export function getMonitorFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getMonitorFieldMaskSchema); -} - -const getRefreshFieldMaskSchema: FieldMaskSchema = { - fullTableNameArg: {wire: 'full_table_name_arg'}, - refreshId: {wire: 'refresh_id'}, -}; - -export function getRefreshFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getRefreshFieldMaskSchema); -} - -const inferenceLogAnalysisConfigFieldMaskSchema: FieldMaskSchema = { - granularities: {wire: 'granularities'}, - labelCol: {wire: 'label_col'}, - modelIdCol: {wire: 'model_id_col'}, - predictionCol: {wire: 'prediction_col'}, - predictionProbaCol: {wire: 'prediction_proba_col'}, - problemType: {wire: 'problem_type'}, - timestampCol: {wire: 'timestamp_col'}, -}; - -export function inferenceLogAnalysisConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - inferenceLogAnalysisConfigFieldMaskSchema - ); -} - -const listRefreshesFieldMaskSchema: FieldMaskSchema = { - fullTableNameArg: {wire: 'full_table_name_arg'}, -}; - -export function listRefreshesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listRefreshesFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listRefreshes_ResponseFieldMaskSchema: FieldMaskSchema = { - refreshes: {wire: 'refreshes'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listRefreshes_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listRefreshes_ResponseFieldMaskSchema - ); -} - -const monitorCronScheduleFieldMaskSchema: FieldMaskSchema = { - pauseStatus: {wire: 'pause_status'}, - quartzCronExpression: {wire: 'quartz_cron_expression'}, - timezoneId: {wire: 'timezone_id'}, -}; - -export function monitorCronScheduleFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - monitorCronScheduleFieldMaskSchema - ); -} - -const notificationsFieldMaskSchema: FieldMaskSchema = { - onFailure: {wire: 'on_failure', children: () => destinationFieldMaskSchema}, - onNewClassificationTagDetected: { - wire: 'on_new_classification_tag_detected', - children: () => destinationFieldMaskSchema, - }, -}; - -export function notificationsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, notificationsFieldMaskSchema); -} - -const refreshInfoFieldMaskSchema: FieldMaskSchema = { - endTimeMs: {wire: 'end_time_ms'}, - message: {wire: 'message'}, - refreshId: {wire: 'refresh_id'}, - startTimeMs: {wire: 'start_time_ms'}, - state: {wire: 'state'}, - trigger: {wire: 'trigger'}, -}; - -export function refreshInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, refreshInfoFieldMaskSchema); -} - -const regenerateDashboardFieldMaskSchema: FieldMaskSchema = { - fullTableNameArg: {wire: 'full_table_name_arg'}, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function regenerateDashboardFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - regenerateDashboardFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const regenerateDashboard_ResponseFieldMaskSchema: FieldMaskSchema = { - dashboardId: {wire: 'dashboard_id'}, - parentFolder: {wire: 'parent_folder'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function regenerateDashboard_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - regenerateDashboard_ResponseFieldMaskSchema - ); -} - -const runRefreshFieldMaskSchema: FieldMaskSchema = { - fullTableNameArg: {wire: 'full_table_name_arg'}, -}; - -export function runRefreshFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, runRefreshFieldMaskSchema); -} - -const snapshotAnalysisConfigFieldMaskSchema: FieldMaskSchema = {}; - -export function snapshotAnalysisConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - snapshotAnalysisConfigFieldMaskSchema - ); -} - -const timeSeriesAnalysisConfigFieldMaskSchema: FieldMaskSchema = { - granularities: {wire: 'granularities'}, - timestampCol: {wire: 'timestamp_col'}, -}; - -export function timeSeriesAnalysisConfigFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - timeSeriesAnalysisConfigFieldMaskSchema - ); -} - -const updateMonitorFieldMaskSchema: FieldMaskSchema = { - assetsDir: {wire: 'assets_dir'}, - baselineTableName: {wire: 'baseline_table_name'}, - customMetrics: {wire: 'custom_metrics'}, - dashboardId: {wire: 'dashboard_id'}, - dataClassificationConfig: { - wire: 'data_classification_config', - children: () => dataClassificationConfigFieldMaskSchema, - }, - driftMetricsTableName: {wire: 'drift_metrics_table_name'}, - fullTableNameArg: {wire: 'full_table_name_arg'}, - inferenceLog: { - wire: 'inference_log', - children: () => inferenceLogAnalysisConfigFieldMaskSchema, - }, - latestMonitorFailureMsg: {wire: 'latest_monitor_failure_msg'}, - monitorVersion: {wire: 'monitor_version'}, - notifications: { - wire: 'notifications', - children: () => notificationsFieldMaskSchema, - }, - outputSchemaName: {wire: 'output_schema_name'}, - profileMetricsTableName: {wire: 'profile_metrics_table_name'}, - schedule: { - wire: 'schedule', - children: () => monitorCronScheduleFieldMaskSchema, - }, - slicingExprs: {wire: 'slicing_exprs'}, - snapshot: { - wire: 'snapshot', - children: () => snapshotAnalysisConfigFieldMaskSchema, - }, - status: {wire: 'status'}, - tableName: {wire: 'table_name'}, - timeSeries: { - wire: 'time_series', - children: () => timeSeriesAnalysisConfigFieldMaskSchema, - }, -}; - -export function updateMonitorFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, updateMonitorFieldMaskSchema); -} diff --git a/packages/queries/src/v1/model.ts b/packages/queries/src/v1/model.ts index 48de2889..105a83e9 100644 --- a/packages/queries/src/v1/model.ts +++ b/packages/queries/src/v1/model.ts @@ -278,7 +278,7 @@ export interface TrashQueryRequest { export interface UpdateQueryRequest { query?: UpdateQueryRequestQuery | undefined; - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; id?: string | undefined; /** If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert's display name conflicts with an existing alert's display name. */ autoResolveDisplayName?: boolean | undefined; @@ -339,66 +339,6 @@ export interface Visualization { queryId?: string | undefined; } -export const unmarshalCreateQueryRequestSchema: z.ZodType = - z - .object({ - query: z.lazy(() => unmarshalCreateQueryRequestQuerySchema).optional(), - auto_resolve_display_name: z.boolean().optional(), - }) - .transform(d => ({ - query: d.query, - autoResolveDisplayName: d.auto_resolve_display_name, - })); - -export const unmarshalCreateQueryRequestQuerySchema: z.ZodType = - z - .object({ - id: z.string().optional(), - display_name: z.string().optional(), - description: z.string().optional(), - owner_user_name: z.string().optional(), - warehouse_id: z.string().optional(), - query_text: z.string().optional(), - run_as_mode: z.enum(RunAsMode).optional(), - lifecycle_state: z.enum(LifecycleState).optional(), - last_modifier_user_name: z.string().optional(), - parent_path: z.string().optional(), - tags: z.array(z.string()).optional(), - create_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - update_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - parameters: z - .array(z.lazy(() => unmarshalQueryParameterSchema)) - .optional(), - apply_auto_limit: z.boolean().optional(), - catalog: z.string().optional(), - schema: z.string().optional(), - }) - .transform(d => ({ - id: d.id, - displayName: d.display_name, - description: d.description, - ownerUserName: d.owner_user_name, - warehouseId: d.warehouse_id, - queryText: d.query_text, - runAsMode: d.run_as_mode, - lifecycleState: d.lifecycle_state, - lastModifierUserName: d.last_modifier_user_name, - parentPath: d.parent_path, - tags: d.tags, - createTime: d.create_time, - updateTime: d.update_time, - parameters: d.parameters, - applyAutoLimit: d.apply_auto_limit, - catalog: d.catalog, - schema: d.schema, - })); - export const unmarshalDateRangeSchema: z.ZodType = z .object({ start: z.string().optional(), @@ -639,70 +579,6 @@ export const unmarshalTextValueSchema: z.ZodType = z value: d.value, })); -export const unmarshalUpdateQueryRequestSchema: z.ZodType = - z - .object({ - query: z.lazy(() => unmarshalUpdateQueryRequestQuerySchema).optional(), - update_mask: z.string().optional(), - id: z.string().optional(), - auto_resolve_display_name: z.boolean().optional(), - }) - .transform(d => ({ - query: d.query, - updateMask: d.update_mask, - id: d.id, - autoResolveDisplayName: d.auto_resolve_display_name, - })); - -export const unmarshalUpdateQueryRequestQuerySchema: z.ZodType = - z - .object({ - id: z.string().optional(), - display_name: z.string().optional(), - description: z.string().optional(), - owner_user_name: z.string().optional(), - warehouse_id: z.string().optional(), - query_text: z.string().optional(), - run_as_mode: z.enum(RunAsMode).optional(), - lifecycle_state: z.enum(LifecycleState).optional(), - last_modifier_user_name: z.string().optional(), - parent_path: z.string().optional(), - tags: z.array(z.string()).optional(), - create_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - update_time: z - .string() - .transform(s => Temporal.Instant.from(s)) - .optional(), - parameters: z - .array(z.lazy(() => unmarshalQueryParameterSchema)) - .optional(), - apply_auto_limit: z.boolean().optional(), - catalog: z.string().optional(), - schema: z.string().optional(), - }) - .transform(d => ({ - id: d.id, - displayName: d.display_name, - description: d.description, - ownerUserName: d.owner_user_name, - warehouseId: d.warehouse_id, - queryText: d.query_text, - runAsMode: d.run_as_mode, - lifecycleState: d.lifecycle_state, - lastModifierUserName: d.last_modifier_user_name, - parentPath: d.parent_path, - tags: d.tags, - createTime: d.create_time, - updateTime: d.update_time, - parameters: d.parameters, - applyAutoLimit: d.apply_auto_limit, - catalog: d.catalog, - schema: d.schema, - })); - export const unmarshalVisualizationSchema: z.ZodType = z .object({ id: z.string().optional(), @@ -823,8 +699,6 @@ export const marshalDateValueSchema: z.ZodType = z precision: d.precision, })); -export const marshalEmptySchema: z.ZodType = z.object({}); - export const marshalEnumValueSchema: z.ZodType = z .object({ values: z.array(z.string()).optional(), @@ -839,74 +713,6 @@ export const marshalEnumValueSchema: z.ZodType = z multi_values_options: d.multiValuesOptions, })); -export const marshalListQueriesResponseSchema: z.ZodType = z - .object({ - results: z - .array(z.lazy(() => marshalListQueryObjectsResponseQuerySchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - results: d.results, - next_page_token: d.nextPageToken, - })); - -export const marshalListQueryObjectsResponseQuerySchema: z.ZodType = z - .object({ - id: z.string().optional(), - displayName: z.string().optional(), - description: z.string().optional(), - ownerUserName: z.string().optional(), - warehouseId: z.string().optional(), - queryText: z.string().optional(), - runAsMode: z.enum(RunAsMode).optional(), - lifecycleState: z.enum(LifecycleState).optional(), - lastModifierUserName: z.string().optional(), - parentPath: z.string().optional(), - tags: z.array(z.string()).optional(), - createTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - updateTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - parameters: z.array(z.lazy(() => marshalQueryParameterSchema)).optional(), - applyAutoLimit: z.boolean().optional(), - catalog: z.string().optional(), - schema: z.string().optional(), - }) - .transform(d => ({ - id: d.id, - display_name: d.displayName, - description: d.description, - owner_user_name: d.ownerUserName, - warehouse_id: d.warehouseId, - query_text: d.queryText, - run_as_mode: d.runAsMode, - lifecycle_state: d.lifecycleState, - last_modifier_user_name: d.lastModifierUserName, - parent_path: d.parentPath, - tags: d.tags, - create_time: d.createTime, - update_time: d.updateTime, - parameters: d.parameters, - apply_auto_limit: d.applyAutoLimit, - catalog: d.catalog, - schema: d.schema, - })); - -export const marshalListVisualizationsForQueryResponseSchema: z.ZodType = z - .object({ - results: z.array(z.lazy(() => marshalVisualizationSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - results: d.results, - next_page_token: d.nextPageToken, - })); - export const marshalMultiValuesOptionsSchema: z.ZodType = z .object({ prefix: z.string().optional(), @@ -927,52 +733,6 @@ export const marshalNumericValueSchema: z.ZodType = z value: d.value, })); -export const marshalQuerySchema: z.ZodType = z - .object({ - id: z.string().optional(), - displayName: z.string().optional(), - description: z.string().optional(), - ownerUserName: z.string().optional(), - warehouseId: z.string().optional(), - queryText: z.string().optional(), - runAsMode: z.enum(RunAsMode).optional(), - lifecycleState: z.enum(LifecycleState).optional(), - lastModifierUserName: z.string().optional(), - parentPath: z.string().optional(), - tags: z.array(z.string()).optional(), - createTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - updateTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - parameters: z.array(z.lazy(() => marshalQueryParameterSchema)).optional(), - applyAutoLimit: z.boolean().optional(), - catalog: z.string().optional(), - schema: z.string().optional(), - }) - .transform(d => ({ - id: d.id, - display_name: d.displayName, - description: d.description, - owner_user_name: d.ownerUserName, - warehouse_id: d.warehouseId, - query_text: d.queryText, - run_as_mode: d.runAsMode, - lifecycle_state: d.lifecycleState, - last_modifier_user_name: d.lastModifierUserName, - parent_path: d.parentPath, - tags: d.tags, - create_time: d.createTime, - update_time: d.updateTime, - parameters: d.parameters, - apply_auto_limit: d.applyAutoLimit, - catalog: d.catalog, - schema: d.schema, - })); - export const marshalQueryBackedValueSchema: z.ZodType = z .object({ values: z.array(z.string()).optional(), @@ -1020,7 +780,10 @@ export const marshalTextValueSchema: z.ZodType = z export const marshalUpdateQueryRequestSchema: z.ZodType = z .object({ query: z.lazy(() => marshalUpdateQueryRequestQuerySchema).optional(), - updateMask: z.string().optional(), + updateMask: z + .any() + .transform((m: FieldMask) => m.toString()) + .optional(), id: z.string().optional(), autoResolveDisplayName: z.boolean().optional(), }) @@ -1077,80 +840,6 @@ export const marshalUpdateQueryRequestQuerySchema: z.ZodType = z schema: d.schema, })); -export const marshalVisualizationSchema: z.ZodType = z - .object({ - id: z.string().optional(), - displayName: z.string().optional(), - type: z.string().optional(), - createTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - updateTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - serializedQueryPlan: z.string().optional(), - serializedOptions: z.string().optional(), - queryId: z.string().optional(), - }) - .transform(d => ({ - id: d.id, - display_name: d.displayName, - type: d.type, - create_time: d.createTime, - update_time: d.updateTime, - serialized_query_plan: d.serializedQueryPlan, - serialized_options: d.serializedOptions, - query_id: d.queryId, - })); - -const createQueryRequestFieldMaskSchema: FieldMaskSchema = { - autoResolveDisplayName: {wire: 'auto_resolve_display_name'}, - query: { - wire: 'query', - children: () => createQueryRequestQueryFieldMaskSchema, - }, -}; - -export function createQueryRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createQueryRequestFieldMaskSchema - ); -} - -const createQueryRequestQueryFieldMaskSchema: FieldMaskSchema = { - applyAutoLimit: {wire: 'apply_auto_limit'}, - catalog: {wire: 'catalog'}, - createTime: {wire: 'create_time'}, - description: {wire: 'description'}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, - lastModifierUserName: {wire: 'last_modifier_user_name'}, - lifecycleState: {wire: 'lifecycle_state'}, - ownerUserName: {wire: 'owner_user_name'}, - parameters: {wire: 'parameters'}, - parentPath: {wire: 'parent_path'}, - queryText: {wire: 'query_text'}, - runAsMode: {wire: 'run_as_mode'}, - schema: {wire: 'schema'}, - tags: {wire: 'tags'}, - updateTime: {wire: 'update_time'}, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function createQueryRequestQueryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createQueryRequestQueryFieldMaskSchema - ); -} - const dateRangeFieldMaskSchema: FieldMaskSchema = { end: {wire: 'end'}, start: {wire: 'start'}, @@ -1186,12 +875,6 @@ export function dateValueFieldMask(...paths: string[]): FieldMask { return FieldMask.build(paths, dateValueFieldMaskSchema); } -const emptyFieldMaskSchema: FieldMaskSchema = {}; - -export function emptyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, emptyFieldMaskSchema); -} - const enumValueFieldMaskSchema: FieldMaskSchema = { enumOptions: {wire: 'enum_options'}, multiValuesOptions: { @@ -1205,105 +888,6 @@ export function enumValueFieldMask(...paths: string[]): FieldMask { return FieldMask.build(paths, enumValueFieldMaskSchema); } -const getQueryRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function getQueryRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getQueryRequestFieldMaskSchema - ); -} - -const listQueriesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listQueriesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listQueriesRequestFieldMaskSchema - ); -} - -const listQueriesResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - results: {wire: 'results'}, -}; - -export function listQueriesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listQueriesResponseFieldMaskSchema - ); -} - -const listQueryObjectsResponseQueryFieldMaskSchema: FieldMaskSchema = { - applyAutoLimit: {wire: 'apply_auto_limit'}, - catalog: {wire: 'catalog'}, - createTime: {wire: 'create_time'}, - description: {wire: 'description'}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, - lastModifierUserName: {wire: 'last_modifier_user_name'}, - lifecycleState: {wire: 'lifecycle_state'}, - ownerUserName: {wire: 'owner_user_name'}, - parameters: {wire: 'parameters'}, - parentPath: {wire: 'parent_path'}, - queryText: {wire: 'query_text'}, - runAsMode: {wire: 'run_as_mode'}, - schema: {wire: 'schema'}, - tags: {wire: 'tags'}, - updateTime: {wire: 'update_time'}, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function listQueryObjectsResponseQueryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listQueryObjectsResponseQueryFieldMaskSchema - ); -} - -const listVisualizationsForQueryRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listVisualizationsForQueryRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listVisualizationsForQueryRequestFieldMaskSchema - ); -} - -const listVisualizationsForQueryResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - results: {wire: 'results'}, -}; - -export function listVisualizationsForQueryResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listVisualizationsForQueryResponseFieldMaskSchema - ); -} - const multiValuesOptionsFieldMaskSchema: FieldMaskSchema = { prefix: {wire: 'prefix'}, separator: {wire: 'separator'}, @@ -1329,30 +913,6 @@ export function numericValueFieldMask( return FieldMask.build(paths, numericValueFieldMaskSchema); } -const queryFieldMaskSchema: FieldMaskSchema = { - applyAutoLimit: {wire: 'apply_auto_limit'}, - catalog: {wire: 'catalog'}, - createTime: {wire: 'create_time'}, - description: {wire: 'description'}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, - lastModifierUserName: {wire: 'last_modifier_user_name'}, - lifecycleState: {wire: 'lifecycle_state'}, - ownerUserName: {wire: 'owner_user_name'}, - parameters: {wire: 'parameters'}, - parentPath: {wire: 'parent_path'}, - queryText: {wire: 'query_text'}, - runAsMode: {wire: 'run_as_mode'}, - schema: {wire: 'schema'}, - tags: {wire: 'tags'}, - updateTime: {wire: 'update_time'}, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function queryFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, queryFieldMaskSchema); -} - const queryBackedValueFieldMaskSchema: FieldMaskSchema = { multiValuesOptions: { wire: 'multi_values_options', @@ -1405,38 +965,6 @@ export function textValueFieldMask(...paths: string[]): FieldMask { return FieldMask.build(paths, textValueFieldMaskSchema); } -const trashQueryRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function trashQueryRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - trashQueryRequestFieldMaskSchema - ); -} - -const updateQueryRequestFieldMaskSchema: FieldMaskSchema = { - autoResolveDisplayName: {wire: 'auto_resolve_display_name'}, - id: {wire: 'id'}, - query: { - wire: 'query', - children: () => updateQueryRequestQueryFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateQueryRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateQueryRequestFieldMaskSchema - ); -} - const updateQueryRequestQueryFieldMaskSchema: FieldMaskSchema = { applyAutoLimit: {wire: 'apply_auto_limit'}, catalog: {wire: 'catalog'}, @@ -1465,20 +993,3 @@ export function updateQueryRequestQueryFieldMask( updateQueryRequestQueryFieldMaskSchema ); } - -const visualizationFieldMaskSchema: FieldMaskSchema = { - createTime: {wire: 'create_time'}, - displayName: {wire: 'display_name'}, - id: {wire: 'id'}, - queryId: {wire: 'query_id'}, - serializedOptions: {wire: 'serialized_options'}, - serializedQueryPlan: {wire: 'serialized_query_plan'}, - type: {wire: 'type'}, - updateTime: {wire: 'update_time'}, -}; - -export function visualizationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, visualizationFieldMaskSchema); -} diff --git a/packages/queryhistory/src/v1/model.ts b/packages/queryhistory/src/v1/model.ts index 9e881548..4a2c74ed 100644 --- a/packages/queryhistory/src/v1/model.ts +++ b/packages/queryhistory/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ChannelName { @@ -432,22 +430,6 @@ export const unmarshalListQueries_ResponseSchema: z.ZodType = z - .object({ - query_start_time_range: z.lazy(() => unmarshalTimeRangeSchema).optional(), - user_ids: z.array(z.number()).optional(), - statuses: z.array(z.enum(QueryStatus)).optional(), - warehouse_ids: z.array(z.string()).optional(), - statement_ids: z.array(z.string()).optional(), - }) - .transform(d => ({ - queryStartTimeRange: d.query_start_time_range, - userIds: d.user_ids, - statuses: d.statuses, - warehouseIds: d.warehouse_ids, - statementIds: d.statement_ids, - })); - export const unmarshalQueryInfoSchema: z.ZodType = z .object({ query_id: z.string().optional(), @@ -605,72 +587,6 @@ export const unmarshalTaskTimeOverRangeEntrySchema: z.ZodType = z - .object({ - start_time_ms: z.number().optional(), - end_time_ms: z.number().optional(), - }) - .transform(d => ({ - startTimeMs: d.start_time_ms, - endTimeMs: d.end_time_ms, - })); - -export const marshalChannelInfoSchema: z.ZodType = z - .object({ - name: z.enum(ChannelName).optional(), - dbsqlVersion: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - dbsql_version: d.dbsqlVersion, - })); - -export const marshalExternalQuerySourceSchema: z.ZodType = z - .object({ - dashboardId: z.string().optional(), - legacyDashboardId: z.string().optional(), - alertId: z.string().optional(), - notebookId: z.string().optional(), - sqlQueryId: z.string().optional(), - jobInfo: z.lazy(() => marshalExternalQuerySource_JobInfoSchema).optional(), - genieSpaceId: z.string().optional(), - }) - .transform(d => ({ - dashboard_id: d.dashboardId, - legacy_dashboard_id: d.legacyDashboardId, - alert_id: d.alertId, - notebook_id: d.notebookId, - sql_query_id: d.sqlQueryId, - job_info: d.jobInfo, - genie_space_id: d.genieSpaceId, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalExternalQuerySource_JobInfoSchema: z.ZodType = z - .object({ - jobId: z.string().optional(), - jobRunId: z.string().optional(), - jobTaskRunId: z.string().optional(), - }) - .transform(d => ({ - job_id: d.jobId, - job_run_id: d.jobRunId, - job_task_run_id: d.jobTaskRunId, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListQueries_ResponseSchema: z.ZodType = z - .object({ - nextPageToken: z.string().optional(), - hasNextPage: z.boolean().optional(), - res: z.array(z.lazy(() => marshalQueryInfoSchema)).optional(), - }) - .transform(d => ({ - next_page_token: d.nextPageToken, - has_next_page: d.hasNextPage, - res: d.res, - })); - export const marshalQueryFilterSchema: z.ZodType = z .object({ queryStartTimeRange: z.lazy(() => marshalTimeRangeSchema).optional(), @@ -687,162 +603,6 @@ export const marshalQueryFilterSchema: z.ZodType = z statement_ids: d.statementIds, })); -export const marshalQueryInfoSchema: z.ZodType = z - .object({ - queryId: z.string().optional(), - status: z.enum(QueryStatus).optional(), - queryText: z.string().optional(), - queryStartTimeMs: z.number().optional(), - executionEndTimeMs: z.number().optional(), - queryEndTimeMs: z.number().optional(), - userId: z.number().optional(), - userName: z.string().optional(), - sparkUiUrl: z.string().optional(), - endpointId: z.string().optional(), - rowsProduced: z.number().optional(), - errorMessage: z.string().optional(), - lookupKey: z.string().optional(), - metrics: z.lazy(() => marshalQueryMetricsSchema).optional(), - executedAsUserId: z.number().optional(), - executedAsUserName: z.string().optional(), - sessionId: z.string().optional(), - isFinal: z.boolean().optional(), - channelUsed: z.lazy(() => marshalChannelInfoSchema).optional(), - plansState: z.enum(PlansState).optional(), - statementType: z.enum(QueryStatementType).optional(), - warehouseId: z.string().optional(), - duration: z.number().optional(), - clientApplication: z.string().optional(), - querySource: z.lazy(() => marshalExternalQuerySourceSchema).optional(), - cacheQueryId: z.string().optional(), - queryTags: z.array(z.lazy(() => marshalQueryTagSchema)).optional(), - }) - .transform(d => ({ - query_id: d.queryId, - status: d.status, - query_text: d.queryText, - query_start_time_ms: d.queryStartTimeMs, - execution_end_time_ms: d.executionEndTimeMs, - query_end_time_ms: d.queryEndTimeMs, - user_id: d.userId, - user_name: d.userName, - spark_ui_url: d.sparkUiUrl, - endpoint_id: d.endpointId, - rows_produced: d.rowsProduced, - error_message: d.errorMessage, - lookup_key: d.lookupKey, - metrics: d.metrics, - executed_as_user_id: d.executedAsUserId, - executed_as_user_name: d.executedAsUserName, - session_id: d.sessionId, - is_final: d.isFinal, - channel_used: d.channelUsed, - plans_state: d.plansState, - statement_type: d.statementType, - warehouse_id: d.warehouseId, - duration: d.duration, - client_application: d.clientApplication, - query_source: d.querySource, - cache_query_id: d.cacheQueryId, - query_tags: d.queryTags, - })); - -export const marshalQueryMetricsSchema: z.ZodType = z - .object({ - totalTimeMs: z.number().optional(), - readBytes: z.number().optional(), - rowsProducedCount: z.number().optional(), - compilationTimeMs: z.number().optional(), - executionTimeMs: z.number().optional(), - readRemoteBytes: z.number().optional(), - writeRemoteBytes: z.number().optional(), - readCacheBytes: z.number().optional(), - spillToDiskBytes: z.number().optional(), - taskTotalTimeMs: z.number().optional(), - readFilesCount: z.number().optional(), - readPartitionsCount: z.number().optional(), - photonTotalTimeMs: z.number().optional(), - rowsReadCount: z.number().optional(), - resultFetchTimeMs: z.number().optional(), - networkSentBytes: z.number().optional(), - resultFromCache: z.boolean().optional(), - prunedBytes: z.number().optional(), - prunedFilesCount: z.number().optional(), - provisioningQueueStartTimestamp: z.number().optional(), - overloadingQueueStartTimestamp: z.number().optional(), - queryCompilationStartTimestamp: z.number().optional(), - taskTimeOverTimeRange: z - .lazy(() => marshalTaskTimeOverRangeSchema) - .optional(), - workToBeDone: z.number().optional(), - runnableTasks: z.number().optional(), - projectedRemainingTaskTotalTimeMs: z.number().optional(), - remainingTaskCount: z.number().optional(), - projectedRemainingWallclockTimeMs: z.number().optional(), - readFilesBytes: z.number().optional(), - }) - .transform(d => ({ - total_time_ms: d.totalTimeMs, - read_bytes: d.readBytes, - rows_produced_count: d.rowsProducedCount, - compilation_time_ms: d.compilationTimeMs, - execution_time_ms: d.executionTimeMs, - read_remote_bytes: d.readRemoteBytes, - write_remote_bytes: d.writeRemoteBytes, - read_cache_bytes: d.readCacheBytes, - spill_to_disk_bytes: d.spillToDiskBytes, - task_total_time_ms: d.taskTotalTimeMs, - read_files_count: d.readFilesCount, - read_partitions_count: d.readPartitionsCount, - photon_total_time_ms: d.photonTotalTimeMs, - rows_read_count: d.rowsReadCount, - result_fetch_time_ms: d.resultFetchTimeMs, - network_sent_bytes: d.networkSentBytes, - result_from_cache: d.resultFromCache, - pruned_bytes: d.prunedBytes, - pruned_files_count: d.prunedFilesCount, - provisioning_queue_start_timestamp: d.provisioningQueueStartTimestamp, - overloading_queue_start_timestamp: d.overloadingQueueStartTimestamp, - query_compilation_start_timestamp: d.queryCompilationStartTimestamp, - task_time_over_time_range: d.taskTimeOverTimeRange, - work_to_be_done: d.workToBeDone, - runnable_tasks: d.runnableTasks, - projected_remaining_task_total_time_ms: d.projectedRemainingTaskTotalTimeMs, - remaining_task_count: d.remainingTaskCount, - projected_remaining_wallclock_time_ms: d.projectedRemainingWallclockTimeMs, - read_files_bytes: d.readFilesBytes, - })); - -export const marshalQueryTagSchema: z.ZodType = z - .object({ - key: z.string().optional(), - value: z.string().optional(), - }) - .transform(d => ({ - key: d.key, - value: d.value, - })); - -export const marshalTaskTimeOverRangeSchema: z.ZodType = z - .object({ - entries: z - .array(z.lazy(() => marshalTaskTimeOverRangeEntrySchema)) - .optional(), - interval: z.number().optional(), - }) - .transform(d => ({ - entries: d.entries, - interval: d.interval, - })); - -export const marshalTaskTimeOverRangeEntrySchema: z.ZodType = z - .object({ - taskCompletedTimeMs: z.number().optional(), - }) - .transform(d => ({ - task_completed_time_ms: d.taskCompletedTimeMs, - })); - export const marshalTimeRangeSchema: z.ZodType = z .object({ startTimeMs: z.number().optional(), @@ -852,230 +612,3 @@ export const marshalTimeRangeSchema: z.ZodType = z start_time_ms: d.startTimeMs, end_time_ms: d.endTimeMs, })); - -const channelInfoFieldMaskSchema: FieldMaskSchema = { - dbsqlVersion: {wire: 'dbsql_version'}, - name: {wire: 'name'}, -}; - -export function channelInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, channelInfoFieldMaskSchema); -} - -const externalQuerySourceFieldMaskSchema: FieldMaskSchema = { - alertId: {wire: 'alert_id'}, - dashboardId: {wire: 'dashboard_id'}, - genieSpaceId: {wire: 'genie_space_id'}, - jobInfo: { - wire: 'job_info', - children: () => externalQuerySource_JobInfoFieldMaskSchema, - }, - legacyDashboardId: {wire: 'legacy_dashboard_id'}, - notebookId: {wire: 'notebook_id'}, - sqlQueryId: {wire: 'sql_query_id'}, -}; - -export function externalQuerySourceFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - externalQuerySourceFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const externalQuerySource_JobInfoFieldMaskSchema: FieldMaskSchema = { - jobId: {wire: 'job_id'}, - jobRunId: {wire: 'job_run_id'}, - jobTaskRunId: {wire: 'job_task_run_id'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function externalQuerySource_JobInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - externalQuerySource_JobInfoFieldMaskSchema - ); -} - -const listQueriesFieldMaskSchema: FieldMaskSchema = { - filterBy: {wire: 'filter_by', children: () => queryFilterFieldMaskSchema}, - includeMetrics: {wire: 'include_metrics'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listQueriesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listQueriesFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listQueries_ResponseFieldMaskSchema: FieldMaskSchema = { - hasNextPage: {wire: 'has_next_page'}, - nextPageToken: {wire: 'next_page_token'}, - res: {wire: 'res'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listQueries_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listQueries_ResponseFieldMaskSchema - ); -} - -const queryFilterFieldMaskSchema: FieldMaskSchema = { - queryStartTimeRange: { - wire: 'query_start_time_range', - children: () => timeRangeFieldMaskSchema, - }, - statementIds: {wire: 'statement_ids'}, - statuses: {wire: 'statuses'}, - userIds: {wire: 'user_ids'}, - warehouseIds: {wire: 'warehouse_ids'}, -}; - -export function queryFilterFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, queryFilterFieldMaskSchema); -} - -const queryInfoFieldMaskSchema: FieldMaskSchema = { - cacheQueryId: {wire: 'cache_query_id'}, - channelUsed: { - wire: 'channel_used', - children: () => channelInfoFieldMaskSchema, - }, - clientApplication: {wire: 'client_application'}, - duration: {wire: 'duration'}, - endpointId: {wire: 'endpoint_id'}, - errorMessage: {wire: 'error_message'}, - executedAsUserId: {wire: 'executed_as_user_id'}, - executedAsUserName: {wire: 'executed_as_user_name'}, - executionEndTimeMs: {wire: 'execution_end_time_ms'}, - isFinal: {wire: 'is_final'}, - lookupKey: {wire: 'lookup_key'}, - metrics: {wire: 'metrics', children: () => queryMetricsFieldMaskSchema}, - plansState: {wire: 'plans_state'}, - queryEndTimeMs: {wire: 'query_end_time_ms'}, - queryId: {wire: 'query_id'}, - querySource: { - wire: 'query_source', - children: () => externalQuerySourceFieldMaskSchema, - }, - queryStartTimeMs: {wire: 'query_start_time_ms'}, - queryTags: {wire: 'query_tags'}, - queryText: {wire: 'query_text'}, - rowsProduced: {wire: 'rows_produced'}, - sessionId: {wire: 'session_id'}, - sparkUiUrl: {wire: 'spark_ui_url'}, - statementType: {wire: 'statement_type'}, - status: {wire: 'status'}, - userId: {wire: 'user_id'}, - userName: {wire: 'user_name'}, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function queryInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, queryInfoFieldMaskSchema); -} - -const queryMetricsFieldMaskSchema: FieldMaskSchema = { - compilationTimeMs: {wire: 'compilation_time_ms'}, - executionTimeMs: {wire: 'execution_time_ms'}, - networkSentBytes: {wire: 'network_sent_bytes'}, - overloadingQueueStartTimestamp: {wire: 'overloading_queue_start_timestamp'}, - photonTotalTimeMs: {wire: 'photon_total_time_ms'}, - projectedRemainingTaskTotalTimeMs: { - wire: 'projected_remaining_task_total_time_ms', - }, - projectedRemainingWallclockTimeMs: { - wire: 'projected_remaining_wallclock_time_ms', - }, - provisioningQueueStartTimestamp: {wire: 'provisioning_queue_start_timestamp'}, - prunedBytes: {wire: 'pruned_bytes'}, - prunedFilesCount: {wire: 'pruned_files_count'}, - queryCompilationStartTimestamp: {wire: 'query_compilation_start_timestamp'}, - readBytes: {wire: 'read_bytes'}, - readCacheBytes: {wire: 'read_cache_bytes'}, - readFilesBytes: {wire: 'read_files_bytes'}, - readFilesCount: {wire: 'read_files_count'}, - readPartitionsCount: {wire: 'read_partitions_count'}, - readRemoteBytes: {wire: 'read_remote_bytes'}, - remainingTaskCount: {wire: 'remaining_task_count'}, - resultFetchTimeMs: {wire: 'result_fetch_time_ms'}, - resultFromCache: {wire: 'result_from_cache'}, - rowsProducedCount: {wire: 'rows_produced_count'}, - rowsReadCount: {wire: 'rows_read_count'}, - runnableTasks: {wire: 'runnable_tasks'}, - spillToDiskBytes: {wire: 'spill_to_disk_bytes'}, - taskTimeOverTimeRange: { - wire: 'task_time_over_time_range', - children: () => taskTimeOverRangeFieldMaskSchema, - }, - taskTotalTimeMs: {wire: 'task_total_time_ms'}, - totalTimeMs: {wire: 'total_time_ms'}, - workToBeDone: {wire: 'work_to_be_done'}, - writeRemoteBytes: {wire: 'write_remote_bytes'}, -}; - -export function queryMetricsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, queryMetricsFieldMaskSchema); -} - -const queryTagFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -export function queryTagFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, queryTagFieldMaskSchema); -} - -const taskTimeOverRangeFieldMaskSchema: FieldMaskSchema = { - entries: {wire: 'entries'}, - interval: {wire: 'interval'}, -}; - -export function taskTimeOverRangeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - taskTimeOverRangeFieldMaskSchema - ); -} - -const taskTimeOverRangeEntryFieldMaskSchema: FieldMaskSchema = { - taskCompletedTimeMs: {wire: 'task_completed_time_ms'}, -}; - -export function taskTimeOverRangeEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - taskTimeOverRangeEntryFieldMaskSchema - ); -} - -const timeRangeFieldMaskSchema: FieldMaskSchema = { - endTimeMs: {wire: 'end_time_ms'}, - startTimeMs: {wire: 'start_time_ms'}, -}; - -export function timeRangeFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, timeRangeFieldMaskSchema); -} diff --git a/packages/registeredmodels/src/v1/model.ts b/packages/registeredmodels/src/v1/model.ts index a84c4e66..730716bd 100644 --- a/packages/registeredmodels/src/v1/model.ts +++ b/packages/registeredmodels/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ModelVersionStatus { @@ -428,43 +426,6 @@ export const unmarshalConnectionDependencySchema: z.ZodType = - z - .object({ - name: z.string().optional(), - catalog_name: z.string().optional(), - schema_name: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storage_location: z.string().optional(), - metastore_id: z.string().optional(), - full_name: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - aliases: z - .array(z.lazy(() => unmarshalRegisteredModelAliasInfoSchema)) - .optional(), - browse_only: z.boolean().optional(), - }) - .transform(d => ({ - name: d.name, - catalogName: d.catalog_name, - schemaName: d.schema_name, - owner: d.owner, - comment: d.comment, - storageLocation: d.storage_location, - metastoreId: d.metastore_id, - fullName: d.full_name, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - aliases: d.aliases, - browseOnly: d.browse_only, - })); - export const unmarshalCredentialDependencySchema: z.ZodType = z .object({ @@ -659,19 +620,6 @@ export const unmarshalSecretDependencySchema: z.ZodType = z secretFullName: d.secret_full_name, })); -export const unmarshalSetRegisteredModelAliasSchema: z.ZodType = - z - .object({ - full_name_arg: z.string().optional(), - alias_arg: z.string().optional(), - version_num: z.number().optional(), - }) - .transform(d => ({ - fullNameArg: d.full_name_arg, - aliasArg: d.alias_arg, - versionNum: d.version_num, - })); - export const unmarshalTableDependencySchema: z.ZodType = z .object({ table_full_name: z.string().optional(), @@ -680,98 +628,6 @@ export const unmarshalTableDependencySchema: z.ZodType = z tableFullName: d.table_full_name, })); -export const unmarshalUpdateModelVersionSchema: z.ZodType = - z - .object({ - full_name_arg: z.string().optional(), - version_arg: z.number().optional(), - model_name: z.string().optional(), - catalog_name: z.string().optional(), - schema_name: z.string().optional(), - source: z.string().optional(), - comment: z.string().optional(), - run_id: z.string().optional(), - run_workspace_id: z.number().optional(), - model_version_dependencies: z - .lazy(() => unmarshalDependencyListSchema) - .optional(), - status: z.enum(ModelVersionStatus).optional(), - version: z.number().optional(), - storage_location: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - id: z.string().optional(), - aliases: z - .array(z.lazy(() => unmarshalRegisteredModelAliasInfoSchema)) - .optional(), - }) - .transform(d => ({ - fullNameArg: d.full_name_arg, - versionArg: d.version_arg, - modelName: d.model_name, - catalogName: d.catalog_name, - schemaName: d.schema_name, - source: d.source, - comment: d.comment, - runId: d.run_id, - runWorkspaceId: d.run_workspace_id, - modelVersionDependencies: d.model_version_dependencies, - status: d.status, - version: d.version, - storageLocation: d.storage_location, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - id: d.id, - aliases: d.aliases, - })); - -export const unmarshalUpdateRegisteredModelSchema: z.ZodType = - z - .object({ - full_name_arg: z.string().optional(), - new_name: z.string().optional(), - name: z.string().optional(), - catalog_name: z.string().optional(), - schema_name: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storage_location: z.string().optional(), - metastore_id: z.string().optional(), - full_name: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - aliases: z - .array(z.lazy(() => unmarshalRegisteredModelAliasInfoSchema)) - .optional(), - browse_only: z.boolean().optional(), - }) - .transform(d => ({ - fullNameArg: d.full_name_arg, - newName: d.new_name, - name: d.name, - catalogName: d.catalog_name, - schemaName: d.schema_name, - owner: d.owner, - comment: d.comment, - storageLocation: d.storage_location, - metastoreId: d.metastore_id, - fullName: d.full_name, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - aliases: d.aliases, - browseOnly: d.browse_only, - })); - export const unmarshalVolumeDependencySchema: z.ZodType = z .object({ volume_full_name: z.string().optional(), @@ -832,18 +688,6 @@ export const marshalCredentialDependencySchema: z.ZodType = z credential_name: d.credentialName, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteModelVersion_ResponseSchema: z.ZodType = z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteRegisteredModel_ResponseSchema: z.ZodType = z.object( - {} -); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteRegisteredModelAlias_ResponseSchema: z.ZodType = - z.object({}); - export const marshalDependencySchema: z.ZodType = z .object({ table: z.lazy(() => marshalTableDependencySchema).optional(), @@ -878,78 +722,6 @@ export const marshalFunctionDependencySchema: z.ZodType = z function_full_name: d.functionFullName, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListModelVersions_ResponseSchema: z.ZodType = z - .object({ - modelVersions: z - .array(z.lazy(() => marshalModelVersionInfoSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - model_versions: d.modelVersions, - next_page_token: d.nextPageToken, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListRegisteredModels_ResponseSchema: z.ZodType = z - .object({ - registeredModels: z - .array(z.lazy(() => marshalRegisteredModelInfoSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - registered_models: d.registeredModels, - next_page_token: d.nextPageToken, - })); - -export const marshalModelVersionInfoSchema: z.ZodType = z - .object({ - modelName: z.string().optional(), - catalogName: z.string().optional(), - schemaName: z.string().optional(), - source: z.string().optional(), - comment: z.string().optional(), - runId: z.string().optional(), - runWorkspaceId: z.number().optional(), - modelVersionDependencies: z - .lazy(() => marshalDependencyListSchema) - .optional(), - status: z.enum(ModelVersionStatus).optional(), - version: z.number().optional(), - storageLocation: z.string().optional(), - metastoreId: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - id: z.string().optional(), - aliases: z - .array(z.lazy(() => marshalRegisteredModelAliasInfoSchema)) - .optional(), - }) - .transform(d => ({ - model_name: d.modelName, - catalog_name: d.catalogName, - schema_name: d.schemaName, - source: d.source, - comment: d.comment, - run_id: d.runId, - run_workspace_id: d.runWorkspaceId, - model_version_dependencies: d.modelVersionDependencies, - status: d.status, - version: d.version, - storage_location: d.storageLocation, - metastore_id: d.metastoreId, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - id: d.id, - aliases: d.aliases, - })); - export const marshalRegisteredModelAliasInfoSchema: z.ZodType = z .object({ aliasName: z.string().optional(), @@ -968,42 +740,6 @@ export const marshalRegisteredModelAliasInfoSchema: z.ZodType = z schema_name: d.schemaName, })); -export const marshalRegisteredModelInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - catalogName: z.string().optional(), - schemaName: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storageLocation: z.string().optional(), - metastoreId: z.string().optional(), - fullName: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - aliases: z - .array(z.lazy(() => marshalRegisteredModelAliasInfoSchema)) - .optional(), - browseOnly: z.boolean().optional(), - }) - .transform(d => ({ - name: d.name, - catalog_name: d.catalogName, - schema_name: d.schemaName, - owner: d.owner, - comment: d.comment, - storage_location: d.storageLocation, - metastore_id: d.metastoreId, - full_name: d.fullName, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - aliases: d.aliases, - browse_only: d.browseOnly, - })); - export const marshalSecretDependencySchema: z.ZodType = z .object({ secretFullName: z.string().optional(), @@ -1129,485 +865,3 @@ export const marshalVolumeDependencySchema: z.ZodType = z .transform(d => ({ volume_full_name: d.volumeFullName, })); - -const connectionDependencyFieldMaskSchema: FieldMaskSchema = { - connectionName: {wire: 'connection_name'}, -}; - -export function connectionDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - connectionDependencyFieldMaskSchema - ); -} - -const createRegisteredModelFieldMaskSchema: FieldMaskSchema = { - aliases: {wire: 'aliases'}, - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - schemaName: {wire: 'schema_name'}, - storageLocation: {wire: 'storage_location'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function createRegisteredModelFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createRegisteredModelFieldMaskSchema - ); -} - -const credentialDependencyFieldMaskSchema: FieldMaskSchema = { - credentialName: {wire: 'credential_name'}, -}; - -export function credentialDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - credentialDependencyFieldMaskSchema - ); -} - -const deleteModelVersionFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, - versionArg: {wire: 'version_arg'}, -}; - -export function deleteModelVersionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteModelVersionFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteModelVersion_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteModelVersion_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteModelVersion_ResponseFieldMaskSchema - ); -} - -const deleteRegisteredModelFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, -}; - -export function deleteRegisteredModelFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteRegisteredModelFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteRegisteredModel_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteRegisteredModel_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteRegisteredModel_ResponseFieldMaskSchema - ); -} - -const deleteRegisteredModelAliasFieldMaskSchema: FieldMaskSchema = { - aliasArg: {wire: 'alias_arg'}, - fullNameArg: {wire: 'full_name_arg'}, -}; - -export function deleteRegisteredModelAliasFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteRegisteredModelAliasFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteRegisteredModelAlias_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteRegisteredModelAlias_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteRegisteredModelAlias_ResponseFieldMaskSchema - ); -} - -const dependencyFieldMaskSchema: FieldMaskSchema = { - connection: { - wire: 'connection', - children: () => connectionDependencyFieldMaskSchema, - }, - credential: { - wire: 'credential', - children: () => credentialDependencyFieldMaskSchema, - }, - function: { - wire: 'function', - children: () => functionDependencyFieldMaskSchema, - }, - secret: {wire: 'secret', children: () => secretDependencyFieldMaskSchema}, - table: {wire: 'table', children: () => tableDependencyFieldMaskSchema}, - volume: {wire: 'volume', children: () => volumeDependencyFieldMaskSchema}, -}; - -export function dependencyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, dependencyFieldMaskSchema); -} - -const dependencyListFieldMaskSchema: FieldMaskSchema = { - dependencies: {wire: 'dependencies'}, -}; - -export function dependencyListFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, dependencyListFieldMaskSchema); -} - -const functionDependencyFieldMaskSchema: FieldMaskSchema = { - functionFullName: {wire: 'function_full_name'}, -}; - -export function functionDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - functionDependencyFieldMaskSchema - ); -} - -const getModelVersionFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, - includeAliases: {wire: 'include_aliases'}, - includeBrowse: {wire: 'include_browse'}, - versionArg: {wire: 'version_arg'}, -}; - -export function getModelVersionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getModelVersionFieldMaskSchema - ); -} - -const getModelVersionByAliasFieldMaskSchema: FieldMaskSchema = { - aliasArg: {wire: 'alias_arg'}, - fullNameArg: {wire: 'full_name_arg'}, - includeAliases: {wire: 'include_aliases'}, -}; - -export function getModelVersionByAliasFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getModelVersionByAliasFieldMaskSchema - ); -} - -const getRegisteredModelFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, - includeAliases: {wire: 'include_aliases'}, - includeBrowse: {wire: 'include_browse'}, -}; - -export function getRegisteredModelFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getRegisteredModelFieldMaskSchema - ); -} - -const listModelVersionsFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, - includeBrowse: {wire: 'include_browse'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listModelVersionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listModelVersionsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listModelVersions_ResponseFieldMaskSchema: FieldMaskSchema = { - modelVersions: {wire: 'model_versions'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listModelVersions_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listModelVersions_ResponseFieldMaskSchema - ); -} - -const listRegisteredModelsFieldMaskSchema: FieldMaskSchema = { - catalogName: {wire: 'catalog_name'}, - includeBrowse: {wire: 'include_browse'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, - schemaName: {wire: 'schema_name'}, -}; - -export function listRegisteredModelsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listRegisteredModelsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listRegisteredModels_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - registeredModels: {wire: 'registered_models'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listRegisteredModels_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listRegisteredModels_ResponseFieldMaskSchema - ); -} - -const modelVersionInfoFieldMaskSchema: FieldMaskSchema = { - aliases: {wire: 'aliases'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - id: {wire: 'id'}, - metastoreId: {wire: 'metastore_id'}, - modelName: {wire: 'model_name'}, - modelVersionDependencies: { - wire: 'model_version_dependencies', - children: () => dependencyListFieldMaskSchema, - }, - runId: {wire: 'run_id'}, - runWorkspaceId: {wire: 'run_workspace_id'}, - schemaName: {wire: 'schema_name'}, - source: {wire: 'source'}, - status: {wire: 'status'}, - storageLocation: {wire: 'storage_location'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - version: {wire: 'version'}, -}; - -export function modelVersionInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - modelVersionInfoFieldMaskSchema - ); -} - -const registeredModelAliasInfoFieldMaskSchema: FieldMaskSchema = { - aliasName: {wire: 'alias_name'}, - catalogName: {wire: 'catalog_name'}, - id: {wire: 'id'}, - modelName: {wire: 'model_name'}, - schemaName: {wire: 'schema_name'}, - versionNum: {wire: 'version_num'}, -}; - -export function registeredModelAliasInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - registeredModelAliasInfoFieldMaskSchema - ); -} - -const registeredModelInfoFieldMaskSchema: FieldMaskSchema = { - aliases: {wire: 'aliases'}, - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - schemaName: {wire: 'schema_name'}, - storageLocation: {wire: 'storage_location'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function registeredModelInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - registeredModelInfoFieldMaskSchema - ); -} - -const secretDependencyFieldMaskSchema: FieldMaskSchema = { - secretFullName: {wire: 'secret_full_name'}, -}; - -export function secretDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - secretDependencyFieldMaskSchema - ); -} - -const setRegisteredModelAliasFieldMaskSchema: FieldMaskSchema = { - aliasArg: {wire: 'alias_arg'}, - fullNameArg: {wire: 'full_name_arg'}, - versionNum: {wire: 'version_num'}, -}; - -export function setRegisteredModelAliasFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - setRegisteredModelAliasFieldMaskSchema - ); -} - -const tableDependencyFieldMaskSchema: FieldMaskSchema = { - tableFullName: {wire: 'table_full_name'}, -}; - -export function tableDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - tableDependencyFieldMaskSchema - ); -} - -const updateModelVersionFieldMaskSchema: FieldMaskSchema = { - aliases: {wire: 'aliases'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - fullNameArg: {wire: 'full_name_arg'}, - id: {wire: 'id'}, - metastoreId: {wire: 'metastore_id'}, - modelName: {wire: 'model_name'}, - modelVersionDependencies: { - wire: 'model_version_dependencies', - children: () => dependencyListFieldMaskSchema, - }, - runId: {wire: 'run_id'}, - runWorkspaceId: {wire: 'run_workspace_id'}, - schemaName: {wire: 'schema_name'}, - source: {wire: 'source'}, - status: {wire: 'status'}, - storageLocation: {wire: 'storage_location'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - version: {wire: 'version'}, - versionArg: {wire: 'version_arg'}, -}; - -export function updateModelVersionFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateModelVersionFieldMaskSchema - ); -} - -const updateRegisteredModelFieldMaskSchema: FieldMaskSchema = { - aliases: {wire: 'aliases'}, - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - fullName: {wire: 'full_name'}, - fullNameArg: {wire: 'full_name_arg'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - newName: {wire: 'new_name'}, - owner: {wire: 'owner'}, - schemaName: {wire: 'schema_name'}, - storageLocation: {wire: 'storage_location'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function updateRegisteredModelFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateRegisteredModelFieldMaskSchema - ); -} - -const volumeDependencyFieldMaskSchema: FieldMaskSchema = { - volumeFullName: {wire: 'volume_full_name'}, -}; - -export function volumeDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - volumeDependencyFieldMaskSchema - ); -} diff --git a/packages/resourcequotas/src/v1/model.ts b/packages/resourcequotas/src/v1/model.ts index 8783e972..c3fd74d0 100644 --- a/packages/resourcequotas/src/v1/model.ts +++ b/packages/resourcequotas/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The type of Unity Catalog securable. */ @@ -112,104 +110,3 @@ export const unmarshalQuotaInfoSchema: z.ZodType = z quotaLimit: d.quota_limit, lastRefreshedAt: d.last_refreshed_at, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetQuota_ResponseSchema: z.ZodType = z - .object({ - quotaInfo: z.lazy(() => marshalQuotaInfoSchema).optional(), - }) - .transform(d => ({ - quota_info: d.quotaInfo, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListQuotas_ResponseSchema: z.ZodType = z - .object({ - quotas: z.array(z.lazy(() => marshalQuotaInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - quotas: d.quotas, - next_page_token: d.nextPageToken, - })); - -export const marshalQuotaInfoSchema: z.ZodType = z - .object({ - parentSecurableType: z.enum(SecurableType).optional(), - parentFullName: z.string().optional(), - quotaName: z.string().optional(), - quotaCount: z.number().optional(), - quotaLimit: z.number().optional(), - lastRefreshedAt: z.number().optional(), - }) - .transform(d => ({ - parent_securable_type: d.parentSecurableType, - parent_full_name: d.parentFullName, - quota_name: d.quotaName, - quota_count: d.quotaCount, - quota_limit: d.quotaLimit, - last_refreshed_at: d.lastRefreshedAt, - })); - -const getQuotaFieldMaskSchema: FieldMaskSchema = { - parentFullName: {wire: 'parent_full_name'}, - parentSecurableType: {wire: 'parent_securable_type'}, - quotaName: {wire: 'quota_name'}, -}; - -export function getQuotaFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getQuotaFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getQuota_ResponseFieldMaskSchema: FieldMaskSchema = { - quotaInfo: {wire: 'quota_info', children: () => quotaInfoFieldMaskSchema}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getQuota_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getQuota_ResponseFieldMaskSchema - ); -} - -const listQuotasFieldMaskSchema: FieldMaskSchema = { - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listQuotasFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, listQuotasFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listQuotas_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - quotas: {wire: 'quotas'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listQuotas_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listQuotas_ResponseFieldMaskSchema - ); -} - -const quotaInfoFieldMaskSchema: FieldMaskSchema = { - lastRefreshedAt: {wire: 'last_refreshed_at'}, - parentFullName: {wire: 'parent_full_name'}, - parentSecurableType: {wire: 'parent_securable_type'}, - quotaCount: {wire: 'quota_count'}, - quotaLimit: {wire: 'quota_limit'}, - quotaName: {wire: 'quota_name'}, -}; - -export function quotaInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, quotaInfoFieldMaskSchema); -} diff --git a/packages/rfa/src/v1/client.ts b/packages/rfa/src/v1/client.ts index 87d27737..bd90cd0c 100644 --- a/packages/rfa/src/v1/client.ts +++ b/packages/rfa/src/v1/client.ts @@ -129,7 +129,7 @@ export class Client { const url = `${this.host}/api/3.0/rfa/destinations`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/rfa/src/v1/model.ts b/packages/rfa/src/v1/model.ts index a35d52db..e5bb5d0c 100644 --- a/packages/rfa/src/v1/model.ts +++ b/packages/rfa/src/v1/model.ts @@ -183,7 +183,7 @@ export interface UpdateAccessRequestDestinationsRequest { * For each destination, a **destination_id** and **destination_type** must be defined. */ accessRequestDestinations?: AccessRequestDestinations | undefined; - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalAccessRequestDestinationsSchema: z.ZodType = @@ -209,17 +209,6 @@ export const unmarshalAccessRequestDestinationsSchema: z.ZodType = - z - .object({ - requests: z - .array(z.lazy(() => unmarshalCreateAccessRequestSchema)) - .optional(), - }) - .transform(d => ({ - requests: d.requests, - })); - export const unmarshalBatchCreateAccessRequestsResponseSchema: z.ZodType = z .object({ @@ -231,21 +220,6 @@ export const unmarshalBatchCreateAccessRequestsResponseSchema: z.ZodType = - z - .object({ - behalf_of: z.lazy(() => unmarshalPrincipalSchema).optional(), - comment: z.string().optional(), - securable_permissions: z - .array(z.lazy(() => unmarshalSecurablePermissionsSchema)) - .optional(), - }) - .transform(d => ({ - behalfOf: d.behalf_of, - comment: d.comment, - securablePermissions: d.securable_permissions, - })); - export const unmarshalCreateAccessRequestResponseSchema: z.ZodType = z .object({ @@ -294,17 +268,6 @@ export const unmarshalSecurableSchema: z.ZodType = z providerShare: d.provider_share, })); -export const unmarshalSecurablePermissionsSchema: z.ZodType = - z - .object({ - securable: z.lazy(() => unmarshalSecurableSchema).optional(), - permissions: z.array(z.string()).optional(), - }) - .transform(d => ({ - securable: d.securable, - permissions: d.permissions, - })); - export const marshalAccessRequestDestinationsSchema: z.ZodType = z .object({ destinations: z @@ -335,16 +298,6 @@ export const marshalBatchCreateAccessRequestsRequestSchema: z.ZodType = z requests: d.requests, })); -export const marshalBatchCreateAccessRequestsResponseSchema: z.ZodType = z - .object({ - responses: z - .array(z.lazy(() => marshalCreateAccessRequestResponseSchema)) - .optional(), - }) - .transform(d => ({ - responses: d.responses, - })); - export const marshalCreateAccessRequestSchema: z.ZodType = z .object({ behalfOf: z.lazy(() => marshalPrincipalSchema).optional(), @@ -359,18 +312,6 @@ export const marshalCreateAccessRequestSchema: z.ZodType = z securable_permissions: d.securablePermissions, })); -export const marshalCreateAccessRequestResponseSchema: z.ZodType = z - .object({ - behalfOf: z.lazy(() => marshalPrincipalSchema).optional(), - requestDestinations: z - .array(z.lazy(() => marshalAccessRequestDestinationsSchema)) - .optional(), - }) - .transform(d => ({ - behalf_of: d.behalfOf, - request_destinations: d.requestDestinations, - })); - export const marshalNotificationDestinationSchema: z.ZodType = z .object({ destinationId: z.string().optional(), @@ -436,75 +377,6 @@ export function accessRequestDestinationsFieldMask( ); } -const batchCreateAccessRequestsRequestFieldMaskSchema: FieldMaskSchema = { - requests: {wire: 'requests'}, -}; - -export function batchCreateAccessRequestsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - batchCreateAccessRequestsRequestFieldMaskSchema - ); -} - -const batchCreateAccessRequestsResponseFieldMaskSchema: FieldMaskSchema = { - responses: {wire: 'responses'}, -}; - -export function batchCreateAccessRequestsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - batchCreateAccessRequestsResponseFieldMaskSchema - ); -} - -const createAccessRequestFieldMaskSchema: FieldMaskSchema = { - behalfOf: {wire: 'behalf_of', children: () => principalFieldMaskSchema}, - comment: {wire: 'comment'}, - securablePermissions: {wire: 'securable_permissions'}, -}; - -export function createAccessRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createAccessRequestFieldMaskSchema - ); -} - -const createAccessRequestResponseFieldMaskSchema: FieldMaskSchema = { - behalfOf: {wire: 'behalf_of', children: () => principalFieldMaskSchema}, - requestDestinations: {wire: 'request_destinations'}, -}; - -export function createAccessRequestResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createAccessRequestResponseFieldMaskSchema - ); -} - -const getAccessRequestDestinationsRequestFieldMaskSchema: FieldMaskSchema = { - fullName: {wire: 'full_name'}, - securableType: {wire: 'securable_type'}, -}; - -export function getAccessRequestDestinationsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getAccessRequestDestinationsRequestFieldMaskSchema - ); -} - const notificationDestinationFieldMaskSchema: FieldMaskSchema = { destinationId: {wire: 'destination_id'}, destinationType: {wire: 'destination_type'}, @@ -520,15 +392,6 @@ export function notificationDestinationFieldMask( ); } -const principalFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, - principalType: {wire: 'principal_type'}, -}; - -export function principalFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, principalFieldMaskSchema); -} - const securableFieldMaskSchema: FieldMaskSchema = { fullName: {wire: 'full_name'}, providerShare: {wire: 'provider_share'}, @@ -538,34 +401,3 @@ const securableFieldMaskSchema: FieldMaskSchema = { export function securableFieldMask(...paths: string[]): FieldMask { return FieldMask.build(paths, securableFieldMaskSchema); } - -const securablePermissionsFieldMaskSchema: FieldMaskSchema = { - permissions: {wire: 'permissions'}, - securable: {wire: 'securable', children: () => securableFieldMaskSchema}, -}; - -export function securablePermissionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - securablePermissionsFieldMaskSchema - ); -} - -const updateAccessRequestDestinationsRequestFieldMaskSchema: FieldMaskSchema = { - accessRequestDestinations: { - wire: 'access_request_destinations', - children: () => accessRequestDestinationsFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateAccessRequestDestinationsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateAccessRequestDestinationsRequestFieldMaskSchema - ); -} diff --git a/packages/schemas/src/v1/model.ts b/packages/schemas/src/v1/model.ts index a4ab175c..0793d94b 100644 --- a/packages/schemas/src/v1/model.ts +++ b/packages/schemas/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The type of the catalog. */ @@ -235,53 +233,6 @@ export interface UpdateSchema_PropertiesEntry { value?: string | undefined; } -export const unmarshalCreateSchemaSchema: z.ZodType = z - .object({ - name: z.string().optional(), - catalog_name: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storage_root: z.string().optional(), - enable_predictive_optimization: z.string().optional(), - metastore_id: z.string().optional(), - full_name: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - catalog_type: z.enum(CatalogType).optional(), - storage_location: z.string().optional(), - effective_predictive_optimization_flag: z - .lazy(() => unmarshalEffectivePredictiveOptimizationFlagSchema) - .optional(), - schema_id: z.string().optional(), - browse_only: z.boolean().optional(), - properties: z.record(z.string(), z.string()).optional(), - options: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - name: d.name, - catalogName: d.catalog_name, - owner: d.owner, - comment: d.comment, - storageRoot: d.storage_root, - enablePredictiveOptimization: d.enable_predictive_optimization, - metastoreId: d.metastore_id, - fullName: d.full_name, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - catalogType: d.catalog_type, - storageLocation: d.storage_location, - effectivePredictiveOptimizationFlag: - d.effective_predictive_optimization_flag, - schemaId: d.schema_id, - browseOnly: d.browse_only, - properties: d.properties, - options: d.options, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeleteSchema_ResponseSchema: z.ZodType = z.object({}); @@ -358,57 +309,6 @@ export const unmarshalSchemaInfoSchema: z.ZodType = z options: d.options, })); -export const unmarshalUpdateSchemaSchema: z.ZodType = z - .object({ - full_name_arg: z.string().optional(), - new_name: z.string().optional(), - name: z.string().optional(), - catalog_name: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storage_root: z.string().optional(), - enable_predictive_optimization: z.string().optional(), - metastore_id: z.string().optional(), - full_name: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - catalog_type: z.enum(CatalogType).optional(), - storage_location: z.string().optional(), - effective_predictive_optimization_flag: z - .lazy(() => unmarshalEffectivePredictiveOptimizationFlagSchema) - .optional(), - schema_id: z.string().optional(), - browse_only: z.boolean().optional(), - properties: z.record(z.string(), z.string()).optional(), - options: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - fullNameArg: d.full_name_arg, - newName: d.new_name, - name: d.name, - catalogName: d.catalog_name, - owner: d.owner, - comment: d.comment, - storageRoot: d.storage_root, - enablePredictiveOptimization: d.enable_predictive_optimization, - metastoreId: d.metastore_id, - fullName: d.full_name, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - catalogType: d.catalog_type, - storageLocation: d.storage_location, - effectivePredictiveOptimizationFlag: - d.effective_predictive_optimization_flag, - schemaId: d.schema_id, - browseOnly: d.browse_only, - properties: d.properties, - options: d.options, - })); - export const marshalCreateSchemaSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -456,9 +356,6 @@ export const marshalCreateSchemaSchema: z.ZodType = z options: d.options, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteSchema_ResponseSchema: z.ZodType = z.object({}); - export const marshalEffectivePredictiveOptimizationFlagSchema: z.ZodType = z .object({ value: z.string().optional(), @@ -471,64 +368,6 @@ export const marshalEffectivePredictiveOptimizationFlagSchema: z.ZodType = z inherited_from_name: d.inheritedFromName, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListSchemas_ResponseSchema: z.ZodType = z - .object({ - schemas: z.array(z.lazy(() => marshalSchemaInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - schemas: d.schemas, - next_page_token: d.nextPageToken, - })); - -export const marshalSchemaInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - catalogName: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storageRoot: z.string().optional(), - enablePredictiveOptimization: z.string().optional(), - metastoreId: z.string().optional(), - fullName: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - catalogType: z.enum(CatalogType).optional(), - storageLocation: z.string().optional(), - effectivePredictiveOptimizationFlag: z - .lazy(() => marshalEffectivePredictiveOptimizationFlagSchema) - .optional(), - schemaId: z.string().optional(), - browseOnly: z.boolean().optional(), - properties: z.record(z.string(), z.string()).optional(), - options: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - name: d.name, - catalog_name: d.catalogName, - owner: d.owner, - comment: d.comment, - storage_root: d.storageRoot, - enable_predictive_optimization: d.enablePredictiveOptimization, - metastore_id: d.metastoreId, - full_name: d.fullName, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - catalog_type: d.catalogType, - storage_location: d.storageLocation, - effective_predictive_optimization_flag: - d.effectivePredictiveOptimizationFlag, - schema_id: d.schemaId, - browse_only: d.browseOnly, - properties: d.properties, - options: d.options, - })); - export const marshalUpdateSchemaSchema: z.ZodType = z .object({ fullNameArg: z.string().optional(), @@ -579,269 +418,3 @@ export const marshalUpdateSchemaSchema: z.ZodType = z properties: d.properties, options: d.options, })); - -const createSchemaFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - catalogType: {wire: 'catalog_type'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - effectivePredictiveOptimizationFlag: { - wire: 'effective_predictive_optimization_flag', - children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, - }, - enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - options: {wire: 'options'}, - owner: {wire: 'owner'}, - properties: {wire: 'properties'}, - schemaId: {wire: 'schema_id'}, - storageLocation: {wire: 'storage_location'}, - storageRoot: {wire: 'storage_root'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function createSchemaFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createSchemaFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createSchema_OptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createSchema_OptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createSchema_OptionsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createSchema_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createSchema_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createSchema_PropertiesEntryFieldMaskSchema - ); -} - -const deleteSchemaFieldMaskSchema: FieldMaskSchema = { - force: {wire: 'force'}, - fullNameArg: {wire: 'full_name_arg'}, -}; - -export function deleteSchemaFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deleteSchemaFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteSchema_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteSchema_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteSchema_ResponseFieldMaskSchema - ); -} - -const effectivePredictiveOptimizationFlagFieldMaskSchema: FieldMaskSchema = { - inheritedFromName: {wire: 'inherited_from_name'}, - inheritedFromType: {wire: 'inherited_from_type'}, - value: {wire: 'value'}, -}; - -export function effectivePredictiveOptimizationFlagFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - effectivePredictiveOptimizationFlagFieldMaskSchema - ); -} - -const getSchemaFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, - includeBrowse: {wire: 'include_browse'}, -}; - -export function getSchemaFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getSchemaFieldMaskSchema); -} - -const listSchemasFieldMaskSchema: FieldMaskSchema = { - catalogName: {wire: 'catalog_name'}, - includeBrowse: {wire: 'include_browse'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, -}; - -export function listSchemasFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listSchemasFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listSchemas_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - schemas: {wire: 'schemas'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listSchemas_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listSchemas_ResponseFieldMaskSchema - ); -} - -const schemaInfoFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - catalogType: {wire: 'catalog_type'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - effectivePredictiveOptimizationFlag: { - wire: 'effective_predictive_optimization_flag', - children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, - }, - enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - options: {wire: 'options'}, - owner: {wire: 'owner'}, - properties: {wire: 'properties'}, - schemaId: {wire: 'schema_id'}, - storageLocation: {wire: 'storage_location'}, - storageRoot: {wire: 'storage_root'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function schemaInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, schemaInfoFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const schemaInfo_OptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function schemaInfo_OptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - schemaInfo_OptionsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const schemaInfo_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function schemaInfo_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - schemaInfo_PropertiesEntryFieldMaskSchema - ); -} - -const updateSchemaFieldMaskSchema: FieldMaskSchema = { - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - catalogType: {wire: 'catalog_type'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - effectivePredictiveOptimizationFlag: { - wire: 'effective_predictive_optimization_flag', - children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, - }, - enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, - fullName: {wire: 'full_name'}, - fullNameArg: {wire: 'full_name_arg'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - newName: {wire: 'new_name'}, - options: {wire: 'options'}, - owner: {wire: 'owner'}, - properties: {wire: 'properties'}, - schemaId: {wire: 'schema_id'}, - storageLocation: {wire: 'storage_location'}, - storageRoot: {wire: 'storage_root'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, -}; - -export function updateSchemaFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, updateSchemaFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateSchema_OptionsEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateSchema_OptionsEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateSchema_OptionsEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateSchema_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateSchema_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateSchema_PropertiesEntryFieldMaskSchema - ); -} diff --git a/packages/sdk/src/model.ts b/packages/sdk/src/model.ts index 66c5db6f..7578b542 100644 --- a/packages/sdk/src/model.ts +++ b/packages/sdk/src/model.ts @@ -1,8 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; - /** * LaunchStage represent the lifecycle stage of an API component. Every API * component is expected to progress through these stages in the following @@ -424,200 +421,3 @@ export interface WaitForState_StateInfo { */ messagePath?: string[] | undefined; } - -const fieldMetadataFieldMaskSchema: FieldMaskSchema = { - isMultiSegment: {wire: 'is_multi_segment'}, - isStream: {wire: 'is_stream'}, - updateMaskRoot: {wire: 'update_mask_root'}, -}; - -export function fieldMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, fieldMetadataFieldMaskSchema); -} - -const longRunningOperationFieldMaskSchema: FieldMaskSchema = { - operationInfo: { - wire: 'operation_info', - children: () => longRunningOperation_OperationInfoFieldMaskSchema, - }, - operationMethods: { - wire: 'operation_methods', - children: () => longRunningOperation_OperationMethodsFieldMaskSchema, - }, -}; - -export function longRunningOperationFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - longRunningOperationFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const longRunningOperation_OperationInfoFieldMaskSchema: FieldMaskSchema = { - metadataType: {wire: 'metadata_type'}, - responseType: {wire: 'response_type'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function longRunningOperation_OperationInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - longRunningOperation_OperationInfoFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const longRunningOperation_OperationMethodsFieldMaskSchema: FieldMaskSchema = { - cancel: {wire: 'cancel'}, - delete: {wire: 'delete'}, - get: {wire: 'get'}, - list: {wire: 'list'}, - wait: {wire: 'wait'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function longRunningOperation_OperationMethodsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - longRunningOperation_OperationMethodsFieldMaskSchema - ); -} - -const methodMetadataFieldMaskSchema: FieldMaskSchema = { - requestHeaders: {wire: 'request_headers'}, - responseHeaders: {wire: 'response_headers'}, -}; - -export function methodMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, methodMetadataFieldMaskSchema); -} - -const paginationFieldMaskSchema: FieldMaskSchema = { - offsetInfo: { - wire: 'offset_info', - children: () => pagination_OffsetInfoFieldMaskSchema, - }, - results: {wire: 'results'}, - tokenInfo: { - wire: 'token_info', - children: () => pagination_PageTokenInfoFieldMaskSchema, - }, -}; - -export function paginationFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, paginationFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const pagination_OffsetInfoFieldMaskSchema: FieldMaskSchema = { - defaultMaxResults: {wire: 'default_max_results'}, - maxResults: {wire: 'max_results'}, - offset: {wire: 'offset'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function pagination_OffsetInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - pagination_OffsetInfoFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const pagination_PageTokenInfoFieldMaskSchema: FieldMaskSchema = { - defaultMaxResults: {wire: 'default_max_results'}, - maxResults: {wire: 'max_results'}, - request: {wire: 'request'}, - response: {wire: 'response'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function pagination_PageTokenInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - pagination_PageTokenInfoFieldMaskSchema - ); -} - -const waitForStateFieldMaskSchema: FieldMaskSchema = { - binding: { - wire: 'binding', - children: () => waitForState_BindingFieldMaskSchema, - }, - methodToPoll: {wire: 'method_to_poll'}, - stateInfo: { - wire: 'state_info', - children: () => waitForState_StateInfoFieldMaskSchema, - }, -}; - -export function waitForStateFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, waitForStateFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const waitForState_BindingFieldMaskSchema: FieldMaskSchema = { - pairs: {wire: 'pairs'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function waitForState_BindingFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - waitForState_BindingFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const waitForState_Binding_BindingPairFieldMaskSchema: FieldMaskSchema = { - pollMethodField: {wire: 'poll_method_field'}, - requestField: {wire: 'request_field'}, - responseField: {wire: 'response_field'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function waitForState_Binding_BindingPairFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - waitForState_Binding_BindingPairFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const waitForState_StateInfoFieldMaskSchema: FieldMaskSchema = { - failureStates: {wire: 'failure_states'}, - messagePath: {wire: 'message_path'}, - statePath: {wire: 'state_path'}, - successStates: {wire: 'success_states'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function waitForState_StateInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - waitForState_StateInfoFieldMaskSchema - ); -} diff --git a/packages/secrets/src/v1/model.ts b/packages/secrets/src/v1/model.ts index 31731a57..037c37a6 100644 --- a/packages/secrets/src/v1/model.ts +++ b/packages/secrets/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** The ACL permission levels for Secret ACLs applied to secret scopes. */ @@ -217,62 +215,18 @@ export const unmarshalAzureKeyVaultSecretScopeMetadataSchema: z.ZodType = z - .object({ - scope: z.string().optional(), - initial_manage_principal: z.string().optional(), - scope_backend_type: z.enum(ScopeBackendType).optional(), - backend_azure_keyvault: z - .lazy(() => unmarshalAzureKeyVaultSecretScopeMetadataSchema) - .optional(), - }) - .transform(d => ({ - scope: d.scope, - initialManagePrincipal: d.initial_manage_principal, - scopeBackendType: d.scope_backend_type, - backendAzureKeyvault: d.backend_azure_keyvault, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreateScope_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalDeleteAclSchema: z.ZodType = z - .object({ - scope: z.string().optional(), - principal: z.string().optional(), - }) - .transform(d => ({ - scope: d.scope, - principal: d.principal, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeleteAcl_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalDeleteScopeSchema: z.ZodType = z - .object({ - scope: z.string().optional(), - }) - .transform(d => ({ - scope: d.scope, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeleteScope_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalDeleteSecretSchema: z.ZodType = z - .object({ - scope: z.string().optional(), - key: z.string().optional(), - }) - .transform(d => ({ - scope: d.scope, - key: d.key, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeleteSecret_ResponseSchema: z.ZodType = z.object({}); @@ -321,39 +275,10 @@ export const unmarshalListSecrets_ResponseSchema: z.ZodType = z - .object({ - scope: z.string().optional(), - principal: z.string().optional(), - permission: z.enum(AclPermission).optional(), - }) - .transform(d => ({ - scope: d.scope, - principal: d.principal, - permission: d.permission, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalPutAcl_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalPutSecretSchema: z.ZodType = z - .object({ - scope: z.string().optional(), - key: z.string().optional(), - string_value: z.string().optional(), - bytes_value: z - .string() - .transform(s => Uint8Array.from(atob(s), c => c.charCodeAt(0))) - .optional(), - }) - .transform(d => ({ - scope: d.scope, - key: d.key, - stringValue: d.string_value, - bytesValue: d.bytes_value, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalPutSecret_ResponseSchema: z.ZodType = z.object({}); @@ -382,16 +307,6 @@ export const unmarshalSecretScopeSchema: z.ZodType = z keyvaultMetadata: d.keyvault_metadata, })); -export const marshalAclItemSchema: z.ZodType = z - .object({ - principal: z.string().optional(), - permission: z.enum(AclPermission).optional(), - }) - .transform(d => ({ - principal: d.principal, - permission: d.permission, - })); - export const marshalAzureKeyVaultSecretScopeMetadataSchema: z.ZodType = z .object({ resourceId: z.string().optional(), @@ -418,9 +333,6 @@ export const marshalCreateScopeSchema: z.ZodType = z backend_azure_keyvault: d.backendAzureKeyvault, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreateScope_ResponseSchema: z.ZodType = z.object({}); - export const marshalDeleteAclSchema: z.ZodType = z .object({ scope: z.string().optional(), @@ -431,9 +343,6 @@ export const marshalDeleteAclSchema: z.ZodType = z principal: d.principal, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteAcl_ResponseSchema: z.ZodType = z.object({}); - export const marshalDeleteScopeSchema: z.ZodType = z .object({ scope: z.string().optional(), @@ -442,9 +351,6 @@ export const marshalDeleteScopeSchema: z.ZodType = z scope: d.scope, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteScope_ResponseSchema: z.ZodType = z.object({}); - export const marshalDeleteSecretSchema: z.ZodType = z .object({ scope: z.string().optional(), @@ -455,52 +361,6 @@ export const marshalDeleteSecretSchema: z.ZodType = z key: d.key, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteSecret_ResponseSchema: z.ZodType = z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetSecret_ResponseSchema: z.ZodType = z - .object({ - key: z.string().optional(), - value: z - .any() - .transform((d: Uint8Array) => - btoa(Array.from(d, b => String.fromCharCode(b)).join('')) - ) - .optional(), - }) - .transform(d => ({ - key: d.key, - value: d.value, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListAcls_ResponseSchema: z.ZodType = z - .object({ - items: z.array(z.lazy(() => marshalAclItemSchema)).optional(), - }) - .transform(d => ({ - items: d.items, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListScopes_ResponseSchema: z.ZodType = z - .object({ - scopes: z.array(z.lazy(() => marshalSecretScopeSchema)).optional(), - }) - .transform(d => ({ - scopes: d.scopes, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListSecrets_ResponseSchema: z.ZodType = z - .object({ - secrets: z.array(z.lazy(() => marshalSecretMetadataSchema)).optional(), - }) - .transform(d => ({ - secrets: d.secrets, - })); - export const marshalPutAclSchema: z.ZodType = z .object({ scope: z.string().optional(), @@ -513,9 +373,6 @@ export const marshalPutAclSchema: z.ZodType = z permission: d.permission, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalPutAcl_ResponseSchema: z.ZodType = z.object({}); - export const marshalPutSecretSchema: z.ZodType = z .object({ scope: z.string().optional(), @@ -534,327 +391,3 @@ export const marshalPutSecretSchema: z.ZodType = z string_value: d.stringValue, bytes_value: d.bytesValue, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalPutSecret_ResponseSchema: z.ZodType = z.object({}); - -export const marshalSecretMetadataSchema: z.ZodType = z - .object({ - key: z.string().optional(), - lastUpdatedTimestamp: z.number().optional(), - }) - .transform(d => ({ - key: d.key, - last_updated_timestamp: d.lastUpdatedTimestamp, - })); - -export const marshalSecretScopeSchema: z.ZodType = z - .object({ - name: z.string().optional(), - backendType: z.enum(ScopeBackendType).optional(), - keyvaultMetadata: z - .lazy(() => marshalAzureKeyVaultSecretScopeMetadataSchema) - .optional(), - }) - .transform(d => ({ - name: d.name, - backend_type: d.backendType, - keyvault_metadata: d.keyvaultMetadata, - })); - -const aclItemFieldMaskSchema: FieldMaskSchema = { - permission: {wire: 'permission'}, - principal: {wire: 'principal'}, -}; - -export function aclItemFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, aclItemFieldMaskSchema); -} - -const azureKeyVaultSecretScopeMetadataFieldMaskSchema: FieldMaskSchema = { - dnsName: {wire: 'dns_name'}, - resourceId: {wire: 'resource_id'}, -}; - -export function azureKeyVaultSecretScopeMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - azureKeyVaultSecretScopeMetadataFieldMaskSchema - ); -} - -const createScopeFieldMaskSchema: FieldMaskSchema = { - backendAzureKeyvault: { - wire: 'backend_azure_keyvault', - children: () => azureKeyVaultSecretScopeMetadataFieldMaskSchema, - }, - initialManagePrincipal: {wire: 'initial_manage_principal'}, - scope: {wire: 'scope'}, - scopeBackendType: {wire: 'scope_backend_type'}, -}; - -export function createScopeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createScopeFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createScope_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createScope_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createScope_ResponseFieldMaskSchema - ); -} - -const deleteAclFieldMaskSchema: FieldMaskSchema = { - principal: {wire: 'principal'}, - scope: {wire: 'scope'}, -}; - -export function deleteAclFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, deleteAclFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteAcl_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteAcl_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteAcl_ResponseFieldMaskSchema - ); -} - -const deleteScopeFieldMaskSchema: FieldMaskSchema = { - scope: {wire: 'scope'}, -}; - -export function deleteScopeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deleteScopeFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteScope_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteScope_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteScope_ResponseFieldMaskSchema - ); -} - -const deleteSecretFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - scope: {wire: 'scope'}, -}; - -export function deleteSecretFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deleteSecretFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteSecret_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteSecret_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteSecret_ResponseFieldMaskSchema - ); -} - -const getAclFieldMaskSchema: FieldMaskSchema = { - principal: {wire: 'principal'}, - scope: {wire: 'scope'}, -}; - -export function getAclFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getAclFieldMaskSchema); -} - -const getSecretFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - scope: {wire: 'scope'}, -}; - -export function getSecretFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getSecretFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getSecret_ResponseFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getSecret_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getSecret_ResponseFieldMaskSchema - ); -} - -const listAclsFieldMaskSchema: FieldMaskSchema = { - scope: {wire: 'scope'}, -}; - -export function listAclsFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, listAclsFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listAcls_ResponseFieldMaskSchema: FieldMaskSchema = { - items: {wire: 'items'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listAcls_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAcls_ResponseFieldMaskSchema - ); -} - -const listScopesFieldMaskSchema: FieldMaskSchema = {}; - -export function listScopesFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, listScopesFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listScopes_ResponseFieldMaskSchema: FieldMaskSchema = { - scopes: {wire: 'scopes'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listScopes_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listScopes_ResponseFieldMaskSchema - ); -} - -const listSecretsFieldMaskSchema: FieldMaskSchema = { - scope: {wire: 'scope'}, -}; - -export function listSecretsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listSecretsFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listSecrets_ResponseFieldMaskSchema: FieldMaskSchema = { - secrets: {wire: 'secrets'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listSecrets_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listSecrets_ResponseFieldMaskSchema - ); -} - -const putAclFieldMaskSchema: FieldMaskSchema = { - permission: {wire: 'permission'}, - principal: {wire: 'principal'}, - scope: {wire: 'scope'}, -}; - -export function putAclFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, putAclFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const putAcl_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function putAcl_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - putAcl_ResponseFieldMaskSchema - ); -} - -const putSecretFieldMaskSchema: FieldMaskSchema = { - bytesValue: {wire: 'bytes_value'}, - key: {wire: 'key'}, - scope: {wire: 'scope'}, - stringValue: {wire: 'string_value'}, -}; - -export function putSecretFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, putSecretFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const putSecret_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function putSecret_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - putSecret_ResponseFieldMaskSchema - ); -} - -const secretMetadataFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - lastUpdatedTimestamp: {wire: 'last_updated_timestamp'}, -}; - -export function secretMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, secretMetadataFieldMaskSchema); -} - -const secretScopeFieldMaskSchema: FieldMaskSchema = { - backendType: {wire: 'backend_type'}, - keyvaultMetadata: { - wire: 'keyvault_metadata', - children: () => azureKeyVaultSecretScopeMetadataFieldMaskSchema, - }, - name: {wire: 'name'}, -}; - -export function secretScopeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, secretScopeFieldMaskSchema); -} diff --git a/packages/serviceprincipalsecrets/src/v1/model.ts b/packages/serviceprincipalsecrets/src/v1/model.ts index 4a5dc302..97de7296 100644 --- a/packages/serviceprincipalsecrets/src/v1/model.ts +++ b/packages/serviceprincipalsecrets/src/v1/model.ts @@ -1,8 +1,6 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface CreateServicePrincipalSecret { @@ -82,22 +80,6 @@ export interface ServicePrincipalSecret { expireTime?: Temporal.Instant | undefined; } -export const unmarshalCreateServicePrincipalSecretSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - service_principal: z.string().optional(), - lifetime: z - .string() - .transform(s => Temporal.Duration.from('PT' + s.toUpperCase())) - .optional(), - }) - .transform(d => ({ - accountId: d.account_id, - servicePrincipal: d.service_principal, - lifetime: d.lifetime, - })); - export const unmarshalCreateServicePrincipalSecretResponseSchema: z.ZodType = z .object({ @@ -178,180 +160,3 @@ export const marshalCreateServicePrincipalSecretSchema: z.ZodType = z service_principal: d.servicePrincipal, lifetime: d.lifetime, })); - -export const marshalCreateServicePrincipalSecretResponseSchema: z.ZodType = z - .object({ - id: z.string().optional(), - secret: z.string().optional(), - secretHash: z.string().optional(), - createTime: z.string().optional(), - updateTime: z.string().optional(), - status: z.string().optional(), - expireTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - }) - .transform(d => ({ - id: d.id, - secret: d.secret, - secret_hash: d.secretHash, - create_time: d.createTime, - update_time: d.updateTime, - status: d.status, - expire_time: d.expireTime, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteServicePrincipalSecret_ResponseSchema: z.ZodType = - z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListServicePrincipalSecrets_ResponseSchema: z.ZodType = z - .object({ - secrets: z - .array(z.lazy(() => marshalServicePrincipalSecretSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - secrets: d.secrets, - next_page_token: d.nextPageToken, - })); - -export const marshalServicePrincipalSecretSchema: z.ZodType = z - .object({ - id: z.string().optional(), - secret: z.string().optional(), - secretHash: z.string().optional(), - createTime: z.string().optional(), - updateTime: z.string().optional(), - status: z.string().optional(), - expireTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - }) - .transform(d => ({ - id: d.id, - secret: d.secret, - secret_hash: d.secretHash, - create_time: d.createTime, - update_time: d.updateTime, - status: d.status, - expire_time: d.expireTime, - })); - -const createServicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - lifetime: {wire: 'lifetime'}, - servicePrincipal: {wire: 'service_principal'}, -}; - -export function createServicePrincipalSecretFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createServicePrincipalSecretFieldMaskSchema - ); -} - -const createServicePrincipalSecretResponseFieldMaskSchema: FieldMaskSchema = { - createTime: {wire: 'create_time'}, - expireTime: {wire: 'expire_time'}, - id: {wire: 'id'}, - secret: {wire: 'secret'}, - secretHash: {wire: 'secret_hash'}, - status: {wire: 'status'}, - updateTime: {wire: 'update_time'}, -}; - -export function createServicePrincipalSecretResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createServicePrincipalSecretResponseFieldMaskSchema - ); -} - -const deleteServicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - secretId: {wire: 'secret_id'}, - servicePrincipal: {wire: 'service_principal'}, -}; - -export function deleteServicePrincipalSecretFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteServicePrincipalSecretFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteServicePrincipalSecret_ResponseFieldMaskSchema: FieldMaskSchema = - {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteServicePrincipalSecret_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteServicePrincipalSecret_ResponseFieldMaskSchema - ); -} - -const listServicePrincipalSecretsFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - servicePrincipal: {wire: 'service_principal'}, -}; - -export function listServicePrincipalSecretsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listServicePrincipalSecretsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listServicePrincipalSecrets_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - secrets: {wire: 'secrets'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listServicePrincipalSecrets_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listServicePrincipalSecrets_ResponseFieldMaskSchema - ); -} - -const servicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { - createTime: {wire: 'create_time'}, - expireTime: {wire: 'expire_time'}, - id: {wire: 'id'}, - secret: {wire: 'secret'}, - secretHash: {wire: 'secret_hash'}, - status: {wire: 'status'}, - updateTime: {wire: 'update_time'}, -}; - -export function servicePrincipalSecretFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - servicePrincipalSecretFieldMaskSchema - ); -} diff --git a/packages/serviceprincipalsecretsproxy/src/v1/model.ts b/packages/serviceprincipalsecretsproxy/src/v1/model.ts index 4a5dc302..97de7296 100644 --- a/packages/serviceprincipalsecretsproxy/src/v1/model.ts +++ b/packages/serviceprincipalsecretsproxy/src/v1/model.ts @@ -1,8 +1,6 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. import {Temporal} from '@js-temporal/polyfill'; -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface CreateServicePrincipalSecret { @@ -82,22 +80,6 @@ export interface ServicePrincipalSecret { expireTime?: Temporal.Instant | undefined; } -export const unmarshalCreateServicePrincipalSecretSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - service_principal: z.string().optional(), - lifetime: z - .string() - .transform(s => Temporal.Duration.from('PT' + s.toUpperCase())) - .optional(), - }) - .transform(d => ({ - accountId: d.account_id, - servicePrincipal: d.service_principal, - lifetime: d.lifetime, - })); - export const unmarshalCreateServicePrincipalSecretResponseSchema: z.ZodType = z .object({ @@ -178,180 +160,3 @@ export const marshalCreateServicePrincipalSecretSchema: z.ZodType = z service_principal: d.servicePrincipal, lifetime: d.lifetime, })); - -export const marshalCreateServicePrincipalSecretResponseSchema: z.ZodType = z - .object({ - id: z.string().optional(), - secret: z.string().optional(), - secretHash: z.string().optional(), - createTime: z.string().optional(), - updateTime: z.string().optional(), - status: z.string().optional(), - expireTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - }) - .transform(d => ({ - id: d.id, - secret: d.secret, - secret_hash: d.secretHash, - create_time: d.createTime, - update_time: d.updateTime, - status: d.status, - expire_time: d.expireTime, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteServicePrincipalSecret_ResponseSchema: z.ZodType = - z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListServicePrincipalSecrets_ResponseSchema: z.ZodType = z - .object({ - secrets: z - .array(z.lazy(() => marshalServicePrincipalSecretSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - secrets: d.secrets, - next_page_token: d.nextPageToken, - })); - -export const marshalServicePrincipalSecretSchema: z.ZodType = z - .object({ - id: z.string().optional(), - secret: z.string().optional(), - secretHash: z.string().optional(), - createTime: z.string().optional(), - updateTime: z.string().optional(), - status: z.string().optional(), - expireTime: z - .any() - .transform((d: Temporal.Instant) => d.toString()) - .optional(), - }) - .transform(d => ({ - id: d.id, - secret: d.secret, - secret_hash: d.secretHash, - create_time: d.createTime, - update_time: d.updateTime, - status: d.status, - expire_time: d.expireTime, - })); - -const createServicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - lifetime: {wire: 'lifetime'}, - servicePrincipal: {wire: 'service_principal'}, -}; - -export function createServicePrincipalSecretFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createServicePrincipalSecretFieldMaskSchema - ); -} - -const createServicePrincipalSecretResponseFieldMaskSchema: FieldMaskSchema = { - createTime: {wire: 'create_time'}, - expireTime: {wire: 'expire_time'}, - id: {wire: 'id'}, - secret: {wire: 'secret'}, - secretHash: {wire: 'secret_hash'}, - status: {wire: 'status'}, - updateTime: {wire: 'update_time'}, -}; - -export function createServicePrincipalSecretResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createServicePrincipalSecretResponseFieldMaskSchema - ); -} - -const deleteServicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - secretId: {wire: 'secret_id'}, - servicePrincipal: {wire: 'service_principal'}, -}; - -export function deleteServicePrincipalSecretFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteServicePrincipalSecretFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteServicePrincipalSecret_ResponseFieldMaskSchema: FieldMaskSchema = - {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteServicePrincipalSecret_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteServicePrincipalSecret_ResponseFieldMaskSchema - ); -} - -const listServicePrincipalSecretsFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - servicePrincipal: {wire: 'service_principal'}, -}; - -export function listServicePrincipalSecretsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listServicePrincipalSecretsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listServicePrincipalSecrets_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - secrets: {wire: 'secrets'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listServicePrincipalSecrets_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listServicePrincipalSecrets_ResponseFieldMaskSchema - ); -} - -const servicePrincipalSecretFieldMaskSchema: FieldMaskSchema = { - createTime: {wire: 'create_time'}, - expireTime: {wire: 'expire_time'}, - id: {wire: 'id'}, - secret: {wire: 'secret'}, - secretHash: {wire: 'secret_hash'}, - status: {wire: 'status'}, - updateTime: {wire: 'update_time'}, -}; - -export function servicePrincipalSecretFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - servicePrincipalSecretFieldMaskSchema - ); -} diff --git a/packages/settings/src/v2/model.ts b/packages/settings/src/v2/model.ts index dfbc9623..bea01772 100644 --- a/packages/settings/src/v2/model.ts +++ b/packages/settings/src/v2/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** @@ -797,43 +795,6 @@ export const marshalIntegerMessageSchema: z.ZodType = z value: d.value, })); -export const marshalListAccountSettingsMetadataResponseSchema: z.ZodType = z - .object({ - settingsMetadata: z - .array(z.lazy(() => marshalSettingsMetadataSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - settings_metadata: d.settingsMetadata, - next_page_token: d.nextPageToken, - })); - -export const marshalListAccountUserPreferencesMetadataResponseSchema: z.ZodType = - z - .object({ - settingsMetadata: z - .array(z.lazy(() => marshalSettingsMetadataSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - settings_metadata: d.settingsMetadata, - next_page_token: d.nextPageToken, - })); - -export const marshalListWorkspaceSettingsMetadataResponseSchema: z.ZodType = z - .object({ - settingsMetadata: z - .array(z.lazy(() => marshalSettingsMetadataSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - settings_metadata: d.settingsMetadata, - next_page_token: d.nextPageToken, - })); - export const marshalPersonalComputeMessageSchema: z.ZodType = z .object({ value: z.enum(PersonalComputeMessage_PersonalComputeMessageEnum).optional(), @@ -917,24 +878,6 @@ export const marshalSettingSchema: z.ZodType = z effective_personal_compute: d.effectivePersonalCompute, })); -export const marshalSettingsMetadataSchema: z.ZodType = z - .object({ - name: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - docsLink: z.string().optional(), - previewPhase: z.enum(PreviewPhase).optional(), - displayName: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - description: d.description, - type: d.type, - docs_link: d.docsLink, - preview_phase: d.previewPhase, - display_name: d.displayName, - })); - export const marshalStringMessageSchema: z.ZodType = z .object({ value: z.string().optional(), @@ -960,480 +903,3 @@ export const marshalUserPreferenceSchema: z.ZodType = z effective_boolean_val: d.effectiveBooleanVal, effective_string_val: d.effectiveStringVal, })); - -const aibiDashboardEmbeddingAccessPolicyFieldMaskSchema: FieldMaskSchema = { - accessPolicyType: {wire: 'access_policy_type'}, -}; - -export function aibiDashboardEmbeddingAccessPolicyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - aibiDashboardEmbeddingAccessPolicyFieldMaskSchema - ); -} - -const aibiDashboardEmbeddingApprovedDomainsFieldMaskSchema: FieldMaskSchema = { - approvedDomains: {wire: 'approved_domains'}, -}; - -export function aibiDashboardEmbeddingApprovedDomainsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - aibiDashboardEmbeddingApprovedDomainsFieldMaskSchema - ); -} - -const booleanMessageFieldMaskSchema: FieldMaskSchema = { - value: {wire: 'value'}, -}; - -export function booleanMessageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, booleanMessageFieldMaskSchema); -} - -const clusterAutoRestartMessageFieldMaskSchema: FieldMaskSchema = { - canToggle: {wire: 'can_toggle'}, - enabled: {wire: 'enabled'}, - enablementDetails: { - wire: 'enablement_details', - children: () => clusterAutoRestartMessage_EnablementDetailsFieldMaskSchema, - }, - maintenanceWindow: { - wire: 'maintenance_window', - children: () => clusterAutoRestartMessage_MaintenanceWindowFieldMaskSchema, - }, - restartEvenIfNoUpdatesAvailable: { - wire: 'restart_even_if_no_updates_available', - }, -}; - -export function clusterAutoRestartMessageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - clusterAutoRestartMessageFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const clusterAutoRestartMessage_EnablementDetailsFieldMaskSchema: FieldMaskSchema = - { - forcedForComplianceMode: {wire: 'forced_for_compliance_mode'}, - unavailableForDisabledEntitlement: { - wire: 'unavailable_for_disabled_entitlement', - }, - unavailableForNonEnterpriseTier: { - wire: 'unavailable_for_non_enterprise_tier', - }, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function clusterAutoRestartMessage_EnablementDetailsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - clusterAutoRestartMessage_EnablementDetailsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const clusterAutoRestartMessage_MaintenanceWindowFieldMaskSchema: FieldMaskSchema = - { - weekDayBasedSchedule: { - wire: 'week_day_based_schedule', - children: () => - clusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleFieldMaskSchema, - }, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function clusterAutoRestartMessage_MaintenanceWindowFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - clusterAutoRestartMessage_MaintenanceWindowFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const clusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleFieldMaskSchema: FieldMaskSchema = - { - dayOfWeek: {wire: 'day_of_week'}, - frequency: {wire: 'frequency'}, - windowStartTime: { - wire: 'window_start_time', - children: () => - clusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeFieldMaskSchema, - }, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function clusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - clusterAutoRestartMessage_MaintenanceWindow_WeekDayBasedScheduleFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const clusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeFieldMaskSchema: FieldMaskSchema = - { - hours: {wire: 'hours'}, - minutes: {wire: 'minutes'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function clusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - clusterAutoRestartMessage_MaintenanceWindow_WindowStartTimeFieldMaskSchema - ); -} - -const getPublicAccountSettingRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - name: {wire: 'name'}, -}; - -export function getPublicAccountSettingRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getPublicAccountSettingRequestFieldMaskSchema - ); -} - -const getPublicAccountUserPreferenceRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - name: {wire: 'name'}, - userId: {wire: 'user_id'}, -}; - -export function getPublicAccountUserPreferenceRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getPublicAccountUserPreferenceRequestFieldMaskSchema - ); -} - -const getPublicWorkspaceSettingRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getPublicWorkspaceSettingRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getPublicWorkspaceSettingRequestFieldMaskSchema - ); -} - -const integerMessageFieldMaskSchema: FieldMaskSchema = { - value: {wire: 'value'}, -}; - -export function integerMessageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, integerMessageFieldMaskSchema); -} - -const listAccountSettingsMetadataRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listAccountSettingsMetadataRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAccountSettingsMetadataRequestFieldMaskSchema - ); -} - -const listAccountSettingsMetadataResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - settingsMetadata: {wire: 'settings_metadata'}, -}; - -export function listAccountSettingsMetadataResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAccountSettingsMetadataResponseFieldMaskSchema - ); -} - -const listAccountUserPreferencesMetadataRequestFieldMaskSchema: FieldMaskSchema = - { - accountId: {wire: 'account_id'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - userId: {wire: 'user_id'}, - }; - -export function listAccountUserPreferencesMetadataRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAccountUserPreferencesMetadataRequestFieldMaskSchema - ); -} - -const listAccountUserPreferencesMetadataResponseFieldMaskSchema: FieldMaskSchema = - { - nextPageToken: {wire: 'next_page_token'}, - settingsMetadata: {wire: 'settings_metadata'}, - }; - -export function listAccountUserPreferencesMetadataResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listAccountUserPreferencesMetadataResponseFieldMaskSchema - ); -} - -const listWorkspaceSettingsMetadataRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listWorkspaceSettingsMetadataRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceSettingsMetadataRequestFieldMaskSchema - ); -} - -const listWorkspaceSettingsMetadataResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - settingsMetadata: {wire: 'settings_metadata'}, -}; - -export function listWorkspaceSettingsMetadataResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspaceSettingsMetadataResponseFieldMaskSchema - ); -} - -const patchPublicAccountSettingRequestFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - name: {wire: 'name'}, - setting: {wire: 'setting', children: () => settingFieldMaskSchema}, -}; - -export function patchPublicAccountSettingRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - patchPublicAccountSettingRequestFieldMaskSchema - ); -} - -const patchPublicAccountUserPreferenceRequestFieldMaskSchema: FieldMaskSchema = - { - accountId: {wire: 'account_id'}, - name: {wire: 'name'}, - setting: {wire: 'setting', children: () => userPreferenceFieldMaskSchema}, - userId: {wire: 'user_id'}, - }; - -export function patchPublicAccountUserPreferenceRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - patchPublicAccountUserPreferenceRequestFieldMaskSchema - ); -} - -const patchPublicWorkspaceSettingRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - setting: {wire: 'setting', children: () => settingFieldMaskSchema}, -}; - -export function patchPublicWorkspaceSettingRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - patchPublicWorkspaceSettingRequestFieldMaskSchema - ); -} - -const personalComputeMessageFieldMaskSchema: FieldMaskSchema = { - value: {wire: 'value'}, -}; - -export function personalComputeMessageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - personalComputeMessageFieldMaskSchema - ); -} - -const restrictWorkspaceAdminsMessageFieldMaskSchema: FieldMaskSchema = { - disableGovTagCreation: {wire: 'disable_gov_tag_creation'}, - status: {wire: 'status'}, -}; - -export function restrictWorkspaceAdminsMessageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - restrictWorkspaceAdminsMessageFieldMaskSchema - ); -} - -const settingFieldMaskSchema: FieldMaskSchema = { - aibiDashboardEmbeddingAccessPolicy: { - wire: 'aibi_dashboard_embedding_access_policy', - children: () => aibiDashboardEmbeddingAccessPolicyFieldMaskSchema, - }, - aibiDashboardEmbeddingApprovedDomains: { - wire: 'aibi_dashboard_embedding_approved_domains', - children: () => aibiDashboardEmbeddingApprovedDomainsFieldMaskSchema, - }, - automaticClusterUpdateWorkspace: { - wire: 'automatic_cluster_update_workspace', - children: () => clusterAutoRestartMessageFieldMaskSchema, - }, - booleanVal: { - wire: 'boolean_val', - children: () => booleanMessageFieldMaskSchema, - }, - effectiveAibiDashboardEmbeddingAccessPolicy: { - wire: 'effective_aibi_dashboard_embedding_access_policy', - children: () => aibiDashboardEmbeddingAccessPolicyFieldMaskSchema, - }, - effectiveAibiDashboardEmbeddingApprovedDomains: { - wire: 'effective_aibi_dashboard_embedding_approved_domains', - children: () => aibiDashboardEmbeddingApprovedDomainsFieldMaskSchema, - }, - effectiveAutomaticClusterUpdateWorkspace: { - wire: 'effective_automatic_cluster_update_workspace', - children: () => clusterAutoRestartMessageFieldMaskSchema, - }, - effectiveBooleanVal: { - wire: 'effective_boolean_val', - children: () => booleanMessageFieldMaskSchema, - }, - effectiveIntegerVal: { - wire: 'effective_integer_val', - children: () => integerMessageFieldMaskSchema, - }, - effectivePersonalCompute: { - wire: 'effective_personal_compute', - children: () => personalComputeMessageFieldMaskSchema, - }, - effectiveRestrictWorkspaceAdmins: { - wire: 'effective_restrict_workspace_admins', - children: () => restrictWorkspaceAdminsMessageFieldMaskSchema, - }, - effectiveStringVal: { - wire: 'effective_string_val', - children: () => stringMessageFieldMaskSchema, - }, - integerVal: { - wire: 'integer_val', - children: () => integerMessageFieldMaskSchema, - }, - name: {wire: 'name'}, - personalCompute: { - wire: 'personal_compute', - children: () => personalComputeMessageFieldMaskSchema, - }, - restrictWorkspaceAdmins: { - wire: 'restrict_workspace_admins', - children: () => restrictWorkspaceAdminsMessageFieldMaskSchema, - }, - stringVal: {wire: 'string_val', children: () => stringMessageFieldMaskSchema}, -}; - -export function settingFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, settingFieldMaskSchema); -} - -const settingsMetadataFieldMaskSchema: FieldMaskSchema = { - description: {wire: 'description'}, - displayName: {wire: 'display_name'}, - docsLink: {wire: 'docs_link'}, - name: {wire: 'name'}, - previewPhase: {wire: 'preview_phase'}, - type: {wire: 'type'}, -}; - -export function settingsMetadataFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - settingsMetadataFieldMaskSchema - ); -} - -const stringMessageFieldMaskSchema: FieldMaskSchema = { - value: {wire: 'value'}, -}; - -export function stringMessageFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, stringMessageFieldMaskSchema); -} - -const userPreferenceFieldMaskSchema: FieldMaskSchema = { - booleanVal: { - wire: 'boolean_val', - children: () => booleanMessageFieldMaskSchema, - }, - effectiveBooleanVal: { - wire: 'effective_boolean_val', - children: () => booleanMessageFieldMaskSchema, - }, - effectiveStringVal: { - wire: 'effective_string_val', - children: () => stringMessageFieldMaskSchema, - }, - name: {wire: 'name'}, - stringVal: {wire: 'string_val', children: () => stringMessageFieldMaskSchema}, - userId: {wire: 'user_id'}, -}; - -export function userPreferenceFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, userPreferenceFieldMaskSchema); -} diff --git a/packages/statementexecution/src/v1/model.ts b/packages/statementexecution/src/v1/model.ts index 59c26b97..4efce139 100644 --- a/packages/statementexecution/src/v1/model.ts +++ b/packages/statementexecution/src/v1/model.ts @@ -1,7 +1,6 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema, JsonValue} from '@databricks/sdk-core/wkt'; +import type {JsonValue} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; const jsonValueSchema: z.ZodType = z.lazy(() => @@ -523,15 +522,6 @@ export interface StatementStatus { sqlState?: string | undefined; } -export const unmarshalCancelStatementRequestSchema: z.ZodType = - z - .object({ - statement_id: z.string().optional(), - }) - .transform(d => ({ - statementId: d.statement_id, - })); - export const unmarshalCancelStatementResponseSchema: z.ZodType = z.object({}); @@ -573,39 +563,6 @@ export const unmarshalColumnInfoSchema: z.ZodType = z typeIntervalType: d.type_interval_type, })); -export const unmarshalExecuteStatementRequestSchema: z.ZodType = - z - .object({ - statement: z.string().optional(), - warehouse_id: z.string().optional(), - catalog: z.string().optional(), - schema: z.string().optional(), - row_limit: z.number().optional(), - byte_limit: z.number().optional(), - format: z.enum(Format).optional(), - disposition: z.enum(Disposition).optional(), - wait_timeout: z.string().optional(), - on_wait_timeout: z.enum(TimeoutAction).optional(), - parameters: z - .array(z.lazy(() => unmarshalStatementParameterSchema)) - .optional(), - query_tags: z.array(z.lazy(() => unmarshalQueryTagSchema)).optional(), - }) - .transform(d => ({ - statement: d.statement, - warehouseId: d.warehouse_id, - catalog: d.catalog, - schema: d.schema, - rowLimit: d.row_limit, - byteLimit: d.byte_limit, - format: d.format, - disposition: d.disposition, - waitTimeout: d.wait_timeout, - onWaitTimeout: d.on_wait_timeout, - parameters: d.parameters, - queryTags: d.query_tags, - })); - export const unmarshalExternalLinkSchema: z.ZodType = z .object({ external_link: z.string().optional(), @@ -630,16 +587,6 @@ export const unmarshalExternalLinkSchema: z.ZodType = z nextChunkInternalLink: d.next_chunk_internal_link, })); -export const unmarshalQueryTagSchema: z.ZodType = z - .object({ - key: z.string().optional(), - value: z.string().optional(), - }) - .transform(d => ({ - key: d.key, - value: d.value, - })); - export const unmarshalResultDataSchema: z.ZodType = z .object({ external_links: z @@ -704,19 +651,6 @@ export const unmarshalServiceErrorSchema: z.ZodType = z message: d.message, })); -export const unmarshalStatementParameterSchema: z.ZodType = - z - .object({ - name: z.string().optional(), - value: z.string().optional(), - type: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - value: d.value, - type: d.type, - })); - export const unmarshalStatementResponseSchema: z.ZodType = z .object({ statement_id: z.string().optional(), @@ -751,46 +685,6 @@ export const marshalCancelStatementRequestSchema: z.ZodType = z statement_id: d.statementId, })); -export const marshalCancelStatementResponseSchema: z.ZodType = z.object({}); - -export const marshalChunkInfoSchema: z.ZodType = z - .object({ - chunkIndex: z.number().optional(), - rowOffset: z.number().optional(), - rowCount: z.number().optional(), - byteCount: z.number().optional(), - nextChunkIndex: z.number().optional(), - nextChunkInternalLink: z.string().optional(), - }) - .transform(d => ({ - chunk_index: d.chunkIndex, - row_offset: d.rowOffset, - row_count: d.rowCount, - byte_count: d.byteCount, - next_chunk_index: d.nextChunkIndex, - next_chunk_internal_link: d.nextChunkInternalLink, - })); - -export const marshalColumnInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - typeText: z.string().optional(), - typeName: z.enum(ColumnTypeName).optional(), - position: z.number().optional(), - typePrecision: z.number().optional(), - typeScale: z.number().optional(), - typeIntervalType: z.string().optional(), - }) - .transform(d => ({ - name: d.name, - type_text: d.typeText, - type_name: d.typeName, - position: d.position, - type_precision: d.typePrecision, - type_scale: d.typeScale, - type_interval_type: d.typeIntervalType, - })); - export const marshalExecuteStatementRequestSchema: z.ZodType = z .object({ statement: z.string().optional(), @@ -823,30 +717,6 @@ export const marshalExecuteStatementRequestSchema: z.ZodType = z query_tags: d.queryTags, })); -export const marshalExternalLinkSchema: z.ZodType = z - .object({ - externalLink: z.string().optional(), - expiration: z.string().optional(), - httpHeaders: z.record(z.string(), z.string()).optional(), - chunkIndex: z.number().optional(), - rowOffset: z.number().optional(), - rowCount: z.number().optional(), - byteCount: z.number().optional(), - nextChunkIndex: z.number().optional(), - nextChunkInternalLink: z.string().optional(), - }) - .transform(d => ({ - external_link: d.externalLink, - expiration: d.expiration, - http_headers: d.httpHeaders, - chunk_index: d.chunkIndex, - row_offset: d.rowOffset, - row_count: d.rowCount, - byte_count: d.byteCount, - next_chunk_index: d.nextChunkIndex, - next_chunk_internal_link: d.nextChunkInternalLink, - })); - export const marshalQueryTagSchema: z.ZodType = z .object({ key: z.string().optional(), @@ -857,68 +727,6 @@ export const marshalQueryTagSchema: z.ZodType = z value: d.value, })); -export const marshalResultDataSchema: z.ZodType = z - .object({ - externalLinks: z.array(z.lazy(() => marshalExternalLinkSchema)).optional(), - dataArray: z.array(z.array(jsonValueSchema)).optional(), - chunkIndex: z.number().optional(), - rowOffset: z.number().optional(), - rowCount: z.number().optional(), - byteCount: z.number().optional(), - nextChunkIndex: z.number().optional(), - nextChunkInternalLink: z.string().optional(), - }) - .transform(d => ({ - external_links: d.externalLinks, - data_array: d.dataArray, - chunk_index: d.chunkIndex, - row_offset: d.rowOffset, - row_count: d.rowCount, - byte_count: d.byteCount, - next_chunk_index: d.nextChunkIndex, - next_chunk_internal_link: d.nextChunkInternalLink, - })); - -export const marshalResultManifestSchema: z.ZodType = z - .object({ - format: z.enum(Format).optional(), - schema: z.lazy(() => marshalSchemaSchema).optional(), - totalChunkCount: z.number().optional(), - chunks: z.array(z.lazy(() => marshalChunkInfoSchema)).optional(), - totalRowCount: z.number().optional(), - totalByteCount: z.number().optional(), - truncated: z.boolean().optional(), - }) - .transform(d => ({ - format: d.format, - schema: d.schema, - total_chunk_count: d.totalChunkCount, - chunks: d.chunks, - total_row_count: d.totalRowCount, - total_byte_count: d.totalByteCount, - truncated: d.truncated, - })); - -export const marshalSchemaSchema: z.ZodType = z - .object({ - columnCount: z.number().optional(), - columns: z.array(z.lazy(() => marshalColumnInfoSchema)).optional(), - }) - .transform(d => ({ - column_count: d.columnCount, - columns: d.columns, - })); - -export const marshalServiceErrorSchema: z.ZodType = z - .object({ - errorCode: z.enum(ServiceErrorCode).optional(), - message: z.string().optional(), - }) - .transform(d => ({ - error_code: d.errorCode, - message: d.message, - })); - export const marshalStatementParameterSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -930,271 +738,3 @@ export const marshalStatementParameterSchema: z.ZodType = z value: d.value, type: d.type, })); - -export const marshalStatementResponseSchema: z.ZodType = z - .object({ - statementId: z.string().optional(), - status: z.lazy(() => marshalStatementStatusSchema).optional(), - manifest: z.lazy(() => marshalResultManifestSchema).optional(), - result: z.lazy(() => marshalResultDataSchema).optional(), - }) - .transform(d => ({ - statement_id: d.statementId, - status: d.status, - manifest: d.manifest, - result: d.result, - })); - -export const marshalStatementStatusSchema: z.ZodType = z - .object({ - state: z.enum(StatementStatus_State).optional(), - error: z.lazy(() => marshalServiceErrorSchema).optional(), - sqlState: z.string().optional(), - }) - .transform(d => ({ - state: d.state, - error: d.error, - sql_state: d.sqlState, - })); - -const cancelStatementRequestFieldMaskSchema: FieldMaskSchema = { - statementId: {wire: 'statement_id'}, -}; - -export function cancelStatementRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - cancelStatementRequestFieldMaskSchema - ); -} - -const cancelStatementResponseFieldMaskSchema: FieldMaskSchema = {}; - -export function cancelStatementResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - cancelStatementResponseFieldMaskSchema - ); -} - -const chunkInfoFieldMaskSchema: FieldMaskSchema = { - byteCount: {wire: 'byte_count'}, - chunkIndex: {wire: 'chunk_index'}, - nextChunkIndex: {wire: 'next_chunk_index'}, - nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, - rowCount: {wire: 'row_count'}, - rowOffset: {wire: 'row_offset'}, -}; - -export function chunkInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, chunkInfoFieldMaskSchema); -} - -const columnInfoFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - position: {wire: 'position'}, - typeIntervalType: {wire: 'type_interval_type'}, - typeName: {wire: 'type_name'}, - typePrecision: {wire: 'type_precision'}, - typeScale: {wire: 'type_scale'}, - typeText: {wire: 'type_text'}, -}; - -export function columnInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, columnInfoFieldMaskSchema); -} - -const executeStatementRequestFieldMaskSchema: FieldMaskSchema = { - byteLimit: {wire: 'byte_limit'}, - catalog: {wire: 'catalog'}, - disposition: {wire: 'disposition'}, - format: {wire: 'format'}, - onWaitTimeout: {wire: 'on_wait_timeout'}, - parameters: {wire: 'parameters'}, - queryTags: {wire: 'query_tags'}, - rowLimit: {wire: 'row_limit'}, - schema: {wire: 'schema'}, - statement: {wire: 'statement'}, - waitTimeout: {wire: 'wait_timeout'}, - warehouseId: {wire: 'warehouse_id'}, -}; - -export function executeStatementRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - executeStatementRequestFieldMaskSchema - ); -} - -const externalLinkFieldMaskSchema: FieldMaskSchema = { - byteCount: {wire: 'byte_count'}, - chunkIndex: {wire: 'chunk_index'}, - expiration: {wire: 'expiration'}, - externalLink: {wire: 'external_link'}, - httpHeaders: {wire: 'http_headers'}, - nextChunkIndex: {wire: 'next_chunk_index'}, - nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, - rowCount: {wire: 'row_count'}, - rowOffset: {wire: 'row_offset'}, -}; - -export function externalLinkFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, externalLinkFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const externalLink_HttpHeadersEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function externalLink_HttpHeadersEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - externalLink_HttpHeadersEntryFieldMaskSchema - ); -} - -const getResultDataRequestFieldMaskSchema: FieldMaskSchema = { - chunkIndex: {wire: 'chunk_index'}, - statementId: {wire: 'statement_id'}, -}; - -export function getResultDataRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getResultDataRequestFieldMaskSchema - ); -} - -const getStatementResultRequestFieldMaskSchema: FieldMaskSchema = { - statementId: {wire: 'statement_id'}, -}; - -export function getStatementResultRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getStatementResultRequestFieldMaskSchema - ); -} - -const queryTagFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -export function queryTagFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, queryTagFieldMaskSchema); -} - -const resultDataFieldMaskSchema: FieldMaskSchema = { - byteCount: {wire: 'byte_count'}, - chunkIndex: {wire: 'chunk_index'}, - dataArray: {wire: 'data_array'}, - externalLinks: {wire: 'external_links'}, - nextChunkIndex: {wire: 'next_chunk_index'}, - nextChunkInternalLink: {wire: 'next_chunk_internal_link'}, - rowCount: {wire: 'row_count'}, - rowOffset: {wire: 'row_offset'}, -}; - -export function resultDataFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, resultDataFieldMaskSchema); -} - -const resultManifestFieldMaskSchema: FieldMaskSchema = { - chunks: {wire: 'chunks'}, - format: {wire: 'format'}, - schema: {wire: 'schema', children: () => schemaFieldMaskSchema}, - totalByteCount: {wire: 'total_byte_count'}, - totalChunkCount: {wire: 'total_chunk_count'}, - totalRowCount: {wire: 'total_row_count'}, - truncated: {wire: 'truncated'}, -}; - -export function resultManifestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, resultManifestFieldMaskSchema); -} - -const schemaFieldMaskSchema: FieldMaskSchema = { - columnCount: {wire: 'column_count'}, - columns: {wire: 'columns'}, -}; - -export function schemaFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, schemaFieldMaskSchema); -} - -const serviceErrorFieldMaskSchema: FieldMaskSchema = { - errorCode: {wire: 'error_code'}, - message: {wire: 'message'}, -}; - -export function serviceErrorFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, serviceErrorFieldMaskSchema); -} - -const statementParameterFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, - type: {wire: 'type'}, - value: {wire: 'value'}, -}; - -export function statementParameterFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - statementParameterFieldMaskSchema - ); -} - -const statementResponseFieldMaskSchema: FieldMaskSchema = { - manifest: {wire: 'manifest', children: () => resultManifestFieldMaskSchema}, - result: {wire: 'result', children: () => resultDataFieldMaskSchema}, - statementId: {wire: 'statement_id'}, - status: {wire: 'status', children: () => statementStatusFieldMaskSchema}, -}; - -export function statementResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - statementResponseFieldMaskSchema - ); -} - -const statementStatusFieldMaskSchema: FieldMaskSchema = { - error: {wire: 'error', children: () => serviceErrorFieldMaskSchema}, - sqlState: {wire: 'sql_state'}, - state: {wire: 'state'}, -}; - -export function statementStatusFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - statementStatusFieldMaskSchema - ); -} diff --git a/packages/systemschemas/src/v1/model.ts b/packages/systemschemas/src/v1/model.ts index 98a5b3f5..5056561d 100644 --- a/packages/systemschemas/src/v1/model.ts +++ b/packages/systemschemas/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface DisableSystemSchema { @@ -66,19 +64,6 @@ export interface SystemSchemaInfo { export const unmarshalDisableSystemSchema_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalEnableSystemSchemaSchema: z.ZodType = - z - .object({ - schema: z.string().optional(), - metastore_id: z.string().optional(), - catalog_name: z.string().optional(), - }) - .transform(d => ({ - schema: d.schema, - metastoreId: d.metastore_id, - catalogName: d.catalog_name, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalEnableSystemSchema_ResponseSchema: z.ZodType = z.object({}); @@ -107,11 +92,6 @@ export const unmarshalSystemSchemaInfoSchema: z.ZodType = z state: d.state, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDisableSystemSchema_ResponseSchema: z.ZodType = z.object( - {} -); - export const marshalEnableSystemSchemaSchema: z.ZodType = z .object({ schema: z.string().optional(), @@ -123,127 +103,3 @@ export const marshalEnableSystemSchemaSchema: z.ZodType = z metastore_id: d.metastoreId, catalog_name: d.catalogName, })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalEnableSystemSchema_ResponseSchema: z.ZodType = z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListSystemSchemas_ResponseSchema: z.ZodType = z - .object({ - schemas: z.array(z.lazy(() => marshalSystemSchemaInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - schemas: d.schemas, - next_page_token: d.nextPageToken, - })); - -export const marshalSystemSchemaInfoSchema: z.ZodType = z - .object({ - schema: z.string(), - state: z.string(), - }) - .transform(d => ({ - schema: d.schema, - state: d.state, - })); - -const disableSystemSchemaFieldMaskSchema: FieldMaskSchema = { - metastoreId: {wire: 'metastore_id'}, - schema: {wire: 'schema'}, -}; - -export function disableSystemSchemaFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - disableSystemSchemaFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const disableSystemSchema_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function disableSystemSchema_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - disableSystemSchema_ResponseFieldMaskSchema - ); -} - -const enableSystemSchemaFieldMaskSchema: FieldMaskSchema = { - catalogName: {wire: 'catalog_name'}, - metastoreId: {wire: 'metastore_id'}, - schema: {wire: 'schema'}, -}; - -export function enableSystemSchemaFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - enableSystemSchemaFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const enableSystemSchema_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function enableSystemSchema_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - enableSystemSchema_ResponseFieldMaskSchema - ); -} - -const listSystemSchemasFieldMaskSchema: FieldMaskSchema = { - maxResults: {wire: 'max_results'}, - metastoreId: {wire: 'metastore_id'}, - pageToken: {wire: 'page_token'}, -}; - -export function listSystemSchemasFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listSystemSchemasFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listSystemSchemas_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - schemas: {wire: 'schemas'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listSystemSchemas_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listSystemSchemas_ResponseFieldMaskSchema - ); -} - -const systemSchemaInfoFieldMaskSchema: FieldMaskSchema = { - schema: {wire: 'schema'}, - state: {wire: 'state'}, -}; - -export function systemSchemaInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - systemSchemaInfoFieldMaskSchema - ); -} diff --git a/packages/tables/src/v1/model.ts b/packages/tables/src/v1/model.ts index 4324572b..f4437922 100644 --- a/packages/tables/src/v1/model.ts +++ b/packages/tables/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum ColumnTypeName { @@ -969,100 +967,6 @@ export const unmarshalConnectionDependencySchema: z.ZodType = z - .object({ - name: z.string().optional(), - catalog_name: z.string().optional(), - schema_name: z.string().optional(), - table_type: z.enum(TableType).optional(), - data_source_format: z.enum(DataSourceFormat).optional(), - storage_location: z.string().optional(), - view_definition: z.string().optional(), - view_dependencies: z.lazy(() => unmarshalDependencyListSchema).optional(), - sql_path: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storage_credential_name: z.string().optional(), - table_constraints: z - .array(z.lazy(() => unmarshalTableConstraintSchema)) - .optional(), - row_filter: z.lazy(() => unmarshalRowFilterSchema).optional(), - pipeline_id: z.string().optional(), - enable_predictive_optimization: z.string().optional(), - metastore_id: z.string().optional(), - full_name: z.string().optional(), - data_access_configuration_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - table_id: z.string().optional(), - delta_runtime_properties_kvpairs: z - .lazy(() => unmarshalDeltaRuntimePropertiesKvPairsSchema) - .optional(), - deleted_at: z.number().optional(), - effective_predictive_optimization_flag: z - .lazy(() => unmarshalEffectivePredictiveOptimizationFlagSchema) - .optional(), - access_point: z.string().optional(), - browse_only: z.boolean().optional(), - encryption_details: z - .lazy(() => unmarshalEncryptionDetailsSchema) - .optional(), - securable_kind_manifest: z - .lazy(() => unmarshalSecurableKindManifestSchema) - .optional(), - columns: z.array(z.lazy(() => unmarshalColumnInfoSchema)).optional(), - properties: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - name: d.name, - catalogName: d.catalog_name, - schemaName: d.schema_name, - tableType: d.table_type, - dataSourceFormat: d.data_source_format, - storageLocation: d.storage_location, - viewDefinition: d.view_definition, - viewDependencies: d.view_dependencies, - sqlPath: d.sql_path, - owner: d.owner, - comment: d.comment, - storageCredentialName: d.storage_credential_name, - tableConstraints: d.table_constraints, - rowFilter: d.row_filter, - pipelineId: d.pipeline_id, - enablePredictiveOptimization: d.enable_predictive_optimization, - metastoreId: d.metastore_id, - fullName: d.full_name, - dataAccessConfigurationId: d.data_access_configuration_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - tableId: d.table_id, - deltaRuntimePropertiesKvpairs: d.delta_runtime_properties_kvpairs, - deletedAt: d.deleted_at, - effectivePredictiveOptimizationFlag: - d.effective_predictive_optimization_flag, - accessPoint: d.access_point, - browseOnly: d.browse_only, - encryptionDetails: d.encryption_details, - securableKindManifest: d.securable_kind_manifest, - columns: d.columns, - properties: d.properties, - })); - -export const unmarshalCreateTableConstraintSchema: z.ZodType = - z - .object({ - full_name_arg: z.string().optional(), - constraint: z.lazy(() => unmarshalTableConstraintSchema).optional(), - }) - .transform(d => ({ - fullNameArg: d.full_name_arg, - constraint: d.constraint, - })); - export const unmarshalCredentialDependencySchema: z.ZodType = z .object({ @@ -1444,91 +1348,6 @@ export const unmarshalTableSummarySchema: z.ZodType = z securableKindManifest: d.securable_kind_manifest, })); -export const unmarshalUpdateTableSchema: z.ZodType = z - .object({ - full_name_arg: z.string().optional(), - name: z.string().optional(), - catalog_name: z.string().optional(), - schema_name: z.string().optional(), - table_type: z.enum(TableType).optional(), - data_source_format: z.enum(DataSourceFormat).optional(), - storage_location: z.string().optional(), - view_definition: z.string().optional(), - view_dependencies: z.lazy(() => unmarshalDependencyListSchema).optional(), - sql_path: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storage_credential_name: z.string().optional(), - table_constraints: z - .array(z.lazy(() => unmarshalTableConstraintSchema)) - .optional(), - row_filter: z.lazy(() => unmarshalRowFilterSchema).optional(), - pipeline_id: z.string().optional(), - enable_predictive_optimization: z.string().optional(), - metastore_id: z.string().optional(), - full_name: z.string().optional(), - data_access_configuration_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - table_id: z.string().optional(), - delta_runtime_properties_kvpairs: z - .lazy(() => unmarshalDeltaRuntimePropertiesKvPairsSchema) - .optional(), - deleted_at: z.number().optional(), - effective_predictive_optimization_flag: z - .lazy(() => unmarshalEffectivePredictiveOptimizationFlagSchema) - .optional(), - access_point: z.string().optional(), - browse_only: z.boolean().optional(), - encryption_details: z - .lazy(() => unmarshalEncryptionDetailsSchema) - .optional(), - securable_kind_manifest: z - .lazy(() => unmarshalSecurableKindManifestSchema) - .optional(), - columns: z.array(z.lazy(() => unmarshalColumnInfoSchema)).optional(), - properties: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - fullNameArg: d.full_name_arg, - name: d.name, - catalogName: d.catalog_name, - schemaName: d.schema_name, - tableType: d.table_type, - dataSourceFormat: d.data_source_format, - storageLocation: d.storage_location, - viewDefinition: d.view_definition, - viewDependencies: d.view_dependencies, - sqlPath: d.sql_path, - owner: d.owner, - comment: d.comment, - storageCredentialName: d.storage_credential_name, - tableConstraints: d.table_constraints, - rowFilter: d.row_filter, - pipelineId: d.pipeline_id, - enablePredictiveOptimization: d.enable_predictive_optimization, - metastoreId: d.metastore_id, - fullName: d.full_name, - dataAccessConfigurationId: d.data_access_configuration_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - tableId: d.table_id, - deltaRuntimePropertiesKvpairs: d.delta_runtime_properties_kvpairs, - deletedAt: d.deleted_at, - effectivePredictiveOptimizationFlag: - d.effective_predictive_optimization_flag, - accessPoint: d.access_point, - browseOnly: d.browse_only, - encryptionDetails: d.encryption_details, - securableKindManifest: d.securable_kind_manifest, - columns: d.columns, - properties: d.properties, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalUpdateTable_ResponseSchema: z.ZodType = z.object({}); @@ -1702,14 +1521,6 @@ export const marshalCredentialDependencySchema: z.ZodType = z credential_name: d.credentialName, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteTable_ResponseSchema: z.ZodType = z.object({}); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteTableConstraint_ResponseSchema: z.ZodType = z.object( - {} -); - export const marshalDeltaRuntimePropertiesKvPairsSchema: z.ZodType = z .object({ deltaRuntimeProperties: z.record(z.string(), z.string()).optional(), @@ -1790,28 +1601,6 @@ export const marshalFunctionDependencySchema: z.ZodType = z function_full_name: d.functionFullName, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListTableSummaries_ResponseSchema: z.ZodType = z - .object({ - tables: z.array(z.lazy(() => marshalTableSummarySchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - tables: d.tables, - next_page_token: d.nextPageToken, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListTables_ResponseSchema: z.ZodType = z - .object({ - tables: z.array(z.lazy(() => marshalTableInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - tables: d.tables, - next_page_token: d.nextPageToken, - })); - export const marshalNamedTableConstraintSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -1956,110 +1745,6 @@ export const marshalTableDependencySchema: z.ZodType = z table_full_name: d.tableFullName, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalTableExists_ResponseSchema: z.ZodType = z - .object({ - tableExists: z.boolean().optional(), - }) - .transform(d => ({ - table_exists: d.tableExists, - })); - -export const marshalTableInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - catalogName: z.string().optional(), - schemaName: z.string().optional(), - tableType: z.enum(TableType).optional(), - dataSourceFormat: z.enum(DataSourceFormat).optional(), - storageLocation: z.string().optional(), - viewDefinition: z.string().optional(), - viewDependencies: z.lazy(() => marshalDependencyListSchema).optional(), - sqlPath: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - storageCredentialName: z.string().optional(), - tableConstraints: z - .array(z.lazy(() => marshalTableConstraintSchema)) - .optional(), - rowFilter: z.lazy(() => marshalRowFilterSchema).optional(), - pipelineId: z.string().optional(), - enablePredictiveOptimization: z.string().optional(), - metastoreId: z.string().optional(), - fullName: z.string().optional(), - dataAccessConfigurationId: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - tableId: z.string().optional(), - deltaRuntimePropertiesKvpairs: z - .lazy(() => marshalDeltaRuntimePropertiesKvPairsSchema) - .optional(), - deletedAt: z.number().optional(), - effectivePredictiveOptimizationFlag: z - .lazy(() => marshalEffectivePredictiveOptimizationFlagSchema) - .optional(), - accessPoint: z.string().optional(), - browseOnly: z.boolean().optional(), - encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(), - securableKindManifest: z - .lazy(() => marshalSecurableKindManifestSchema) - .optional(), - columns: z.array(z.lazy(() => marshalColumnInfoSchema)).optional(), - properties: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - name: d.name, - catalog_name: d.catalogName, - schema_name: d.schemaName, - table_type: d.tableType, - data_source_format: d.dataSourceFormat, - storage_location: d.storageLocation, - view_definition: d.viewDefinition, - view_dependencies: d.viewDependencies, - sql_path: d.sqlPath, - owner: d.owner, - comment: d.comment, - storage_credential_name: d.storageCredentialName, - table_constraints: d.tableConstraints, - row_filter: d.rowFilter, - pipeline_id: d.pipelineId, - enable_predictive_optimization: d.enablePredictiveOptimization, - metastore_id: d.metastoreId, - full_name: d.fullName, - data_access_configuration_id: d.dataAccessConfigurationId, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - table_id: d.tableId, - delta_runtime_properties_kvpairs: d.deltaRuntimePropertiesKvpairs, - deleted_at: d.deletedAt, - effective_predictive_optimization_flag: - d.effectivePredictiveOptimizationFlag, - access_point: d.accessPoint, - browse_only: d.browseOnly, - encryption_details: d.encryptionDetails, - securable_kind_manifest: d.securableKindManifest, - columns: d.columns, - properties: d.properties, - })); - -export const marshalTableSummarySchema: z.ZodType = z - .object({ - fullName: z.string().optional(), - tableType: z.enum(TableType).optional(), - securableKindManifest: z - .lazy(() => marshalSecurableKindManifestSchema) - .optional(), - }) - .transform(d => ({ - full_name: d.fullName, - table_type: d.tableType, - securable_kind_manifest: d.securableKindManifest, - })); - export const marshalUpdateTableSchema: z.ZodType = z .object({ fullNameArg: z.string().optional(), @@ -2143,9 +1828,6 @@ export const marshalUpdateTableSchema: z.ZodType = z properties: d.properties, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalUpdateTable_ResponseSchema: z.ZodType = z.object({}); - export const marshalVolumeDependencySchema: z.ZodType = z .object({ volumeFullName: z.string().optional(), @@ -2153,783 +1835,3 @@ export const marshalVolumeDependencySchema: z.ZodType = z .transform(d => ({ volume_full_name: d.volumeFullName, })); - -const columnInfoFieldMaskSchema: FieldMaskSchema = { - comment: {wire: 'comment'}, - mask: {wire: 'mask', children: () => columnMaskFieldMaskSchema}, - name: {wire: 'name'}, - nullable: {wire: 'nullable'}, - partitionIndex: {wire: 'partition_index'}, - position: {wire: 'position'}, - typeIntervalType: {wire: 'type_interval_type'}, - typeJson: {wire: 'type_json'}, - typeName: {wire: 'type_name'}, - typePrecision: {wire: 'type_precision'}, - typeScale: {wire: 'type_scale'}, - typeText: {wire: 'type_text'}, -}; - -export function columnInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, columnInfoFieldMaskSchema); -} - -const columnMaskFieldMaskSchema: FieldMaskSchema = { - functionName: {wire: 'function_name'}, - usingArguments: {wire: 'using_arguments'}, - usingColumnNames: {wire: 'using_column_names'}, -}; - -export function columnMaskFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, columnMaskFieldMaskSchema); -} - -const conditionalDisplayFieldMaskSchema: FieldMaskSchema = { - dependsOnOption: {wire: 'depends_on_option'}, - hiddenWhenValues: {wire: 'hidden_when_values'}, -}; - -export function conditionalDisplayFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - conditionalDisplayFieldMaskSchema - ); -} - -const connectionDependencyFieldMaskSchema: FieldMaskSchema = { - connectionName: {wire: 'connection_name'}, -}; - -export function connectionDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - connectionDependencyFieldMaskSchema - ); -} - -const createTableFieldMaskSchema: FieldMaskSchema = { - accessPoint: {wire: 'access_point'}, - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - columns: {wire: 'columns'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - dataAccessConfigurationId: {wire: 'data_access_configuration_id'}, - dataSourceFormat: {wire: 'data_source_format'}, - deletedAt: {wire: 'deleted_at'}, - deltaRuntimePropertiesKvpairs: { - wire: 'delta_runtime_properties_kvpairs', - children: () => deltaRuntimePropertiesKvPairsFieldMaskSchema, - }, - effectivePredictiveOptimizationFlag: { - wire: 'effective_predictive_optimization_flag', - children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, - }, - enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, - encryptionDetails: { - wire: 'encryption_details', - children: () => encryptionDetailsFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - pipelineId: {wire: 'pipeline_id'}, - properties: {wire: 'properties'}, - rowFilter: {wire: 'row_filter', children: () => rowFilterFieldMaskSchema}, - schemaName: {wire: 'schema_name'}, - securableKindManifest: { - wire: 'securable_kind_manifest', - children: () => securableKindManifestFieldMaskSchema, - }, - sqlPath: {wire: 'sql_path'}, - storageCredentialName: {wire: 'storage_credential_name'}, - storageLocation: {wire: 'storage_location'}, - tableConstraints: {wire: 'table_constraints'}, - tableId: {wire: 'table_id'}, - tableType: {wire: 'table_type'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - viewDefinition: {wire: 'view_definition'}, - viewDependencies: { - wire: 'view_dependencies', - children: () => dependencyListFieldMaskSchema, - }, -}; - -export function createTableFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createTableFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createTable_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createTable_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createTable_PropertiesEntryFieldMaskSchema - ); -} - -const createTableConstraintFieldMaskSchema: FieldMaskSchema = { - constraint: { - wire: 'constraint', - children: () => tableConstraintFieldMaskSchema, - }, - fullNameArg: {wire: 'full_name_arg'}, -}; - -export function createTableConstraintFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createTableConstraintFieldMaskSchema - ); -} - -const credentialDependencyFieldMaskSchema: FieldMaskSchema = { - credentialName: {wire: 'credential_name'}, -}; - -export function credentialDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - credentialDependencyFieldMaskSchema - ); -} - -const deleteTableFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, -}; - -export function deleteTableFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deleteTableFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteTable_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteTable_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteTable_ResponseFieldMaskSchema - ); -} - -const deleteTableConstraintFieldMaskSchema: FieldMaskSchema = { - cascade: {wire: 'cascade'}, - constraintName: {wire: 'constraint_name'}, - fullNameArg: {wire: 'full_name_arg'}, -}; - -export function deleteTableConstraintFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteTableConstraintFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteTableConstraint_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteTableConstraint_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteTableConstraint_ResponseFieldMaskSchema - ); -} - -const deltaRuntimePropertiesKvPairsFieldMaskSchema: FieldMaskSchema = { - deltaRuntimeProperties: {wire: 'delta_runtime_properties'}, -}; - -export function deltaRuntimePropertiesKvPairsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deltaRuntimePropertiesKvPairsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deltaRuntimePropertiesKvPairs_DeltaRuntimePropertiesEntryFieldMaskSchema: FieldMaskSchema = - { - key: {wire: 'key'}, - value: {wire: 'value'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deltaRuntimePropertiesKvPairs_DeltaRuntimePropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deltaRuntimePropertiesKvPairs_DeltaRuntimePropertiesEntryFieldMaskSchema - ); -} - -const dependencyFieldMaskSchema: FieldMaskSchema = { - connection: { - wire: 'connection', - children: () => connectionDependencyFieldMaskSchema, - }, - credential: { - wire: 'credential', - children: () => credentialDependencyFieldMaskSchema, - }, - function: { - wire: 'function', - children: () => functionDependencyFieldMaskSchema, - }, - secret: {wire: 'secret', children: () => secretDependencyFieldMaskSchema}, - table: {wire: 'table', children: () => tableDependencyFieldMaskSchema}, - volume: {wire: 'volume', children: () => volumeDependencyFieldMaskSchema}, -}; - -export function dependencyFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, dependencyFieldMaskSchema); -} - -const dependencyListFieldMaskSchema: FieldMaskSchema = { - dependencies: {wire: 'dependencies'}, -}; - -export function dependencyListFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, dependencyListFieldMaskSchema); -} - -const effectivePredictiveOptimizationFlagFieldMaskSchema: FieldMaskSchema = { - inheritedFromName: {wire: 'inherited_from_name'}, - inheritedFromType: {wire: 'inherited_from_type'}, - value: {wire: 'value'}, -}; - -export function effectivePredictiveOptimizationFlagFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - effectivePredictiveOptimizationFlagFieldMaskSchema - ); -} - -const encryptionDetailsFieldMaskSchema: FieldMaskSchema = { - sseEncryptionDetails: { - wire: 'sse_encryption_details', - children: () => sseEncryptionDetailsFieldMaskSchema, - }, -}; - -export function encryptionDetailsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - encryptionDetailsFieldMaskSchema - ); -} - -const foreignKeyConstraintFieldMaskSchema: FieldMaskSchema = { - childColumns: {wire: 'child_columns'}, - name: {wire: 'name'}, - parentColumns: {wire: 'parent_columns'}, - parentTable: {wire: 'parent_table'}, - rely: {wire: 'rely'}, -}; - -export function foreignKeyConstraintFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - foreignKeyConstraintFieldMaskSchema - ); -} - -const functionDependencyFieldMaskSchema: FieldMaskSchema = { - functionFullName: {wire: 'function_full_name'}, -}; - -export function functionDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - functionDependencyFieldMaskSchema - ); -} - -const getTableFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, - includeBrowse: {wire: 'include_browse'}, - includeDeltaMetadata: {wire: 'include_delta_metadata'}, - includeManifestCapabilities: {wire: 'include_manifest_capabilities'}, -}; - -export function getTableFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getTableFieldMaskSchema); -} - -const listTableSummariesFieldMaskSchema: FieldMaskSchema = { - catalogName: {wire: 'catalog_name'}, - includeManifestCapabilities: {wire: 'include_manifest_capabilities'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, - schemaNamePattern: {wire: 'schema_name_pattern'}, - tableNamePattern: {wire: 'table_name_pattern'}, -}; - -export function listTableSummariesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTableSummariesFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listTableSummaries_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - tables: {wire: 'tables'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listTableSummaries_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTableSummaries_ResponseFieldMaskSchema - ); -} - -const listTablesFieldMaskSchema: FieldMaskSchema = { - catalogName: {wire: 'catalog_name'}, - includeBrowse: {wire: 'include_browse'}, - includeManifestCapabilities: {wire: 'include_manifest_capabilities'}, - maxResults: {wire: 'max_results'}, - omitColumns: {wire: 'omit_columns'}, - omitProperties: {wire: 'omit_properties'}, - omitUsername: {wire: 'omit_username'}, - pageToken: {wire: 'page_token'}, - schemaName: {wire: 'schema_name'}, -}; - -export function listTablesFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, listTablesFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listTables_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - tables: {wire: 'tables'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listTables_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTables_ResponseFieldMaskSchema - ); -} - -const namedTableConstraintFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function namedTableConstraintFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - namedTableConstraintFieldMaskSchema - ); -} - -const optionSpecFieldMaskSchema: FieldMaskSchema = { - allowedValues: {wire: 'allowed_values'}, - conditionalDisplay: { - wire: 'conditional_display', - children: () => conditionalDisplayFieldMaskSchema, - }, - defaultValue: {wire: 'default_value'}, - description: {wire: 'description'}, - hint: {wire: 'hint'}, - isCopiable: {wire: 'is_copiable'}, - isCreatable: {wire: 'is_creatable'}, - isHidden: {wire: 'is_hidden'}, - isLoggable: {wire: 'is_loggable'}, - isRequired: {wire: 'is_required'}, - isSecret: {wire: 'is_secret'}, - isUpdatable: {wire: 'is_updatable'}, - name: {wire: 'name'}, - oauthStage: {wire: 'oauth_stage'}, - type: {wire: 'type'}, -}; - -export function optionSpecFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, optionSpecFieldMaskSchema); -} - -const policyFunctionArgumentFieldMaskSchema: FieldMaskSchema = { - column: {wire: 'column'}, - constant: {wire: 'constant'}, -}; - -export function policyFunctionArgumentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - policyFunctionArgumentFieldMaskSchema - ); -} - -const primaryKeyConstraintFieldMaskSchema: FieldMaskSchema = { - childColumns: {wire: 'child_columns'}, - name: {wire: 'name'}, - rely: {wire: 'rely'}, - timeseriesColumns: {wire: 'timeseries_columns'}, -}; - -export function primaryKeyConstraintFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - primaryKeyConstraintFieldMaskSchema - ); -} - -const rowFilterFieldMaskSchema: FieldMaskSchema = { - functionName: {wire: 'function_name'}, - inputArguments: {wire: 'input_arguments'}, - inputColumnNames: {wire: 'input_column_names'}, -}; - -export function rowFilterFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, rowFilterFieldMaskSchema); -} - -const secretDependencyFieldMaskSchema: FieldMaskSchema = { - secretFullName: {wire: 'secret_full_name'}, -}; - -export function secretDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - secretDependencyFieldMaskSchema - ); -} - -const securableKindManifestFieldMaskSchema: FieldMaskSchema = { - assignablePrivileges: {wire: 'assignable_privileges'}, - capabilities: {wire: 'capabilities'}, - options: {wire: 'options'}, - securableKind: {wire: 'securable_kind'}, - securableType: {wire: 'securable_type'}, -}; - -export function securableKindManifestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - securableKindManifestFieldMaskSchema - ); -} - -const sseEncryptionDetailsFieldMaskSchema: FieldMaskSchema = { - algorithm: {wire: 'algorithm'}, - awsKmsKeyArn: {wire: 'aws_kms_key_arn'}, -}; - -export function sseEncryptionDetailsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - sseEncryptionDetailsFieldMaskSchema - ); -} - -const tableConstraintFieldMaskSchema: FieldMaskSchema = { - foreignKeyConstraint: { - wire: 'foreign_key_constraint', - children: () => foreignKeyConstraintFieldMaskSchema, - }, - namedTableConstraint: { - wire: 'named_table_constraint', - children: () => namedTableConstraintFieldMaskSchema, - }, - primaryKeyConstraint: { - wire: 'primary_key_constraint', - children: () => primaryKeyConstraintFieldMaskSchema, - }, -}; - -export function tableConstraintFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - tableConstraintFieldMaskSchema - ); -} - -const tableDependencyFieldMaskSchema: FieldMaskSchema = { - tableFullName: {wire: 'table_full_name'}, -}; - -export function tableDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - tableDependencyFieldMaskSchema - ); -} - -const tableExistsFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, -}; - -export function tableExistsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, tableExistsFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const tableExists_ResponseFieldMaskSchema: FieldMaskSchema = { - tableExists: {wire: 'table_exists'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function tableExists_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - tableExists_ResponseFieldMaskSchema - ); -} - -const tableInfoFieldMaskSchema: FieldMaskSchema = { - accessPoint: {wire: 'access_point'}, - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - columns: {wire: 'columns'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - dataAccessConfigurationId: {wire: 'data_access_configuration_id'}, - dataSourceFormat: {wire: 'data_source_format'}, - deletedAt: {wire: 'deleted_at'}, - deltaRuntimePropertiesKvpairs: { - wire: 'delta_runtime_properties_kvpairs', - children: () => deltaRuntimePropertiesKvPairsFieldMaskSchema, - }, - effectivePredictiveOptimizationFlag: { - wire: 'effective_predictive_optimization_flag', - children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, - }, - enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, - encryptionDetails: { - wire: 'encryption_details', - children: () => encryptionDetailsFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - pipelineId: {wire: 'pipeline_id'}, - properties: {wire: 'properties'}, - rowFilter: {wire: 'row_filter', children: () => rowFilterFieldMaskSchema}, - schemaName: {wire: 'schema_name'}, - securableKindManifest: { - wire: 'securable_kind_manifest', - children: () => securableKindManifestFieldMaskSchema, - }, - sqlPath: {wire: 'sql_path'}, - storageCredentialName: {wire: 'storage_credential_name'}, - storageLocation: {wire: 'storage_location'}, - tableConstraints: {wire: 'table_constraints'}, - tableId: {wire: 'table_id'}, - tableType: {wire: 'table_type'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - viewDefinition: {wire: 'view_definition'}, - viewDependencies: { - wire: 'view_dependencies', - children: () => dependencyListFieldMaskSchema, - }, -}; - -export function tableInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, tableInfoFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const tableInfo_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function tableInfo_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - tableInfo_PropertiesEntryFieldMaskSchema - ); -} - -const tableSummaryFieldMaskSchema: FieldMaskSchema = { - fullName: {wire: 'full_name'}, - securableKindManifest: { - wire: 'securable_kind_manifest', - children: () => securableKindManifestFieldMaskSchema, - }, - tableType: {wire: 'table_type'}, -}; - -export function tableSummaryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, tableSummaryFieldMaskSchema); -} - -const updateTableFieldMaskSchema: FieldMaskSchema = { - accessPoint: {wire: 'access_point'}, - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - columns: {wire: 'columns'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - dataAccessConfigurationId: {wire: 'data_access_configuration_id'}, - dataSourceFormat: {wire: 'data_source_format'}, - deletedAt: {wire: 'deleted_at'}, - deltaRuntimePropertiesKvpairs: { - wire: 'delta_runtime_properties_kvpairs', - children: () => deltaRuntimePropertiesKvPairsFieldMaskSchema, - }, - effectivePredictiveOptimizationFlag: { - wire: 'effective_predictive_optimization_flag', - children: () => effectivePredictiveOptimizationFlagFieldMaskSchema, - }, - enablePredictiveOptimization: {wire: 'enable_predictive_optimization'}, - encryptionDetails: { - wire: 'encryption_details', - children: () => encryptionDetailsFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - fullNameArg: {wire: 'full_name_arg'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - pipelineId: {wire: 'pipeline_id'}, - properties: {wire: 'properties'}, - rowFilter: {wire: 'row_filter', children: () => rowFilterFieldMaskSchema}, - schemaName: {wire: 'schema_name'}, - securableKindManifest: { - wire: 'securable_kind_manifest', - children: () => securableKindManifestFieldMaskSchema, - }, - sqlPath: {wire: 'sql_path'}, - storageCredentialName: {wire: 'storage_credential_name'}, - storageLocation: {wire: 'storage_location'}, - tableConstraints: {wire: 'table_constraints'}, - tableId: {wire: 'table_id'}, - tableType: {wire: 'table_type'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - viewDefinition: {wire: 'view_definition'}, - viewDependencies: { - wire: 'view_dependencies', - children: () => dependencyListFieldMaskSchema, - }, -}; - -export function updateTableFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, updateTableFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateTable_PropertiesEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateTable_PropertiesEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateTable_PropertiesEntryFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateTable_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateTable_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateTable_ResponseFieldMaskSchema - ); -} - -const volumeDependencyFieldMaskSchema: FieldMaskSchema = { - volumeFullName: {wire: 'volume_full_name'}, -}; - -export function volumeDependencyFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - volumeDependencyFieldMaskSchema - ); -} diff --git a/packages/tagassignments/src/v1/client.ts b/packages/tagassignments/src/v1/client.ts index 7d864cc8..fd5a38c3 100644 --- a/packages/tagassignments/src/v1/client.ts +++ b/packages/tagassignments/src/v1/client.ts @@ -169,7 +169,7 @@ export class Client { const url = `${this.host}/api/2.0/entity-tag-assignments/${req.tagAssignment?.entityType ?? ''}/${req.tagAssignment?.entityId ?? ''}/tags/${req.tagAssignment?.tagKey ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/tagassignments/src/v1/model.ts b/packages/tagassignments/src/v1/model.ts index a967bcd2..52eb60a2 100644 --- a/packages/tagassignments/src/v1/model.ts +++ b/packages/tagassignments/src/v1/model.ts @@ -56,7 +56,7 @@ export interface TagAssignment { export interface UpdateTagAssignmentRequest { tagAssignment?: TagAssignment | undefined; - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalListTagAssignmentsResponseSchema: z.ZodType = @@ -86,18 +86,6 @@ export const unmarshalTagAssignmentSchema: z.ZodType = z tagValue: d.tag_value, })); -export const marshalListTagAssignmentsResponseSchema: z.ZodType = z - .object({ - tagAssignments: z - .array(z.lazy(() => marshalTagAssignmentSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - tag_assignments: d.tagAssignments, - next_page_token: d.nextPageToken, - })); - export const marshalTagAssignmentSchema: z.ZodType = z .object({ entityType: z.string().optional(), @@ -112,82 +100,6 @@ export const marshalTagAssignmentSchema: z.ZodType = z tag_value: d.tagValue, })); -const createTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { - tagAssignment: { - wire: 'tag_assignment', - children: () => tagAssignmentFieldMaskSchema, - }, -}; - -export function createTagAssignmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createTagAssignmentRequestFieldMaskSchema - ); -} - -const deleteTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { - entityId: {wire: 'entity_id'}, - entityType: {wire: 'entity_type'}, - tagKey: {wire: 'tag_key'}, -}; - -export function deleteTagAssignmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteTagAssignmentRequestFieldMaskSchema - ); -} - -const getTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { - entityId: {wire: 'entity_id'}, - entityType: {wire: 'entity_type'}, - tagKey: {wire: 'tag_key'}, -}; - -export function getTagAssignmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getTagAssignmentRequestFieldMaskSchema - ); -} - -const listTagAssignmentsRequestFieldMaskSchema: FieldMaskSchema = { - entityId: {wire: 'entity_id'}, - entityType: {wire: 'entity_type'}, - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listTagAssignmentsRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTagAssignmentsRequestFieldMaskSchema - ); -} - -const listTagAssignmentsResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - tagAssignments: {wire: 'tag_assignments'}, -}; - -export function listTagAssignmentsResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTagAssignmentsResponseFieldMaskSchema - ); -} - const tagAssignmentFieldMaskSchema: FieldMaskSchema = { entityId: {wire: 'entity_id'}, entityType: {wire: 'entity_type'}, @@ -200,20 +112,3 @@ export function tagAssignmentFieldMask( ): FieldMask { return FieldMask.build(paths, tagAssignmentFieldMaskSchema); } - -const updateTagAssignmentRequestFieldMaskSchema: FieldMaskSchema = { - tagAssignment: { - wire: 'tag_assignment', - children: () => tagAssignmentFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateTagAssignmentRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateTagAssignmentRequestFieldMaskSchema - ); -} diff --git a/packages/tagpolicies/src/v1/client.ts b/packages/tagpolicies/src/v1/client.ts index 758f6551..85680052 100644 --- a/packages/tagpolicies/src/v1/client.ts +++ b/packages/tagpolicies/src/v1/client.ts @@ -169,7 +169,7 @@ export class Client { const url = `${this.host}/api/2.1/tag-policies/${req.tagPolicy?.tagKey ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; diff --git a/packages/tagpolicies/src/v1/model.ts b/packages/tagpolicies/src/v1/model.ts index 8400be3f..2f93e4b3 100644 --- a/packages/tagpolicies/src/v1/model.ts +++ b/packages/tagpolicies/src/v1/model.ts @@ -70,7 +70,7 @@ export interface TagPolicy { export interface UpdateTagPolicyRequest { tagPolicy?: TagPolicy | undefined; - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export interface Value { @@ -176,16 +176,6 @@ export const marshalDefaultValueOverridePolicySchema: z.ZodType = z default_value: d.defaultValue, })); -export const marshalListTagPoliciesResponseSchema: z.ZodType = z - .object({ - tagPolicies: z.array(z.lazy(() => marshalTagPolicySchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - tag_policies: d.tagPolicies, - next_page_token: d.nextPageToken, - })); - export const marshalPropagationConfigSchema: z.ZodType = z .object({ enabled: z.boolean().optional(), @@ -250,19 +240,6 @@ export function conflictResolutionPolicyFieldMask( ); } -const createTagPolicyRequestFieldMaskSchema: FieldMaskSchema = { - tagPolicy: {wire: 'tag_policy', children: () => tagPolicyFieldMaskSchema}, -}; - -export function createTagPolicyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createTagPolicyRequestFieldMaskSchema - ); -} - const defaultValueOverridePolicyFieldMaskSchema: FieldMaskSchema = { defaultValue: {wire: 'default_value'}, }; @@ -276,60 +253,6 @@ export function defaultValueOverridePolicyFieldMask( ); } -const deleteTagPolicyRequestFieldMaskSchema: FieldMaskSchema = { - tagKey: {wire: 'tag_key'}, -}; - -export function deleteTagPolicyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteTagPolicyRequestFieldMaskSchema - ); -} - -const getTagPolicyRequestFieldMaskSchema: FieldMaskSchema = { - tagKey: {wire: 'tag_key'}, -}; - -export function getTagPolicyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getTagPolicyRequestFieldMaskSchema - ); -} - -const listTagPoliciesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listTagPoliciesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTagPoliciesRequestFieldMaskSchema - ); -} - -const listTagPoliciesResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - tagPolicies: {wire: 'tag_policies'}, -}; - -export function listTagPoliciesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTagPoliciesResponseFieldMaskSchema - ); -} - const propagationConfigFieldMaskSchema: FieldMaskSchema = { conflictResolution: { wire: 'conflict_resolution', @@ -365,20 +288,6 @@ export function tagPolicyFieldMask(...paths: string[]): FieldMask { return FieldMask.build(paths, tagPolicyFieldMaskSchema); } -const updateTagPolicyRequestFieldMaskSchema: FieldMaskSchema = { - tagPolicy: {wire: 'tag_policy', children: () => tagPolicyFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateTagPolicyRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateTagPolicyRequestFieldMaskSchema - ); -} - const valueFieldMaskSchema: FieldMaskSchema = { name: {wire: 'name'}, }; diff --git a/packages/tokenmanagement/src/v1/model.ts b/packages/tokenmanagement/src/v1/model.ts index e97352d5..03668bab 100644 --- a/packages/tokenmanagement/src/v1/model.ts +++ b/packages/tokenmanagement/src/v1/model.ts @@ -118,7 +118,7 @@ export interface RevokeToken_Response {} export interface UpdateToken { token?: AdminTokenInfo | undefined; /** A list of field name under AdminTokenInfo, For example in request use {"update_mask": "comment,scopes"} */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } export const unmarshalAdminTokenInfoSchema: z.ZodType = z @@ -149,23 +149,6 @@ export const unmarshalAdminTokenInfoSchema: z.ZodType = z autoscopeState: d.autoscope_state, })); -export const unmarshalCreateOnBehalfOfTokenSchema: z.ZodType = - z - .object({ - application_id: z.string().optional(), - lifetime_seconds: z.number().optional(), - comment: z.string().optional(), - scopes: z.array(z.string()).optional(), - autoscope_enabled: z.boolean().optional(), - }) - .transform(d => ({ - applicationId: d.application_id, - lifetimeSeconds: d.lifetime_seconds, - comment: d.comment, - scopes: d.scopes, - autoscopeEnabled: d.autoscope_enabled, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreateOnBehalfOfToken_ResponseSchema: z.ZodType = z @@ -203,16 +186,6 @@ export const unmarshalListTokens_ResponseSchema: z.ZodType export const unmarshalRevokeToken_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalUpdateTokenSchema: z.ZodType = z - .object({ - token: z.lazy(() => unmarshalAdminTokenInfoSchema).optional(), - update_mask: z.string().optional(), - }) - .transform(d => ({ - token: d.token, - updateMask: d.update_mask, - })); - export const marshalAdminTokenInfoSchema: z.ZodType = z .object({ tokenId: z.string().optional(), @@ -257,42 +230,13 @@ export const marshalCreateOnBehalfOfTokenSchema: z.ZodType = z autoscope_enabled: d.autoscopeEnabled, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreateOnBehalfOfToken_ResponseSchema: z.ZodType = z - .object({ - tokenValue: z.string().optional(), - tokenInfo: z.lazy(() => marshalAdminTokenInfoSchema).optional(), - }) - .transform(d => ({ - token_value: d.tokenValue, - token_info: d.tokenInfo, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetToken_ResponseSchema: z.ZodType = z - .object({ - tokenInfo: z.lazy(() => marshalAdminTokenInfoSchema).optional(), - }) - .transform(d => ({ - token_info: d.tokenInfo, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListTokens_ResponseSchema: z.ZodType = z - .object({ - tokenInfos: z.array(z.lazy(() => marshalAdminTokenInfoSchema)).optional(), - }) - .transform(d => ({ - token_infos: d.tokenInfos, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalRevokeToken_ResponseSchema: z.ZodType = z.object({}); - export const marshalUpdateTokenSchema: z.ZodType = z .object({ token: z.lazy(() => marshalAdminTokenInfoSchema).optional(), - updateMask: z.string().optional(), + updateMask: z + .any() + .transform((m: FieldMask) => m.toString()) + .optional(), }) .transform(d => ({ token: d.token, @@ -318,123 +262,3 @@ export function adminTokenInfoFieldMask( ): FieldMask { return FieldMask.build(paths, adminTokenInfoFieldMaskSchema); } - -const createOnBehalfOfTokenFieldMaskSchema: FieldMaskSchema = { - applicationId: {wire: 'application_id'}, - autoscopeEnabled: {wire: 'autoscope_enabled'}, - comment: {wire: 'comment'}, - lifetimeSeconds: {wire: 'lifetime_seconds'}, - scopes: {wire: 'scopes'}, -}; - -export function createOnBehalfOfTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createOnBehalfOfTokenFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createOnBehalfOfToken_ResponseFieldMaskSchema: FieldMaskSchema = { - tokenInfo: { - wire: 'token_info', - children: () => adminTokenInfoFieldMaskSchema, - }, - tokenValue: {wire: 'token_value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createOnBehalfOfToken_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createOnBehalfOfToken_ResponseFieldMaskSchema - ); -} - -const getTokenFieldMaskSchema: FieldMaskSchema = { - tokenId: {wire: 'token_id'}, -}; - -export function getTokenFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getTokenFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getToken_ResponseFieldMaskSchema: FieldMaskSchema = { - tokenInfo: { - wire: 'token_info', - children: () => adminTokenInfoFieldMaskSchema, - }, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getToken_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getToken_ResponseFieldMaskSchema - ); -} - -const listTokensFieldMaskSchema: FieldMaskSchema = { - createdById: {wire: 'created_by_id'}, - createdByUsername: {wire: 'created_by_username'}, -}; - -export function listTokensFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, listTokensFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listTokens_ResponseFieldMaskSchema: FieldMaskSchema = { - tokenInfos: {wire: 'token_infos'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listTokens_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTokens_ResponseFieldMaskSchema - ); -} - -const revokeTokenFieldMaskSchema: FieldMaskSchema = { - tokenId: {wire: 'token_id'}, -}; - -export function revokeTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, revokeTokenFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const revokeToken_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function revokeToken_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - revokeToken_ResponseFieldMaskSchema - ); -} - -const updateTokenFieldMaskSchema: FieldMaskSchema = { - token: {wire: 'token', children: () => adminTokenInfoFieldMaskSchema}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, updateTokenFieldMaskSchema); -} diff --git a/packages/tokens/src/v1/model.ts b/packages/tokens/src/v1/model.ts index 76b39123..9e0cae36 100644 --- a/packages/tokens/src/v1/model.ts +++ b/packages/tokens/src/v1/model.ts @@ -89,26 +89,12 @@ export interface UpdateToken { tokenId?: string | undefined; token?: PublicTokenInfo | undefined; /** A list of field name under PublicTokenInfo, For example in request use {"update_mask": "comment,scopes"} */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; } // eslint-disable-next-line @typescript-eslint/no-empty-object-type export interface UpdateTokenResponse {} -export const unmarshalCreateTokenSchema: z.ZodType = z - .object({ - lifetime_seconds: z.number().optional(), - comment: z.string().optional(), - scopes: z.array(z.string()).optional(), - autoscope_enabled: z.boolean().optional(), - }) - .transform(d => ({ - lifetimeSeconds: d.lifetime_seconds, - comment: d.comment, - scopes: d.scopes, - autoscopeEnabled: d.autoscope_enabled, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreateToken_ResponseSchema: z.ZodType = z @@ -157,30 +143,10 @@ export const unmarshalPublicTokenInfoSchema: z.ZodType = z backfillScopes: d.backfill_scopes, })); -export const unmarshalRevokeTokenSchema: z.ZodType = z - .object({ - token_id: z.string().optional(), - }) - .transform(d => ({ - tokenId: d.token_id, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalRevokeToken_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalUpdateTokenSchema: z.ZodType = z - .object({ - token_id: z.string().optional(), - token: z.lazy(() => unmarshalPublicTokenInfoSchema).optional(), - update_mask: z.string().optional(), - }) - .transform(d => ({ - tokenId: d.token_id, - token: d.token, - updateMask: d.update_mask, - })); - export const unmarshalUpdateTokenResponseSchema: z.ZodType = z.object({}); @@ -198,26 +164,6 @@ export const marshalCreateTokenSchema: z.ZodType = z autoscope_enabled: d.autoscopeEnabled, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreateToken_ResponseSchema: z.ZodType = z - .object({ - tokenValue: z.string().optional(), - tokenInfo: z.lazy(() => marshalPublicTokenInfoSchema).optional(), - }) - .transform(d => ({ - token_value: d.tokenValue, - token_info: d.tokenInfo, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListTokens_ResponseSchema: z.ZodType = z - .object({ - tokenInfos: z.array(z.lazy(() => marshalPublicTokenInfoSchema)).optional(), - }) - .transform(d => ({ - token_infos: d.tokenInfos, - })); - export const marshalPublicTokenInfoSchema: z.ZodType = z .object({ tokenId: z.string().optional(), @@ -250,14 +196,14 @@ export const marshalRevokeTokenSchema: z.ZodType = z token_id: d.tokenId, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalRevokeToken_ResponseSchema: z.ZodType = z.object({}); - export const marshalUpdateTokenSchema: z.ZodType = z .object({ tokenId: z.string().optional(), token: z.lazy(() => marshalPublicTokenInfoSchema).optional(), - updateMask: z.string().optional(), + updateMask: z + .any() + .transform((m: FieldMask) => m.toString()) + .optional(), }) .transform(d => ({ token_id: d.tokenId, @@ -265,61 +211,6 @@ export const marshalUpdateTokenSchema: z.ZodType = z update_mask: d.updateMask, })); -export const marshalUpdateTokenResponseSchema: z.ZodType = z.object({}); - -const createTokenFieldMaskSchema: FieldMaskSchema = { - autoscopeEnabled: {wire: 'autoscope_enabled'}, - comment: {wire: 'comment'}, - lifetimeSeconds: {wire: 'lifetime_seconds'}, - scopes: {wire: 'scopes'}, -}; - -export function createTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createTokenFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createToken_ResponseFieldMaskSchema: FieldMaskSchema = { - tokenInfo: { - wire: 'token_info', - children: () => publicTokenInfoFieldMaskSchema, - }, - tokenValue: {wire: 'token_value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createToken_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createToken_ResponseFieldMaskSchema - ); -} - -const listTokensFieldMaskSchema: FieldMaskSchema = {}; - -export function listTokensFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, listTokensFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listTokens_ResponseFieldMaskSchema: FieldMaskSchema = { - tokenInfos: {wire: 'token_infos'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listTokens_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listTokens_ResponseFieldMaskSchema - ); -} - const publicTokenInfoFieldMaskSchema: FieldMaskSchema = { autoscopeState: {wire: 'autoscope_state'}, backfillScopes: {wire: 'backfill_scopes'}, @@ -340,49 +231,3 @@ export function publicTokenInfoFieldMask( publicTokenInfoFieldMaskSchema ); } - -const revokeTokenFieldMaskSchema: FieldMaskSchema = { - tokenId: {wire: 'token_id'}, -}; - -export function revokeTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, revokeTokenFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const revokeToken_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function revokeToken_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - revokeToken_ResponseFieldMaskSchema - ); -} - -const updateTokenFieldMaskSchema: FieldMaskSchema = { - token: {wire: 'token', children: () => publicTokenInfoFieldMaskSchema}, - tokenId: {wire: 'token_id'}, - updateMask: {wire: 'update_mask'}, -}; - -export function updateTokenFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, updateTokenFieldMaskSchema); -} - -const updateTokenResponseFieldMaskSchema: FieldMaskSchema = {}; - -export function updateTokenResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateTokenResponseFieldMaskSchema - ); -} diff --git a/packages/volumes/src/v1/model.ts b/packages/volumes/src/v1/model.ts index 02f125b8..517945e6 100644 --- a/packages/volumes/src/v1/model.ts +++ b/packages/volumes/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum SseEncryptionAlgorithm { @@ -198,48 +196,6 @@ export interface VolumeInfo { browseOnly?: boolean | undefined; } -export const unmarshalCreateVolumeSchema: z.ZodType = z - .object({ - name: z.string().optional(), - catalog_name: z.string().optional(), - schema_name: z.string().optional(), - volume_type: z.enum(VolumeType).optional(), - storage_location: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - full_name: z.string().optional(), - volume_id: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - access_point: z.string().optional(), - encryption_details: z - .lazy(() => unmarshalEncryptionDetailsSchema) - .optional(), - browse_only: z.boolean().optional(), - }) - .transform(d => ({ - name: d.name, - catalogName: d.catalog_name, - schemaName: d.schema_name, - volumeType: d.volume_type, - storageLocation: d.storage_location, - owner: d.owner, - comment: d.comment, - fullName: d.full_name, - volumeId: d.volume_id, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - accessPoint: d.access_point, - encryptionDetails: d.encryption_details, - browseOnly: d.browse_only, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalDeleteVolume_ResponseSchema: z.ZodType = z.object({}); @@ -277,52 +233,6 @@ export const unmarshalSseEncryptionDetailsSchema: z.ZodType = z - .object({ - full_name_arg: z.string().optional(), - new_name: z.string().optional(), - name: z.string().optional(), - catalog_name: z.string().optional(), - schema_name: z.string().optional(), - volume_type: z.enum(VolumeType).optional(), - storage_location: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - full_name: z.string().optional(), - volume_id: z.string().optional(), - metastore_id: z.string().optional(), - created_at: z.number().optional(), - created_by: z.string().optional(), - updated_at: z.number().optional(), - updated_by: z.string().optional(), - access_point: z.string().optional(), - encryption_details: z - .lazy(() => unmarshalEncryptionDetailsSchema) - .optional(), - browse_only: z.boolean().optional(), - }) - .transform(d => ({ - fullNameArg: d.full_name_arg, - newName: d.new_name, - name: d.name, - catalogName: d.catalog_name, - schemaName: d.schema_name, - volumeType: d.volume_type, - storageLocation: d.storage_location, - owner: d.owner, - comment: d.comment, - fullName: d.full_name, - volumeId: d.volume_id, - metastoreId: d.metastore_id, - createdAt: d.created_at, - createdBy: d.created_by, - updatedAt: d.updated_at, - updatedBy: d.updated_by, - accessPoint: d.access_point, - encryptionDetails: d.encryption_details, - browseOnly: d.browse_only, - })); - export const unmarshalVolumeInfoSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -405,9 +315,6 @@ export const marshalCreateVolumeSchema: z.ZodType = z browse_only: d.browseOnly, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteVolume_ResponseSchema: z.ZodType = z.object({}); - export const marshalEncryptionDetailsSchema: z.ZodType = z .object({ sseEncryptionDetails: z @@ -418,17 +325,6 @@ export const marshalEncryptionDetailsSchema: z.ZodType = z sse_encryption_details: d.sseEncryptionDetails, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListVolumes_ResponseSchema: z.ZodType = z - .object({ - volumes: z.array(z.lazy(() => marshalVolumeInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - volumes: d.volumes, - next_page_token: d.nextPageToken, - })); - export const marshalSseEncryptionDetailsSchema: z.ZodType = z .object({ algorithm: z.enum(SseEncryptionAlgorithm).optional(), @@ -482,222 +378,3 @@ export const marshalUpdateVolumeSchema: z.ZodType = z encryption_details: d.encryptionDetails, browse_only: d.browseOnly, })); - -export const marshalVolumeInfoSchema: z.ZodType = z - .object({ - name: z.string().optional(), - catalogName: z.string().optional(), - schemaName: z.string().optional(), - volumeType: z.enum(VolumeType).optional(), - storageLocation: z.string().optional(), - owner: z.string().optional(), - comment: z.string().optional(), - fullName: z.string().optional(), - volumeId: z.string().optional(), - metastoreId: z.string().optional(), - createdAt: z.number().optional(), - createdBy: z.string().optional(), - updatedAt: z.number().optional(), - updatedBy: z.string().optional(), - accessPoint: z.string().optional(), - encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(), - browseOnly: z.boolean().optional(), - }) - .transform(d => ({ - name: d.name, - catalog_name: d.catalogName, - schema_name: d.schemaName, - volume_type: d.volumeType, - storage_location: d.storageLocation, - owner: d.owner, - comment: d.comment, - full_name: d.fullName, - volume_id: d.volumeId, - metastore_id: d.metastoreId, - created_at: d.createdAt, - created_by: d.createdBy, - updated_at: d.updatedAt, - updated_by: d.updatedBy, - access_point: d.accessPoint, - encryption_details: d.encryptionDetails, - browse_only: d.browseOnly, - })); - -const createVolumeFieldMaskSchema: FieldMaskSchema = { - accessPoint: {wire: 'access_point'}, - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - encryptionDetails: { - wire: 'encryption_details', - children: () => encryptionDetailsFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - schemaName: {wire: 'schema_name'}, - storageLocation: {wire: 'storage_location'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - volumeId: {wire: 'volume_id'}, - volumeType: {wire: 'volume_type'}, -}; - -export function createVolumeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, createVolumeFieldMaskSchema); -} - -const deleteVolumeFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, -}; - -export function deleteVolumeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, deleteVolumeFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteVolume_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteVolume_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteVolume_ResponseFieldMaskSchema - ); -} - -const encryptionDetailsFieldMaskSchema: FieldMaskSchema = { - sseEncryptionDetails: { - wire: 'sse_encryption_details', - children: () => sseEncryptionDetailsFieldMaskSchema, - }, -}; - -export function encryptionDetailsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - encryptionDetailsFieldMaskSchema - ); -} - -const getVolumeFieldMaskSchema: FieldMaskSchema = { - fullNameArg: {wire: 'full_name_arg'}, - includeBrowse: {wire: 'include_browse'}, -}; - -export function getVolumeFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, getVolumeFieldMaskSchema); -} - -const listVolumesFieldMaskSchema: FieldMaskSchema = { - catalogName: {wire: 'catalog_name'}, - includeBrowse: {wire: 'include_browse'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, - schemaName: {wire: 'schema_name'}, -}; - -export function listVolumesFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, listVolumesFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listVolumes_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - volumes: {wire: 'volumes'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listVolumes_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listVolumes_ResponseFieldMaskSchema - ); -} - -const sseEncryptionDetailsFieldMaskSchema: FieldMaskSchema = { - algorithm: {wire: 'algorithm'}, - awsKmsKeyArn: {wire: 'aws_kms_key_arn'}, -}; - -export function sseEncryptionDetailsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - sseEncryptionDetailsFieldMaskSchema - ); -} - -const updateVolumeFieldMaskSchema: FieldMaskSchema = { - accessPoint: {wire: 'access_point'}, - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - encryptionDetails: { - wire: 'encryption_details', - children: () => encryptionDetailsFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - fullNameArg: {wire: 'full_name_arg'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - newName: {wire: 'new_name'}, - owner: {wire: 'owner'}, - schemaName: {wire: 'schema_name'}, - storageLocation: {wire: 'storage_location'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - volumeId: {wire: 'volume_id'}, - volumeType: {wire: 'volume_type'}, -}; - -export function updateVolumeFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, updateVolumeFieldMaskSchema); -} - -const volumeInfoFieldMaskSchema: FieldMaskSchema = { - accessPoint: {wire: 'access_point'}, - browseOnly: {wire: 'browse_only'}, - catalogName: {wire: 'catalog_name'}, - comment: {wire: 'comment'}, - createdAt: {wire: 'created_at'}, - createdBy: {wire: 'created_by'}, - encryptionDetails: { - wire: 'encryption_details', - children: () => encryptionDetailsFieldMaskSchema, - }, - fullName: {wire: 'full_name'}, - metastoreId: {wire: 'metastore_id'}, - name: {wire: 'name'}, - owner: {wire: 'owner'}, - schemaName: {wire: 'schema_name'}, - storageLocation: {wire: 'storage_location'}, - updatedAt: {wire: 'updated_at'}, - updatedBy: {wire: 'updated_by'}, - volumeId: {wire: 'volume_id'}, - volumeType: {wire: 'volume_type'}, -}; - -export function volumeInfoFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, volumeInfoFieldMaskSchema); -} diff --git a/packages/warehouses/src/v1/client.ts b/packages/warehouses/src/v1/client.ts index eba28e40..90ce1de8 100644 --- a/packages/warehouses/src/v1/client.ts +++ b/packages/warehouses/src/v1/client.ts @@ -558,7 +558,7 @@ export class Client { const url = `${this.host}/api/warehouses/v1/${req.defaultWarehouseOverride?.name ?? ''}`; const params = new URLSearchParams(); if (req.updateMask !== undefined) { - params.append('update_mask', req.updateMask); + params.append('update_mask', req.updateMask.toString()); } if (req.allowMissing !== undefined) { params.append('allow_missing', String(req.allowMissing)); diff --git a/packages/warehouses/src/v1/model.ts b/packages/warehouses/src/v1/model.ts index 319656a1..5cee737f 100644 --- a/packages/warehouses/src/v1/model.ts +++ b/packages/warehouses/src/v1/model.ts @@ -1411,7 +1411,7 @@ export interface UpdateDefaultWarehouseOverrideRequest { * Use "*" to update all fields. * When allow_missing is true, this field is ignored and all fields are applied. */ - updateMask?: string | undefined; + updateMask?: FieldMask | undefined; /** * If set to true, and the override is not found, a new override will be created. * In this situation, `update_mask` is ignored and all fields are applied. @@ -1515,38 +1515,6 @@ export const unmarshalChannelSchema: z.ZodType = z dbsqlVersion: d.dbsql_version, })); -export const unmarshalCreateWarehouseSchema: z.ZodType = z - .object({ - name: z.string().optional(), - cluster_size: z.string().optional(), - min_num_clusters: z.number().optional(), - max_num_clusters: z.number().optional(), - auto_stop_mins: z.number().optional(), - creator_name: z.string().optional(), - instance_profile_arn: z.string().optional(), - tags: z.lazy(() => unmarshalEndpointTagsSchema).optional(), - spot_instance_policy: z.enum(EndpointSpotInstancePolicy).optional(), - enable_photon: z.boolean().optional(), - channel: z.lazy(() => unmarshalChannelSchema).optional(), - enable_serverless_compute: z.boolean().optional(), - warehouse_type: z.enum(WarehouseType).optional(), - }) - .transform(d => ({ - name: d.name, - clusterSize: d.cluster_size, - minNumClusters: d.min_num_clusters, - maxNumClusters: d.max_num_clusters, - autoStopMins: d.auto_stop_mins, - creatorName: d.creator_name, - instanceProfileArn: d.instance_profile_arn, - tags: d.tags, - spotInstancePolicy: d.spot_instance_policy, - enablePhoton: d.enable_photon, - channel: d.channel, - enableServerlessCompute: d.enable_serverless_compute, - warehouseType: d.warehouse_type, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalCreateWarehouse_ResponseSchema: z.ZodType = z @@ -1572,41 +1540,6 @@ export const unmarshalDefaultWarehouseOverrideSchema: z.ZodType = - z - .object({ - id: z.string().optional(), - name: z.string().optional(), - cluster_size: z.string().optional(), - min_num_clusters: z.number().optional(), - max_num_clusters: z.number().optional(), - auto_stop_mins: z.number().optional(), - creator_name: z.string().optional(), - instance_profile_arn: z.string().optional(), - tags: z.lazy(() => unmarshalEndpointTagsSchema).optional(), - spot_instance_policy: z.enum(EndpointSpotInstancePolicy).optional(), - enable_photon: z.boolean().optional(), - channel: z.lazy(() => unmarshalChannelSchema).optional(), - enable_serverless_compute: z.boolean().optional(), - warehouse_type: z.enum(WarehouseType).optional(), - }) - .transform(d => ({ - id: d.id, - name: d.name, - clusterSize: d.cluster_size, - minNumClusters: d.min_num_clusters, - maxNumClusters: d.max_num_clusters, - autoStopMins: d.auto_stop_mins, - creatorName: d.creator_name, - instanceProfileArn: d.instance_profile_arn, - tags: d.tags, - spotInstancePolicy: d.spot_instance_policy, - enablePhoton: d.enable_photon, - channel: d.channel, - enableServerlessCompute: d.enable_serverless_compute, - warehouseType: d.warehouse_type, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalEditWarehouseRequest_ResponseSchema: z.ZodType = z.object({}); @@ -1831,43 +1764,6 @@ export const unmarshalRepeatedEndpointConfPairsSchema: z.ZodType = - z - .object({ - security_policy: z.enum(EndpointSecurityPolicy).optional(), - data_access_config: z - .array(z.lazy(() => unmarshalEndpointConfPairSchema)) - .optional(), - instance_profile_arn: z.string().optional(), - channel: z.lazy(() => unmarshalChannelSchema).optional(), - enable_serverless_compute: z.boolean().optional(), - global_param: z - .lazy(() => unmarshalRepeatedEndpointConfPairsSchema) - .optional(), - config_param: z - .lazy(() => unmarshalRepeatedEndpointConfPairsSchema) - .optional(), - sql_configuration_parameters: z - .lazy(() => unmarshalRepeatedEndpointConfPairsSchema) - .optional(), - google_service_account: z.string().optional(), - enabled_warehouse_types: z - .array(z.lazy(() => unmarshalWarehouseTypePairSchema)) - .optional(), - }) - .transform(d => ({ - securityPolicy: d.security_policy, - dataAccessConfig: d.data_access_config, - instanceProfileArn: d.instance_profile_arn, - channel: d.channel, - enableServerlessCompute: d.enable_serverless_compute, - globalParam: d.global_param, - configParam: d.config_param, - sqlConfigurationParameters: d.sql_configuration_parameters, - googleServiceAccount: d.google_service_account, - enabledWarehouseTypes: d.enabled_warehouse_types, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalSetWorkspaceWarehouseConfigRequest_ResponseSchema: z.ZodType = z.object({}); @@ -1910,26 +1806,10 @@ export const unmarshalListWarehousesRequest_ResponseSchema: z.ZodType = z - .object({ - id: z.string().optional(), - }) - .transform(d => ({ - id: d.id, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalStartRequest_ResponseSchema: z.ZodType = z.object({}); -export const unmarshalStopRequestSchema: z.ZodType = z - .object({ - id: z.string().optional(), - }) - .transform(d => ({ - id: d.id, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalStopRequest_ResponseSchema: z.ZodType = z.object({}); @@ -1976,15 +1856,6 @@ export const marshalCreateWarehouseSchema: z.ZodType = z warehouse_type: d.warehouseType, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalCreateWarehouse_ResponseSchema: z.ZodType = z - .object({ - id: z.string().optional(), - }) - .transform(d => ({ - id: d.id, - })); - export const marshalDefaultWarehouseOverrideSchema: z.ZodType = z .object({ name: z.string().optional(), @@ -2033,11 +1904,6 @@ export const marshalEditWarehouseRequestSchema: z.ZodType = z warehouse_type: d.warehouseType, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalEditWarehouseRequest_ResponseSchema: z.ZodType = z.object( - {} -); - export const marshalEndpointConfPairSchema: z.ZodType = z .object({ key: z.string().optional(), @@ -2048,68 +1914,6 @@ export const marshalEndpointConfPairSchema: z.ZodType = z value: d.value, })); -export const marshalEndpointHealthSchema: z.ZodType = z - .object({ - status: z.enum(EndpointHealth_Status).optional(), - message: z.string().optional(), - failureReason: z.lazy(() => marshalTerminationReasonSchema).optional(), - summary: z.string().optional(), - details: z.string().optional(), - }) - .transform(d => ({ - status: d.status, - message: d.message, - failure_reason: d.failureReason, - summary: d.summary, - details: d.details, - })); - -export const marshalEndpointInfoSchema: z.ZodType = z - .object({ - id: z.string().optional(), - name: z.string().optional(), - clusterSize: z.string().optional(), - minNumClusters: z.number().optional(), - maxNumClusters: z.number().optional(), - autoStopMins: z.number().optional(), - creatorName: z.string().optional(), - instanceProfileArn: z.string().optional(), - tags: z.lazy(() => marshalEndpointTagsSchema).optional(), - spotInstancePolicy: z.enum(EndpointSpotInstancePolicy).optional(), - enablePhoton: z.boolean().optional(), - channel: z.lazy(() => marshalChannelSchema).optional(), - enableServerlessCompute: z.boolean().optional(), - warehouseType: z.enum(WarehouseType).optional(), - numClusters: z.number().optional(), - numActiveSessions: z.number().optional(), - state: z.enum(EndpointState).optional(), - jdbcUrl: z.string().optional(), - odbcParams: z.lazy(() => marshalOdbcParamsSchema).optional(), - health: z.lazy(() => marshalEndpointHealthSchema).optional(), - }) - .transform(d => ({ - id: d.id, - name: d.name, - cluster_size: d.clusterSize, - min_num_clusters: d.minNumClusters, - max_num_clusters: d.maxNumClusters, - auto_stop_mins: d.autoStopMins, - creator_name: d.creatorName, - instance_profile_arn: d.instanceProfileArn, - tags: d.tags, - spot_instance_policy: d.spotInstancePolicy, - enable_photon: d.enablePhoton, - channel: d.channel, - enable_serverless_compute: d.enableServerlessCompute, - warehouse_type: d.warehouseType, - num_clusters: d.numClusters, - num_active_sessions: d.numActiveSessions, - state: d.state, - jdbc_url: d.jdbcUrl, - odbc_params: d.odbcParams, - health: d.health, - })); - export const marshalEndpointTagPairSchema: z.ZodType = z .object({ key: z.string().optional(), @@ -2128,117 +1932,6 @@ export const marshalEndpointTagsSchema: z.ZodType = z custom_tags: d.customTags, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetWarehouse_ResponseSchema: z.ZodType = z - .object({ - id: z.string().optional(), - name: z.string().optional(), - clusterSize: z.string().optional(), - minNumClusters: z.number().optional(), - maxNumClusters: z.number().optional(), - autoStopMins: z.number().optional(), - creatorName: z.string().optional(), - instanceProfileArn: z.string().optional(), - tags: z.lazy(() => marshalEndpointTagsSchema).optional(), - spotInstancePolicy: z.enum(EndpointSpotInstancePolicy).optional(), - enablePhoton: z.boolean().optional(), - channel: z.lazy(() => marshalChannelSchema).optional(), - enableServerlessCompute: z.boolean().optional(), - warehouseType: z.enum(WarehouseType).optional(), - numClusters: z.number().optional(), - numActiveSessions: z.number().optional(), - state: z.enum(EndpointState).optional(), - jdbcUrl: z.string().optional(), - odbcParams: z.lazy(() => marshalOdbcParamsSchema).optional(), - health: z.lazy(() => marshalEndpointHealthSchema).optional(), - }) - .transform(d => ({ - id: d.id, - name: d.name, - cluster_size: d.clusterSize, - min_num_clusters: d.minNumClusters, - max_num_clusters: d.maxNumClusters, - auto_stop_mins: d.autoStopMins, - creator_name: d.creatorName, - instance_profile_arn: d.instanceProfileArn, - tags: d.tags, - spot_instance_policy: d.spotInstancePolicy, - enable_photon: d.enablePhoton, - channel: d.channel, - enable_serverless_compute: d.enableServerlessCompute, - warehouse_type: d.warehouseType, - num_clusters: d.numClusters, - num_active_sessions: d.numActiveSessions, - state: d.state, - jdbc_url: d.jdbcUrl, - odbc_params: d.odbcParams, - health: d.health, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetWorkspaceWarehouseConfigRequest_ResponseSchema: z.ZodType = - z - .object({ - securityPolicy: z.enum(EndpointSecurityPolicy).optional(), - dataAccessConfig: z - .array(z.lazy(() => marshalEndpointConfPairSchema)) - .optional(), - instanceProfileArn: z.string().optional(), - channel: z.lazy(() => marshalChannelSchema).optional(), - enableServerlessCompute: z.boolean().optional(), - globalParam: z - .lazy(() => marshalRepeatedEndpointConfPairsSchema) - .optional(), - configParam: z - .lazy(() => marshalRepeatedEndpointConfPairsSchema) - .optional(), - sqlConfigurationParameters: z - .lazy(() => marshalRepeatedEndpointConfPairsSchema) - .optional(), - googleServiceAccount: z.string().optional(), - enabledWarehouseTypes: z - .array(z.lazy(() => marshalWarehouseTypePairSchema)) - .optional(), - }) - .transform(d => ({ - security_policy: d.securityPolicy, - data_access_config: d.dataAccessConfig, - instance_profile_arn: d.instanceProfileArn, - channel: d.channel, - enable_serverless_compute: d.enableServerlessCompute, - global_param: d.globalParam, - config_param: d.configParam, - sql_configuration_parameters: d.sqlConfigurationParameters, - google_service_account: d.googleServiceAccount, - enabled_warehouse_types: d.enabledWarehouseTypes, - })); - -export const marshalListDefaultWarehouseOverridesResponseSchema: z.ZodType = z - .object({ - defaultWarehouseOverrides: z - .array(z.lazy(() => marshalDefaultWarehouseOverrideSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - default_warehouse_overrides: d.defaultWarehouseOverrides, - next_page_token: d.nextPageToken, - })); - -export const marshalOdbcParamsSchema: z.ZodType = z - .object({ - hostname: z.string().optional(), - path: z.string().optional(), - protocol: z.string().optional(), - port: z.number().optional(), - }) - .transform(d => ({ - hostname: d.hostname, - path: d.path, - protocol: d.protocol, - port: d.port, - })); - export const marshalRepeatedEndpointConfPairsSchema: z.ZodType = z .object({ configPair: z.array(z.lazy(() => marshalEndpointConfPairSchema)).optional(), @@ -2287,48 +1980,16 @@ export const marshalSetWorkspaceWarehouseConfigRequestSchema: z.ZodType = z enabled_warehouse_types: d.enabledWarehouseTypes, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalSetWorkspaceWarehouseConfigRequest_ResponseSchema: z.ZodType = - z.object({}); - -export const marshalTerminationReasonSchema: z.ZodType = z +export const marshalWarehouseTypePairSchema: z.ZodType = z .object({ - code: z.enum(TerminationCode).optional(), - type: z.enum(TerminationType).optional(), - parameters: z.record(z.string(), z.string()).optional(), - }) - .transform(d => ({ - code: d.code, - type: d.type, - parameters: d.parameters, - })); - -export const marshalWarehouseTypePairSchema: z.ZodType = z - .object({ - warehouseType: z.enum(WarehouseType).optional(), - enabled: z.boolean().optional(), + warehouseType: z.enum(WarehouseType).optional(), + enabled: z.boolean().optional(), }) .transform(d => ({ warehouse_type: d.warehouseType, enabled: d.enabled, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalDeleteWarehouseRequest_ResponseSchema: z.ZodType = z.object( - {} -); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListWarehousesRequest_ResponseSchema: z.ZodType = z - .object({ - warehouses: z.array(z.lazy(() => marshalEndpointInfoSchema)).optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - warehouses: d.warehouses, - next_page_token: d.nextPageToken, - })); - export const marshalStartRequestSchema: z.ZodType = z .object({ id: z.string().optional(), @@ -2337,9 +1998,6 @@ export const marshalStartRequestSchema: z.ZodType = z id: d.id, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalStartRequest_ResponseSchema: z.ZodType = z.object({}); - export const marshalStopRequestSchema: z.ZodType = z .object({ id: z.string().optional(), @@ -2348,75 +2006,6 @@ export const marshalStopRequestSchema: z.ZodType = z id: d.id, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalStopRequest_ResponseSchema: z.ZodType = z.object({}); - -const channelFieldMaskSchema: FieldMaskSchema = { - dbsqlVersion: {wire: 'dbsql_version'}, - name: {wire: 'name'}, -}; - -export function channelFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, channelFieldMaskSchema); -} - -const createDefaultWarehouseOverrideRequestFieldMaskSchema: FieldMaskSchema = { - defaultWarehouseOverride: { - wire: 'default_warehouse_override', - children: () => defaultWarehouseOverrideFieldMaskSchema, - }, - defaultWarehouseOverrideId: {wire: 'default_warehouse_override_id'}, -}; - -export function createDefaultWarehouseOverrideRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createDefaultWarehouseOverrideRequestFieldMaskSchema - ); -} - -const createWarehouseFieldMaskSchema: FieldMaskSchema = { - autoStopMins: {wire: 'auto_stop_mins'}, - channel: {wire: 'channel', children: () => channelFieldMaskSchema}, - clusterSize: {wire: 'cluster_size'}, - creatorName: {wire: 'creator_name'}, - enablePhoton: {wire: 'enable_photon'}, - enableServerlessCompute: {wire: 'enable_serverless_compute'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - maxNumClusters: {wire: 'max_num_clusters'}, - minNumClusters: {wire: 'min_num_clusters'}, - name: {wire: 'name'}, - spotInstancePolicy: {wire: 'spot_instance_policy'}, - tags: {wire: 'tags', children: () => endpointTagsFieldMaskSchema}, - warehouseType: {wire: 'warehouse_type'}, -}; - -export function createWarehouseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createWarehouseFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const createWarehouse_ResponseFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function createWarehouse_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - createWarehouse_ResponseFieldMaskSchema - ); -} - const defaultWarehouseOverrideFieldMaskSchema: FieldMaskSchema = { defaultWarehouseOverrideId: {wire: 'default_warehouse_override_id'}, name: {wire: 'name'}, @@ -2432,505 +2021,3 @@ export function defaultWarehouseOverrideFieldMask( defaultWarehouseOverrideFieldMaskSchema ); } - -const deleteDefaultWarehouseOverrideRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function deleteDefaultWarehouseOverrideRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteDefaultWarehouseOverrideRequestFieldMaskSchema - ); -} - -const editWarehouseRequestFieldMaskSchema: FieldMaskSchema = { - autoStopMins: {wire: 'auto_stop_mins'}, - channel: {wire: 'channel', children: () => channelFieldMaskSchema}, - clusterSize: {wire: 'cluster_size'}, - creatorName: {wire: 'creator_name'}, - enablePhoton: {wire: 'enable_photon'}, - enableServerlessCompute: {wire: 'enable_serverless_compute'}, - id: {wire: 'id'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - maxNumClusters: {wire: 'max_num_clusters'}, - minNumClusters: {wire: 'min_num_clusters'}, - name: {wire: 'name'}, - spotInstancePolicy: {wire: 'spot_instance_policy'}, - tags: {wire: 'tags', children: () => endpointTagsFieldMaskSchema}, - warehouseType: {wire: 'warehouse_type'}, -}; - -export function editWarehouseRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - editWarehouseRequestFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const editWarehouseRequest_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function editWarehouseRequest_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - editWarehouseRequest_ResponseFieldMaskSchema - ); -} - -const endpointConfPairFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -export function endpointConfPairFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - endpointConfPairFieldMaskSchema - ); -} - -const endpointHealthFieldMaskSchema: FieldMaskSchema = { - details: {wire: 'details'}, - failureReason: { - wire: 'failure_reason', - children: () => terminationReasonFieldMaskSchema, - }, - message: {wire: 'message'}, - status: {wire: 'status'}, - summary: {wire: 'summary'}, -}; - -export function endpointHealthFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, endpointHealthFieldMaskSchema); -} - -const endpointInfoFieldMaskSchema: FieldMaskSchema = { - autoStopMins: {wire: 'auto_stop_mins'}, - channel: {wire: 'channel', children: () => channelFieldMaskSchema}, - clusterSize: {wire: 'cluster_size'}, - creatorName: {wire: 'creator_name'}, - enablePhoton: {wire: 'enable_photon'}, - enableServerlessCompute: {wire: 'enable_serverless_compute'}, - health: {wire: 'health', children: () => endpointHealthFieldMaskSchema}, - id: {wire: 'id'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - jdbcUrl: {wire: 'jdbc_url'}, - maxNumClusters: {wire: 'max_num_clusters'}, - minNumClusters: {wire: 'min_num_clusters'}, - name: {wire: 'name'}, - numActiveSessions: {wire: 'num_active_sessions'}, - numClusters: {wire: 'num_clusters'}, - odbcParams: {wire: 'odbc_params', children: () => odbcParamsFieldMaskSchema}, - spotInstancePolicy: {wire: 'spot_instance_policy'}, - state: {wire: 'state'}, - tags: {wire: 'tags', children: () => endpointTagsFieldMaskSchema}, - warehouseType: {wire: 'warehouse_type'}, -}; - -export function endpointInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, endpointInfoFieldMaskSchema); -} - -const endpointTagPairFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -export function endpointTagPairFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - endpointTagPairFieldMaskSchema - ); -} - -const endpointTagsFieldMaskSchema: FieldMaskSchema = { - customTags: {wire: 'custom_tags'}, -}; - -export function endpointTagsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, endpointTagsFieldMaskSchema); -} - -const getDefaultWarehouseOverrideRequestFieldMaskSchema: FieldMaskSchema = { - name: {wire: 'name'}, -}; - -export function getDefaultWarehouseOverrideRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getDefaultWarehouseOverrideRequestFieldMaskSchema - ); -} - -const getWarehouseFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function getWarehouseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, getWarehouseFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getWarehouse_ResponseFieldMaskSchema: FieldMaskSchema = { - autoStopMins: {wire: 'auto_stop_mins'}, - channel: {wire: 'channel', children: () => channelFieldMaskSchema}, - clusterSize: {wire: 'cluster_size'}, - creatorName: {wire: 'creator_name'}, - enablePhoton: {wire: 'enable_photon'}, - enableServerlessCompute: {wire: 'enable_serverless_compute'}, - health: {wire: 'health', children: () => endpointHealthFieldMaskSchema}, - id: {wire: 'id'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - jdbcUrl: {wire: 'jdbc_url'}, - maxNumClusters: {wire: 'max_num_clusters'}, - minNumClusters: {wire: 'min_num_clusters'}, - name: {wire: 'name'}, - numActiveSessions: {wire: 'num_active_sessions'}, - numClusters: {wire: 'num_clusters'}, - odbcParams: {wire: 'odbc_params', children: () => odbcParamsFieldMaskSchema}, - spotInstancePolicy: {wire: 'spot_instance_policy'}, - state: {wire: 'state'}, - tags: {wire: 'tags', children: () => endpointTagsFieldMaskSchema}, - warehouseType: {wire: 'warehouse_type'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getWarehouse_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWarehouse_ResponseFieldMaskSchema - ); -} - -const getWorkspaceWarehouseConfigRequestFieldMaskSchema: FieldMaskSchema = {}; - -export function getWorkspaceWarehouseConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceWarehouseConfigRequestFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getWorkspaceWarehouseConfigRequest_ResponseFieldMaskSchema: FieldMaskSchema = - { - channel: {wire: 'channel', children: () => channelFieldMaskSchema}, - configParam: { - wire: 'config_param', - children: () => repeatedEndpointConfPairsFieldMaskSchema, - }, - dataAccessConfig: {wire: 'data_access_config'}, - enableServerlessCompute: {wire: 'enable_serverless_compute'}, - enabledWarehouseTypes: {wire: 'enabled_warehouse_types'}, - globalParam: { - wire: 'global_param', - children: () => repeatedEndpointConfPairsFieldMaskSchema, - }, - googleServiceAccount: {wire: 'google_service_account'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - securityPolicy: {wire: 'security_policy'}, - sqlConfigurationParameters: { - wire: 'sql_configuration_parameters', - children: () => repeatedEndpointConfPairsFieldMaskSchema, - }, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getWorkspaceWarehouseConfigRequest_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceWarehouseConfigRequest_ResponseFieldMaskSchema - ); -} - -const listDefaultWarehouseOverridesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, -}; - -export function listDefaultWarehouseOverridesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listDefaultWarehouseOverridesRequestFieldMaskSchema - ); -} - -const listDefaultWarehouseOverridesResponseFieldMaskSchema: FieldMaskSchema = { - defaultWarehouseOverrides: {wire: 'default_warehouse_overrides'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -export function listDefaultWarehouseOverridesResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listDefaultWarehouseOverridesResponseFieldMaskSchema - ); -} - -const odbcParamsFieldMaskSchema: FieldMaskSchema = { - hostname: {wire: 'hostname'}, - path: {wire: 'path'}, - port: {wire: 'port'}, - protocol: {wire: 'protocol'}, -}; - -export function odbcParamsFieldMask(...paths: string[]): FieldMask { - return FieldMask.build(paths, odbcParamsFieldMaskSchema); -} - -const repeatedEndpointConfPairsFieldMaskSchema: FieldMaskSchema = { - configPair: {wire: 'config_pair'}, - configurationPairs: {wire: 'configuration_pairs'}, -}; - -export function repeatedEndpointConfPairsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - repeatedEndpointConfPairsFieldMaskSchema - ); -} - -const setWorkspaceWarehouseConfigRequestFieldMaskSchema: FieldMaskSchema = { - channel: {wire: 'channel', children: () => channelFieldMaskSchema}, - configParam: { - wire: 'config_param', - children: () => repeatedEndpointConfPairsFieldMaskSchema, - }, - dataAccessConfig: {wire: 'data_access_config'}, - enableServerlessCompute: {wire: 'enable_serverless_compute'}, - enabledWarehouseTypes: {wire: 'enabled_warehouse_types'}, - globalParam: { - wire: 'global_param', - children: () => repeatedEndpointConfPairsFieldMaskSchema, - }, - googleServiceAccount: {wire: 'google_service_account'}, - instanceProfileArn: {wire: 'instance_profile_arn'}, - securityPolicy: {wire: 'security_policy'}, - sqlConfigurationParameters: { - wire: 'sql_configuration_parameters', - children: () => repeatedEndpointConfPairsFieldMaskSchema, - }, -}; - -export function setWorkspaceWarehouseConfigRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - setWorkspaceWarehouseConfigRequestFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const setWorkspaceWarehouseConfigRequest_ResponseFieldMaskSchema: FieldMaskSchema = - {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function setWorkspaceWarehouseConfigRequest_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - setWorkspaceWarehouseConfigRequest_ResponseFieldMaskSchema - ); -} - -const terminationReasonFieldMaskSchema: FieldMaskSchema = { - code: {wire: 'code'}, - parameters: {wire: 'parameters'}, - type: {wire: 'type'}, -}; - -export function terminationReasonFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - terminationReasonFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const terminationReason_ParametersEntryFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function terminationReason_ParametersEntryFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - terminationReason_ParametersEntryFieldMaskSchema - ); -} - -const updateDefaultWarehouseOverrideRequestFieldMaskSchema: FieldMaskSchema = { - allowMissing: {wire: 'allow_missing'}, - defaultWarehouseOverride: { - wire: 'default_warehouse_override', - children: () => defaultWarehouseOverrideFieldMaskSchema, - }, - updateMask: {wire: 'update_mask'}, -}; - -export function updateDefaultWarehouseOverrideRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateDefaultWarehouseOverrideRequestFieldMaskSchema - ); -} - -const warehouseTypePairFieldMaskSchema: FieldMaskSchema = { - enabled: {wire: 'enabled'}, - warehouseType: {wire: 'warehouse_type'}, -}; - -export function warehouseTypePairFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - warehouseTypePairFieldMaskSchema - ); -} - -const deleteWarehouseRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function deleteWarehouseRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteWarehouseRequestFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteWarehouseRequest_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteWarehouseRequest_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteWarehouseRequest_ResponseFieldMaskSchema - ); -} - -const listWarehousesRequestFieldMaskSchema: FieldMaskSchema = { - pageSize: {wire: 'page_size'}, - pageToken: {wire: 'page_token'}, - runAsUserId: {wire: 'run_as_user_id'}, -}; - -export function listWarehousesRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWarehousesRequestFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listWarehousesRequest_ResponseFieldMaskSchema: FieldMaskSchema = { - nextPageToken: {wire: 'next_page_token'}, - warehouses: {wire: 'warehouses'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listWarehousesRequest_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWarehousesRequest_ResponseFieldMaskSchema - ); -} - -const startRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function startRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, startRequestFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const startRequest_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function startRequest_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - startRequest_ResponseFieldMaskSchema - ); -} - -const stopRequestFieldMaskSchema: FieldMaskSchema = { - id: {wire: 'id'}, -}; - -export function stopRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, stopRequestFieldMaskSchema); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const stopRequest_ResponseFieldMaskSchema: FieldMaskSchema = {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function stopRequest_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - stopRequest_ResponseFieldMaskSchema - ); -} diff --git a/packages/workspaceassignment/src/v1/model.ts b/packages/workspaceassignment/src/v1/model.ts index 87816448..2aa08bf5 100644 --- a/packages/workspaceassignment/src/v1/model.ts +++ b/packages/workspaceassignment/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export enum Permission { @@ -170,21 +168,6 @@ export const unmarshalPrincipalOutputSchema: z.ZodType = z displayName: d.display_name, })); -export const unmarshalUpdateWorkspacePermissionAssignmentSchema: z.ZodType = - z - .object({ - account_id: z.string().optional(), - workspace_id: z.number().optional(), - principal_id: z.number().optional(), - permissions: z.array(z.enum(Permission)).optional(), - }) - .transform(d => ({ - accountId: d.account_id, - workspaceId: d.workspace_id, - principalId: d.principal_id, - permissions: d.permissions, - })); - export const unmarshalWorkspacePermissionAssignmentOutputSchema: z.ZodType = z .object({ @@ -198,63 +181,6 @@ export const unmarshalWorkspacePermissionAssignmentOutputSchema: z.ZodType marshalWorkspacePermissionAssignmentOutputSchema)) - .optional(), - nextPageToken: z.string().optional(), - prevPageToken: z.string().optional(), - }) - .transform(d => ({ - permission_assignments: d.permissionAssignments, - next_page_token: d.nextPageToken, - prev_page_token: d.prevPageToken, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalListWorkspacePermissions_ResponseSchema: z.ZodType = z - .object({ - permissions: z - .array(z.lazy(() => marshalPermissionOutputSchema)) - .optional(), - }) - .transform(d => ({ - permissions: d.permissions, - })); - -export const marshalPermissionOutputSchema: z.ZodType = z - .object({ - permissionLevel: z.enum(Permission).optional(), - description: z.string().optional(), - }) - .transform(d => ({ - permission_level: d.permissionLevel, - description: d.description, - })); - -export const marshalPrincipalOutputSchema: z.ZodType = z - .object({ - userName: z.string().optional(), - groupName: z.string().optional(), - servicePrincipalName: z.string().optional(), - principalId: z.number().optional(), - displayName: z.string().optional(), - }) - .transform(d => ({ - user_name: d.userName, - group_name: d.groupName, - service_principal_name: d.servicePrincipalName, - principal_id: d.principalId, - display_name: d.displayName, - })); - export const marshalUpdateWorkspacePermissionAssignmentSchema: z.ZodType = z .object({ accountId: z.string().optional(), @@ -268,173 +194,3 @@ export const marshalUpdateWorkspacePermissionAssignmentSchema: z.ZodType = z principal_id: d.principalId, permissions: d.permissions, })); - -export const marshalWorkspacePermissionAssignmentOutputSchema: z.ZodType = z - .object({ - principal: z.lazy(() => marshalPrincipalOutputSchema).optional(), - permissions: z.array(z.enum(Permission)).optional(), - error: z.string().optional(), - }) - .transform(d => ({ - principal: d.principal, - permissions: d.permissions, - error: d.error, - })); - -const deleteWorkspacePermissionAssignmentFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - principalId: {wire: 'principal_id'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function deleteWorkspacePermissionAssignmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteWorkspacePermissionAssignmentFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const deleteWorkspacePermissionAssignment_ResponseFieldMaskSchema: FieldMaskSchema = - {}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function deleteWorkspacePermissionAssignment_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - deleteWorkspacePermissionAssignment_ResponseFieldMaskSchema - ); -} - -const getWorkspacePermissionAssignmentsFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - filter: {wire: 'filter'}, - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function getWorkspacePermissionAssignmentsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspacePermissionAssignmentsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getWorkspacePermissionAssignments_ResponseFieldMaskSchema: FieldMaskSchema = - { - nextPageToken: {wire: 'next_page_token'}, - permissionAssignments: {wire: 'permission_assignments'}, - prevPageToken: {wire: 'prev_page_token'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getWorkspacePermissionAssignments_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspacePermissionAssignments_ResponseFieldMaskSchema - ); -} - -const listWorkspacePermissionsFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function listWorkspacePermissionsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspacePermissionsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const listWorkspacePermissions_ResponseFieldMaskSchema: FieldMaskSchema = { - permissions: {wire: 'permissions'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function listWorkspacePermissions_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - listWorkspacePermissions_ResponseFieldMaskSchema - ); -} - -const permissionOutputFieldMaskSchema: FieldMaskSchema = { - description: {wire: 'description'}, - permissionLevel: {wire: 'permission_level'}, -}; - -export function permissionOutputFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - permissionOutputFieldMaskSchema - ); -} - -const principalOutputFieldMaskSchema: FieldMaskSchema = { - displayName: {wire: 'display_name'}, - groupName: {wire: 'group_name'}, - principalId: {wire: 'principal_id'}, - servicePrincipalName: {wire: 'service_principal_name'}, - userName: {wire: 'user_name'}, -}; - -export function principalOutputFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - principalOutputFieldMaskSchema - ); -} - -const updateWorkspacePermissionAssignmentFieldMaskSchema: FieldMaskSchema = { - accountId: {wire: 'account_id'}, - permissions: {wire: 'permissions'}, - principalId: {wire: 'principal_id'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function updateWorkspacePermissionAssignmentFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateWorkspacePermissionAssignmentFieldMaskSchema - ); -} - -const workspacePermissionAssignmentOutputFieldMaskSchema: FieldMaskSchema = { - error: {wire: 'error'}, - permissions: {wire: 'permissions'}, - principal: { - wire: 'principal', - children: () => principalOutputFieldMaskSchema, - }, -}; - -export function workspacePermissionAssignmentOutputFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - workspacePermissionAssignmentOutputFieldMaskSchema - ); -} diff --git a/packages/workspacebindings/src/v1/model.ts b/packages/workspacebindings/src/v1/model.ts index 886d0a87..cf8f72dc 100644 --- a/packages/workspacebindings/src/v1/model.ts +++ b/packages/workspacebindings/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; /** Using `BINDING_TYPE_` prefix here to avoid conflict with `TableOperation` enum in `credentials_common.proto`. */ @@ -118,19 +116,6 @@ export const unmarshalGetWorkspaceBindings_ResponseSchema: z.ZodType = - z - .object({ - catalog_name: z.string().optional(), - assign_workspaces: z.array(z.number()).optional(), - unassign_workspaces: z.array(z.number()).optional(), - }) - .transform(d => ({ - catalogName: d.catalog_name, - assignWorkspaces: d.assign_workspaces, - unassignWorkspaces: d.unassign_workspaces, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalUpdateCatalogWorkspaceBindings_ResponseSchema: z.ZodType = z @@ -141,25 +126,6 @@ export const unmarshalUpdateCatalogWorkspaceBindings_ResponseSchema: z.ZodType = - z - .object({ - securable_type: z.string().optional(), - securable_full_name: z.string().optional(), - add: z - .array(z.lazy(() => unmarshalWorkspaceBindingInfoSchema)) - .optional(), - remove: z - .array(z.lazy(() => unmarshalWorkspaceBindingInfoSchema)) - .optional(), - }) - .transform(d => ({ - securableType: d.securable_type, - securableFullName: d.securable_full_name, - add: d.add, - remove: d.remove, - })); - // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export const unmarshalUpdateWorkspaceBindings_ResponseSchema: z.ZodType = z @@ -183,28 +149,6 @@ export const unmarshalWorkspaceBindingInfoSchema: z.ZodType ({ - workspaces: d.workspaces, - })); - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalGetWorkspaceBindings_ResponseSchema: z.ZodType = z - .object({ - bindings: z - .array(z.lazy(() => marshalWorkspaceBindingInfoSchema)) - .optional(), - nextPageToken: z.string().optional(), - }) - .transform(d => ({ - bindings: d.bindings, - next_page_token: d.nextPageToken, - })); - export const marshalUpdateCatalogWorkspaceBindingsSchema: z.ZodType = z .object({ catalogName: z.string().optional(), @@ -217,15 +161,6 @@ export const marshalUpdateCatalogWorkspaceBindingsSchema: z.ZodType = z unassign_workspaces: d.unassignWorkspaces, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalUpdateCatalogWorkspaceBindings_ResponseSchema: z.ZodType = z - .object({ - workspaces: z.array(z.number()).optional(), - }) - .transform(d => ({ - workspaces: d.workspaces, - })); - export const marshalUpdateWorkspaceBindingsSchema: z.ZodType = z .object({ securableType: z.string().optional(), @@ -240,17 +175,6 @@ export const marshalUpdateWorkspaceBindingsSchema: z.ZodType = z remove: d.remove, })); -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export const marshalUpdateWorkspaceBindings_ResponseSchema: z.ZodType = z - .object({ - bindings: z - .array(z.lazy(() => marshalWorkspaceBindingInfoSchema)) - .optional(), - }) - .transform(d => ({ - bindings: d.bindings, - })); - export const marshalWorkspaceBindingInfoSchema: z.ZodType = z .object({ workspaceId: z.number().optional(), @@ -260,139 +184,3 @@ export const marshalWorkspaceBindingInfoSchema: z.ZodType = z workspace_id: d.workspaceId, binding_type: d.bindingType, })); - -const getCatalogWorkspaceBindingsFieldMaskSchema: FieldMaskSchema = { - catalogName: {wire: 'catalog_name'}, -}; - -export function getCatalogWorkspaceBindingsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getCatalogWorkspaceBindingsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getCatalogWorkspaceBindings_ResponseFieldMaskSchema: FieldMaskSchema = { - workspaces: {wire: 'workspaces'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getCatalogWorkspaceBindings_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getCatalogWorkspaceBindings_ResponseFieldMaskSchema - ); -} - -const getWorkspaceBindingsFieldMaskSchema: FieldMaskSchema = { - maxResults: {wire: 'max_results'}, - pageToken: {wire: 'page_token'}, - securableFullName: {wire: 'securable_full_name'}, - securableType: {wire: 'securable_type'}, -}; - -export function getWorkspaceBindingsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceBindingsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const getWorkspaceBindings_ResponseFieldMaskSchema: FieldMaskSchema = { - bindings: {wire: 'bindings'}, - nextPageToken: {wire: 'next_page_token'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function getWorkspaceBindings_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceBindings_ResponseFieldMaskSchema - ); -} - -const updateCatalogWorkspaceBindingsFieldMaskSchema: FieldMaskSchema = { - assignWorkspaces: {wire: 'assign_workspaces'}, - catalogName: {wire: 'catalog_name'}, - unassignWorkspaces: {wire: 'unassign_workspaces'}, -}; - -export function updateCatalogWorkspaceBindingsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateCatalogWorkspaceBindingsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateCatalogWorkspaceBindings_ResponseFieldMaskSchema: FieldMaskSchema = - { - workspaces: {wire: 'workspaces'}, - }; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateCatalogWorkspaceBindings_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateCatalogWorkspaceBindings_ResponseFieldMaskSchema - ); -} - -const updateWorkspaceBindingsFieldMaskSchema: FieldMaskSchema = { - add: {wire: 'add'}, - remove: {wire: 'remove'}, - securableFullName: {wire: 'securable_full_name'}, - securableType: {wire: 'securable_type'}, -}; - -export function updateWorkspaceBindingsFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateWorkspaceBindingsFieldMaskSchema - ); -} - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -const updateWorkspaceBindings_ResponseFieldMaskSchema: FieldMaskSchema = { - bindings: {wire: 'bindings'}, -}; - -// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. -export function updateWorkspaceBindings_ResponseFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - updateWorkspaceBindings_ResponseFieldMaskSchema - ); -} - -const workspaceBindingInfoFieldMaskSchema: FieldMaskSchema = { - bindingType: {wire: 'binding_type'}, - workspaceId: {wire: 'workspace_id'}, -}; - -export function workspaceBindingInfoFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - workspaceBindingInfoFieldMaskSchema - ); -} diff --git a/packages/workspaceconf/src/v1/model.ts b/packages/workspaceconf/src/v1/model.ts index bc6c8ded..57664973 100644 --- a/packages/workspaceconf/src/v1/model.ts +++ b/packages/workspaceconf/src/v1/model.ts @@ -1,7 +1,5 @@ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT. -import {FieldMask} from '@databricks/sdk-core/wkt'; -import type {FieldMaskSchema} from '@databricks/sdk-core/wkt'; import {z} from 'zod'; export interface GetWorkspaceConfRequest { @@ -32,27 +30,3 @@ export const marshalWorkspaceConfSchema: z.ZodType = z key: d.key, value: d.value, })); - -const getWorkspaceConfRequestFieldMaskSchema: FieldMaskSchema = { - keys: {wire: 'keys'}, -}; - -export function getWorkspaceConfRequestFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build( - paths, - getWorkspaceConfRequestFieldMaskSchema - ); -} - -const workspaceConfFieldMaskSchema: FieldMaskSchema = { - key: {wire: 'key'}, - value: {wire: 'value'}, -}; - -export function workspaceConfFieldMask( - ...paths: string[] -): FieldMask { - return FieldMask.build(paths, workspaceConfFieldMaskSchema); -}