/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 1edf56765dba
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { CompletionTokensDetails$inboundSchema, } from "./completiontokensdetails.js";
import { PromptTokensDetails$inboundSchema, } from "./prompttokensdetails.js";
/** @internal */
export const UsageInfoDollarDefs$inboundSchema = z.object({
    prompt_audio_seconds: z.nullable(z.int()).optional(),
    prompt_tokens: z.int().default(0),
    total_tokens: z.int().default(0),
    completion_tokens: z.nullable(z.int()).optional(),
    request_count: z.nullable(z.int()).optional(),
    prompt_tokens_details: z.nullable(PromptTokensDetails$inboundSchema)
        .optional(),
    completion_tokens_details: z.nullable(CompletionTokensDetails$inboundSchema)
        .optional(),
    prompt_token_details: z.nullable(PromptTokensDetails$inboundSchema)
        .optional(),
    num_cached_tokens: z.nullable(z.int()).optional(),
}).transform((v) => {
    return remap$(v, {
        "prompt_audio_seconds": "promptAudioSeconds",
        "prompt_tokens": "promptTokens",
        "total_tokens": "totalTokens",
        "completion_tokens": "completionTokens",
        "request_count": "requestCount",
        "prompt_tokens_details": "promptTokensDetails",
        "completion_tokens_details": "completionTokensDetails",
        "prompt_token_details": "promptTokenDetails",
        "num_cached_tokens": "numCachedTokens",
    });
});
export function usageInfoDollarDefsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => UsageInfoDollarDefs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UsageInfoDollarDefs' from JSON`);
}
//# sourceMappingURL=usageinfodollardefs.js.map