/* * 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"; export type DeleteModelPriceResponse = { model: string; orgId: string | null; cleared: true; }; /** @internal */ export const DeleteModelPriceResponse$inboundSchema: z.ZodType< DeleteModelPriceResponse, z.ZodTypeDef, unknown > = z.object({ model: z.string(), org_id: z.nullable(z.string()), cleared: z.literal(true), }).transform((v) => { return remap$(v, { "org_id": "orgId", }); }); /** @internal */ export type DeleteModelPriceResponse$Outbound = { model: string; org_id: string | null; cleared: true; }; /** @internal */ export const DeleteModelPriceResponse$outboundSchema: z.ZodType< DeleteModelPriceResponse$Outbound, z.ZodTypeDef, DeleteModelPriceResponse > = z.object({ model: z.string(), orgId: z.nullable(z.string()), cleared: z.literal(true), }).transform((v) => { return remap$(v, { orgId: "org_id", }); }); export function deleteModelPriceResponseToJSON( deleteModelPriceResponse: DeleteModelPriceResponse, ): string { return JSON.stringify( DeleteModelPriceResponse$outboundSchema.parse(deleteModelPriceResponse), ); } export function deleteModelPriceResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteModelPriceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteModelPriceResponse' from JSON`, ); }