/* * 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 { PixelFormat, PixelFormat$inboundSchema } from "./pixelformat.js"; export type DesktopInfo = { height?: number | undefined; nameLen?: number | undefined; pixelFormat?: PixelFormat | undefined; width?: number | undefined; }; /** @internal */ export const DesktopInfo$inboundSchema: z.ZodType< DesktopInfo, z.ZodTypeDef, unknown > = z.object({ height: z.number().int().optional(), name_len: z.number().int().optional(), pixel_format: PixelFormat$inboundSchema.optional(), width: z.number().int().optional(), }).transform((v) => { return remap$(v, { "name_len": "nameLen", "pixel_format": "pixelFormat", }); }); export function desktopInfoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DesktopInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DesktopInfo' from JSON`, ); }