/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 87d456fca1b2
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const UsageInfo$inboundSchema = z.object({
    prompt_tokens: z.int().default(0),
    completion_tokens: z.int().default(0),
    total_tokens: z.int().default(0),
    prompt_audio_seconds: z.nullable(z.int()).optional(),
}).catchall(z.any()).transform((v) => {
    return remap$(v, {
        "prompt_tokens": "promptTokens",
        "completion_tokens": "completionTokens",
        "total_tokens": "totalTokens",
        "prompt_audio_seconds": "promptAudioSeconds",
    });
});
/** @internal */
export const UsageInfo$outboundSchema = z.object({
    promptTokens: z.int().default(0),
    completionTokens: z.int().default(0),
    totalTokens: z.int().default(0),
    promptAudioSeconds: z.nullable(z.int()).optional(),
}).catchall(z.any()).transform((v) => {
    return {
        ...remap$(v, {
            promptTokens: "prompt_tokens",
            completionTokens: "completion_tokens",
            totalTokens: "total_tokens",
            promptAudioSeconds: "prompt_audio_seconds",
        }),
    };
});
export function usageInfoToJSON(usageInfo) {
    return JSON.stringify(UsageInfo$outboundSchema.parse(usageInfo));
}
export function usageInfoFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UsageInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UsageInfo' from JSON`);
}
//# sourceMappingURL=usageinfo.js.map