/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: e56d14b1a3f2
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { Roles$inboundSchema } from "./roles.js";
/** @internal */
export const MessageTokens$inboundSchema = z
    .object({
    role: Roles$inboundSchema,
    total_tokens: z.nullable(z.int()).optional(),
    truncated: z.boolean().default(false),
    usage_count: z.int().default(1),
}).transform((v) => {
    return remap$(v, {
        "total_tokens": "totalTokens",
        "usage_count": "usageCount",
    });
});
export function messageTokensFromJSON(jsonString) {
    return safeParse(jsonString, (x) => MessageTokens$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MessageTokens' from JSON`);
}
//# sourceMappingURL=messagetokens.js.map