/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 10bfea3d4e74
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { ModerationLlmv1Config$inboundSchema, ModerationLlmv1Config$outboundSchema, } from "./moderationllmv1config.js";
import { ModerationLlmv2Config$inboundSchema, ModerationLlmv2Config$outboundSchema, } from "./moderationllmv2config.js";
/** @internal */
export const GuardrailConfig$inboundSchema = z.object({
    block_on_error: z.boolean().default(false),
    moderation_llm_v1: z.nullable(ModerationLlmv1Config$inboundSchema).optional(),
    moderation_llm_v2: z.nullable(ModerationLlmv2Config$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "block_on_error": "blockOnError",
        "moderation_llm_v1": "moderationLlmV1",
        "moderation_llm_v2": "moderationLlmV2",
    });
});
/** @internal */
export const GuardrailConfig$outboundSchema = z.object({
    blockOnError: z.boolean().default(false),
    moderationLlmV1: z.nullable(ModerationLlmv1Config$outboundSchema).optional(),
    moderationLlmV2: z.nullable(ModerationLlmv2Config$outboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        blockOnError: "block_on_error",
        moderationLlmV1: "moderation_llm_v1",
        moderationLlmV2: "moderation_llm_v2",
    });
});
export function guardrailConfigToJSON(guardrailConfig) {
    return JSON.stringify(GuardrailConfig$outboundSchema.parse(guardrailConfig));
}
export function guardrailConfigFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GuardrailConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GuardrailConfig' from JSON`);
}
//# sourceMappingURL=guardrailconfig.js.map