/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const SequencedRecord$inboundSchema = z.object({
    body: z.string().optional(),
    headers: z.array(z.array(z.string())).optional(),
    seq_num: z.number().int(),
    timestamp: z.number().int(),
}).transform((v) => {
    return remap$(v, {
        "seq_num": "seqNum",
    });
});
/** @internal */
export const SequencedRecord$outboundSchema = z.object({
    body: z.string().optional(),
    headers: z.array(z.array(z.string())).optional(),
    seqNum: z.number().int(),
    timestamp: z.number().int(),
}).transform((v) => {
    return remap$(v, {
        seqNum: "seq_num",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SequencedRecord$;
(function (SequencedRecord$) {
    /** @deprecated use `SequencedRecord$inboundSchema` instead. */
    SequencedRecord$.inboundSchema = SequencedRecord$inboundSchema;
    /** @deprecated use `SequencedRecord$outboundSchema` instead. */
    SequencedRecord$.outboundSchema = SequencedRecord$outboundSchema;
})(SequencedRecord$ || (SequencedRecord$ = {}));
export function sequencedRecordToJSON(sequencedRecord) {
    return JSON.stringify(SequencedRecord$outboundSchema.parse(sequencedRecord));
}
export function sequencedRecordFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SequencedRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SequencedRecord' from JSON`);
}
//# sourceMappingURL=sequencedrecord.js.map