/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 683a521fbc8a
 */

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";

export type ModerationLlmv2CategoryThresholds = {
  sexual?: number | null | undefined;
  hateAndDiscrimination?: number | null | undefined;
  violenceAndThreats?: number | null | undefined;
  dangerous?: number | null | undefined;
  criminal?: number | null | undefined;
  selfharm?: number | null | undefined;
  health?: number | null | undefined;
  financial?: number | null | undefined;
  law?: number | null | undefined;
  pii?: number | null | undefined;
  jailbreaking?: number | null | undefined;
};

/** @internal */
export type ModerationLlmv2CategoryThresholds$Outbound = {
  sexual?: number | null | undefined;
  hate_and_discrimination?: number | null | undefined;
  violence_and_threats?: number | null | undefined;
  dangerous?: number | null | undefined;
  criminal?: number | null | undefined;
  selfharm?: number | null | undefined;
  health?: number | null | undefined;
  financial?: number | null | undefined;
  law?: number | null | undefined;
  pii?: number | null | undefined;
  jailbreaking?: number | null | undefined;
};

/** @internal */
export const ModerationLlmv2CategoryThresholds$outboundSchema: z.ZodType<
  ModerationLlmv2CategoryThresholds$Outbound,
  ModerationLlmv2CategoryThresholds
> = z.object({
  sexual: z.nullable(z.number()).optional(),
  hateAndDiscrimination: z.nullable(z.number()).optional(),
  violenceAndThreats: z.nullable(z.number()).optional(),
  dangerous: z.nullable(z.number()).optional(),
  criminal: z.nullable(z.number()).optional(),
  selfharm: z.nullable(z.number()).optional(),
  health: z.nullable(z.number()).optional(),
  financial: z.nullable(z.number()).optional(),
  law: z.nullable(z.number()).optional(),
  pii: z.nullable(z.number()).optional(),
  jailbreaking: z.nullable(z.number()).optional(),
}).transform((v) => {
  return remap$(v, {
    hateAndDiscrimination: "hate_and_discrimination",
    violenceAndThreats: "violence_and_threats",
  });
});

export function moderationLlmv2CategoryThresholdsToJSON(
  moderationLlmv2CategoryThresholds: ModerationLlmv2CategoryThresholds,
): string {
  return JSON.stringify(
    ModerationLlmv2CategoryThresholds$outboundSchema.parse(
      moderationLlmv2CategoryThresholds,
    ),
  );
}
