/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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"; import { PushOptionType, PushOptionType$inboundSchema, } from "./pushoptiontype.js"; export type PushOptionChoice = { /** * Allowed value for field. */ value?: string | undefined; /** * The option type. */ type?: PushOptionType | undefined; /** * The property's display name. */ displayName?: string | undefined; /** * A description of the property. */ description?: string | undefined; /** * The property is required if `True`. */ required?: boolean | undefined; }; /** @internal */ export const PushOptionChoice$inboundSchema: z.ZodType< PushOptionChoice, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), type: PushOptionType$inboundSchema.optional(), displayName: z.string().optional(), description: z.string().optional(), required: z.boolean().optional(), }); export function pushOptionChoiceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PushOptionChoice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PushOptionChoice' from JSON`, ); }