/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a5510fca2033 */ 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 subsection of the results list from which distinct sections should be created. */ export type AutocompleteResultGroup = { /** * The inclusive start index of the range. */ startIndex?: number | undefined; /** * The exclusive end index of the range. */ endIndex?: number | undefined; /** * The title of the result group to be displayed. Empty means no title. */ title?: string | undefined; }; /** @internal */ export const AutocompleteResultGroup$inboundSchema: z.ZodType< AutocompleteResultGroup, z.ZodTypeDef, unknown > = z.object({ startIndex: z.number().int().optional(), endIndex: z.number().int().optional(), title: z.string().optional(), }); export function autocompleteResultGroupFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AutocompleteResultGroup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AutocompleteResultGroup' from JSON`, ); }