/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SetOrgPriceRequest = { orgId: string; putModelPriceBody: components.PutModelPriceBody; }; /** @internal */ export const SetOrgPriceRequest$inboundSchema: z.ZodType< SetOrgPriceRequest, z.ZodTypeDef, unknown > = z.object({ orgId: z.string(), PutModelPriceBody: components.PutModelPriceBody$inboundSchema, }).transform((v) => { return remap$(v, { "PutModelPriceBody": "putModelPriceBody", }); }); /** @internal */ export type SetOrgPriceRequest$Outbound = { orgId: string; PutModelPriceBody: components.PutModelPriceBody$Outbound; }; /** @internal */ export const SetOrgPriceRequest$outboundSchema: z.ZodType< SetOrgPriceRequest$Outbound, z.ZodTypeDef, SetOrgPriceRequest > = z.object({ orgId: z.string(), putModelPriceBody: components.PutModelPriceBody$outboundSchema, }).transform((v) => { return remap$(v, { putModelPriceBody: "PutModelPriceBody", }); }); export function setOrgPriceRequestToJSON( setOrgPriceRequest: SetOrgPriceRequest, ): string { return JSON.stringify( SetOrgPriceRequest$outboundSchema.parse(setOrgPriceRequest), ); } export function setOrgPriceRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SetOrgPriceRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SetOrgPriceRequest' from JSON`, ); }