/*
 * 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";
/** @internal */
export const Detections$inboundSchema = z.object({
    name: z.string(),
    confidence: z.number(),
});
/** @internal */
export const Detections$outboundSchema = z.object({
    name: z.string(),
    confidence: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Detections$;
(function (Detections$) {
    /** @deprecated use `Detections$inboundSchema` instead. */
    Detections$.inboundSchema = Detections$inboundSchema;
    /** @deprecated use `Detections$outboundSchema` instead. */
    Detections$.outboundSchema = Detections$outboundSchema;
})(Detections$ || (Detections$ = {}));
export function detectionsToJSON(detections) {
    return JSON.stringify(Detections$outboundSchema.parse(detections));
}
export function detectionsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Detections$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Detections' from JSON`);
}
/** @internal */
export const WatermarkDetectionAnalysisData$inboundSchema = z.object({
    detections: z.array(z.lazy(() => Detections$inboundSchema)).optional(),
    model_version: z.number().int().optional(),
}).transform((v) => {
    return remap$(v, {
        "model_version": "modelVersion",
    });
});
/** @internal */
export const WatermarkDetectionAnalysisData$outboundSchema = z.object({
    detections: z.array(z.lazy(() => Detections$outboundSchema)).optional(),
    modelVersion: z.number().int().optional(),
}).transform((v) => {
    return remap$(v, {
        modelVersion: "model_version",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var WatermarkDetectionAnalysisData$;
(function (WatermarkDetectionAnalysisData$) {
    /** @deprecated use `WatermarkDetectionAnalysisData$inboundSchema` instead. */
    WatermarkDetectionAnalysisData$.inboundSchema = WatermarkDetectionAnalysisData$inboundSchema;
    /** @deprecated use `WatermarkDetectionAnalysisData$outboundSchema` instead. */
    WatermarkDetectionAnalysisData$.outboundSchema = WatermarkDetectionAnalysisData$outboundSchema;
})(WatermarkDetectionAnalysisData$ || (WatermarkDetectionAnalysisData$ = {}));
export function watermarkDetectionAnalysisDataToJSON(watermarkDetectionAnalysisData) {
    return JSON.stringify(WatermarkDetectionAnalysisData$outboundSchema.parse(watermarkDetectionAnalysisData));
}
export function watermarkDetectionAnalysisDataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WatermarkDetectionAnalysisData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WatermarkDetectionAnalysisData' from JSON`);
}
//# sourceMappingURL=watermarkdetectionanalysisdata.js.map