/* * 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 { MavlinkFrame, MavlinkFrame$inboundSchema } from "./mavlinkframe.js"; export type Mavlink = { frames?: Array | null | undefined; sawPong?: boolean | undefined; }; /** @internal */ export const Mavlink$inboundSchema: z.ZodType = z.object({ frames: z.nullable(z.array(MavlinkFrame$inboundSchema)).optional(), saw_pong: z.boolean().optional(), }).transform((v) => { return remap$(v, { "saw_pong": "sawPong", }); }); export function mavlinkFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Mavlink$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Mavlink' from JSON`, ); }