/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { LpdMessage, LpdMessage$inboundSchema } from "./lpdmessage.js"; export type Lpd = { jobs?: LpdMessage | undefined; longState?: string | undefined; lpdMessage?: LpdMessage | undefined; printer?: string | undefined; raw?: string | undefined; shortState?: string | undefined; text?: string | undefined; }; /** @internal */ export const Lpd$inboundSchema: z.ZodType = z .object({ jobs: LpdMessage$inboundSchema.optional(), long_state: z.string().optional(), lpd_message: LpdMessage$inboundSchema.optional(), printer: z.string().optional(), raw: z.string().optional(), short_state: z.string().optional(), text: z.string().optional(), }).transform((v) => { return remap$(v, { "long_state": "longState", "lpd_message": "lpdMessage", "short_state": "shortState", }); }); export function lpdFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Lpd$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Lpd' from JSON`, ); }