/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 9159bd82d8fc */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * A grouping for multiple PropertyDefinition. Grouped properties will be displayed together in the UI. */ export type PropertyGroup = { /** * The unique identifier of the group. */ name?: string | undefined; /** * The user-friendly group label to display. */ displayLabel?: string | undefined; }; /** @internal */ export const PropertyGroup$inboundSchema: z.ZodType< PropertyGroup, z.ZodTypeDef, unknown > = z.object({ name: z.string().optional(), displayLabel: z.string().optional(), }); /** @internal */ export type PropertyGroup$Outbound = { name?: string | undefined; displayLabel?: string | undefined; }; /** @internal */ export const PropertyGroup$outboundSchema: z.ZodType< PropertyGroup$Outbound, z.ZodTypeDef, PropertyGroup > = z.object({ name: z.string().optional(), displayLabel: z.string().optional(), }); export function propertyGroupToJSON(propertyGroup: PropertyGroup): string { return JSON.stringify(PropertyGroup$outboundSchema.parse(propertyGroup)); } export function propertyGroupFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PropertyGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PropertyGroup' from JSON`, ); }