/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 9a9a99d0b3bb
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { smartUnion } from "../../types/smartUnion.js";
import { EncodedPayloadOptions$outboundSchema, } from "./encodedpayloadoptions.js";
/** @internal */
export const SignalInvocationBodyNetworkEncodedInput$outboundSchema = z.object({
    b64payload: z.string(),
    encodingOptions: z.array(EncodedPayloadOptions$outboundSchema).optional(),
    empty: z.boolean().default(false),
}).catchall(z.any()).transform((v) => {
    return {
        ...remap$(v, {
            encodingOptions: "encoding_options",
        }),
    };
});
export function signalInvocationBodyNetworkEncodedInputToJSON(signalInvocationBodyNetworkEncodedInput) {
    return JSON.stringify(SignalInvocationBodyNetworkEncodedInput$outboundSchema.parse(signalInvocationBodyNetworkEncodedInput));
}
/** @internal */
export const SignalInvocationBodyInput$outboundSchema = smartUnion([
    z.lazy(() => SignalInvocationBodyNetworkEncodedInput$outboundSchema),
    z.record(z.string(), z.any()),
]);
export function signalInvocationBodyInputToJSON(signalInvocationBodyInput) {
    return JSON.stringify(SignalInvocationBodyInput$outboundSchema.parse(signalInvocationBodyInput));
}
/** @internal */
export const SignalInvocationBody$outboundSchema = z.object({
    name: z.string(),
    input: z.nullable(smartUnion([
        z.lazy(() => SignalInvocationBodyNetworkEncodedInput$outboundSchema),
        z.record(z.string(), z.any()),
    ])).optional(),
});
export function signalInvocationBodyToJSON(signalInvocationBody) {
    return JSON.stringify(SignalInvocationBody$outboundSchema.parse(signalInvocationBody));
}
//# sourceMappingURL=signalinvocationbody.js.map