/* * 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 { NTPNTPHeader, NTPNTPHeader$inboundSchema } from "./ntpntpheader.js"; export type Ntp = { getTimeHeader?: NTPNTPHeader | undefined; }; /** @internal */ export const Ntp$inboundSchema: z.ZodType = z .object({ get_time_header: NTPNTPHeader$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "get_time_header": "getTimeHeader", }); }); export function ntpFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Ntp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Ntp' from JSON`, ); }