/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; 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"; /** * Not found error details */ export type NotFoundErrorResponseMessage = { /** * Error message */ message: string; /** * Error type */ error: string; /** * HTTP status code */ statusCode: number; }; /** @internal */ export const NotFoundErrorResponseMessage$inboundSchema: z.ZodType< NotFoundErrorResponseMessage, z.ZodTypeDef, unknown > = z.object({ message: z.string(), error: z.string(), status_code: z.number(), }).transform((v) => { return remap$(v, { "status_code": "statusCode", }); }); /** @internal */ export type NotFoundErrorResponseMessage$Outbound = { message: string; error: string; status_code: number; }; /** @internal */ export const NotFoundErrorResponseMessage$outboundSchema: z.ZodType< NotFoundErrorResponseMessage$Outbound, z.ZodTypeDef, NotFoundErrorResponseMessage > = z.object({ message: z.string(), error: z.string(), statusCode: z.number(), }).transform((v) => { return remap$(v, { statusCode: "status_code", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotFoundErrorResponseMessage$ { /** @deprecated use `NotFoundErrorResponseMessage$inboundSchema` instead. */ export const inboundSchema = NotFoundErrorResponseMessage$inboundSchema; /** @deprecated use `NotFoundErrorResponseMessage$outboundSchema` instead. */ export const outboundSchema = NotFoundErrorResponseMessage$outboundSchema; /** @deprecated use `NotFoundErrorResponseMessage$Outbound` instead. */ export type Outbound = NotFoundErrorResponseMessage$Outbound; } export function notFoundErrorResponseMessageToJSON( notFoundErrorResponseMessage: NotFoundErrorResponseMessage, ): string { return JSON.stringify( NotFoundErrorResponseMessage$outboundSchema.parse( notFoundErrorResponseMessage, ), ); } export function notFoundErrorResponseMessageFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => NotFoundErrorResponseMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NotFoundErrorResponseMessage' from JSON`, ); }