/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 1b4649c18a8c
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { smartUnion } from "../../types/smartUnion.js";
import { AssistantMessage$outboundSchema, } from "./assistantmessage.js";
import { SystemMessage$outboundSchema, } from "./systemmessage.js";
import { ToolMessage$outboundSchema, } from "./toolmessage.js";
import { UserMessage$outboundSchema, } from "./usermessage.js";
/** @internal */
export const ChatModerationRequestInputs2$outboundSchema = z.union([
    AssistantMessage$outboundSchema.and(z.object({ role: z.literal("assistant") })),
    SystemMessage$outboundSchema,
    ToolMessage$outboundSchema,
    UserMessage$outboundSchema,
]);
export function chatModerationRequestInputs2ToJSON(chatModerationRequestInputs2) {
    return JSON.stringify(ChatModerationRequestInputs2$outboundSchema.parse(chatModerationRequestInputs2));
}
/** @internal */
export const ChatModerationRequestInputs1$outboundSchema = z.union([
    AssistantMessage$outboundSchema.and(z.object({ role: z.literal("assistant") })),
    SystemMessage$outboundSchema,
    ToolMessage$outboundSchema,
    UserMessage$outboundSchema,
]);
export function chatModerationRequestInputs1ToJSON(chatModerationRequestInputs1) {
    return JSON.stringify(ChatModerationRequestInputs1$outboundSchema.parse(chatModerationRequestInputs1));
}
/** @internal */
export const ChatModerationRequestInputs3$outboundSchema = smartUnion([
    z.array(z.union([
        AssistantMessage$outboundSchema.and(z.object({ role: z.literal("assistant") })),
        SystemMessage$outboundSchema,
        ToolMessage$outboundSchema,
        UserMessage$outboundSchema,
    ])),
    z.array(z.array(z.union([
        AssistantMessage$outboundSchema.and(z.object({ role: z.literal("assistant") })),
        SystemMessage$outboundSchema,
        ToolMessage$outboundSchema,
        UserMessage$outboundSchema,
    ]))),
]);
export function chatModerationRequestInputs3ToJSON(chatModerationRequestInputs3) {
    return JSON.stringify(ChatModerationRequestInputs3$outboundSchema.parse(chatModerationRequestInputs3));
}
/** @internal */
export const ChatModerationRequest$outboundSchema = z.object({
    inputs: smartUnion([
        z.array(z.union([
            AssistantMessage$outboundSchema.and(z.object({ role: z.literal("assistant") })),
            SystemMessage$outboundSchema,
            ToolMessage$outboundSchema,
            UserMessage$outboundSchema,
        ])),
        z.array(z.array(z.union([
            AssistantMessage$outboundSchema.and(z.object({ role: z.literal("assistant") })),
            SystemMessage$outboundSchema,
            ToolMessage$outboundSchema,
            UserMessage$outboundSchema,
        ]))),
    ]),
    model: z.string(),
}).transform((v) => {
    return remap$(v, {
        inputs: "input",
    });
});
export function chatModerationRequestToJSON(chatModerationRequest) {
    return JSON.stringify(ChatModerationRequest$outboundSchema.parse(chatModerationRequest));
}
//# sourceMappingURL=chatmoderationrequest.js.map