/*
 * 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 StreamPosition$inboundSchema = z.object({
    seq_num: z.number().int(),
    timestamp: z.number().int(),
}).transform((v) => {
    return remap$(v, {
        "seq_num": "seqNum",
    });
});
/** @internal */
export const StreamPosition$outboundSchema = z.object({
    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 StreamPosition$;
(function (StreamPosition$) {
    /** @deprecated use `StreamPosition$inboundSchema` instead. */
    StreamPosition$.inboundSchema = StreamPosition$inboundSchema;
    /** @deprecated use `StreamPosition$outboundSchema` instead. */
    StreamPosition$.outboundSchema = StreamPosition$outboundSchema;
})(StreamPosition$ || (StreamPosition$ = {}));
export function streamPositionToJSON(streamPosition) {
    return JSON.stringify(StreamPosition$outboundSchema.parse(streamPosition));
}
export function streamPositionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => StreamPosition$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamPosition' from JSON`);
}
//# sourceMappingURL=streamposition.js.map