/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type PingResource = { status?: string | null | undefined; }; /** @internal */ export const PingResource$inboundSchema: z.ZodType< PingResource, z.ZodTypeDef, unknown > = z.object({ status: z.nullable(z.string()).optional(), }); /** @internal */ export type PingResource$Outbound = { status?: string | null | undefined; }; /** @internal */ export const PingResource$outboundSchema: z.ZodType< PingResource$Outbound, z.ZodTypeDef, PingResource > = z.object({ status: z.nullable(z.string()).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PingResource$ { /** @deprecated use `PingResource$inboundSchema` instead. */ export const inboundSchema = PingResource$inboundSchema; /** @deprecated use `PingResource$outboundSchema` instead. */ export const outboundSchema = PingResource$outboundSchema; /** @deprecated use `PingResource$Outbound` instead. */ export type Outbound = PingResource$Outbound; } export function pingResourceToJSON(pingResource: PingResource): string { return JSON.stringify(PingResource$outboundSchema.parse(pingResource)); } export function pingResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PingResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PingResource' from JSON`, ); }