/*
 * 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";
import { AppendRecord$inboundSchema, AppendRecord$outboundSchema, } from "./appendrecord.js";
/** @internal */
export const AppendInput$inboundSchema = z.object({
    fencing_token: z.nullable(z.string()).optional(),
    match_seq_num: z.nullable(z.number().int()).optional(),
    records: z.array(AppendRecord$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "fencing_token": "fencingToken",
        "match_seq_num": "matchSeqNum",
    });
});
/** @internal */
export const AppendInput$outboundSchema = z.object({
    fencingToken: z.nullable(z.string()).optional(),
    matchSeqNum: z.nullable(z.number().int()).optional(),
    records: z.array(AppendRecord$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        fencingToken: "fencing_token",
        matchSeqNum: "match_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 AppendInput$;
(function (AppendInput$) {
    /** @deprecated use `AppendInput$inboundSchema` instead. */
    AppendInput$.inboundSchema = AppendInput$inboundSchema;
    /** @deprecated use `AppendInput$outboundSchema` instead. */
    AppendInput$.outboundSchema = AppendInput$outboundSchema;
})(AppendInput$ || (AppendInput$ = {}));
export function appendInputToJSON(appendInput) {
    return JSON.stringify(AppendInput$outboundSchema.parse(appendInput));
}
export function appendInputFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AppendInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AppendInput' from JSON`);
}
//# sourceMappingURL=appendinput.js.map