/*
 * 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";
import { AIVisionGeneralAnalysisData$inboundSchema, AIVisionGeneralAnalysisData$outboundSchema, } from "./aivisiongeneralanalysisdata.js";
import { LimitsObject$inboundSchema, LimitsObject$outboundSchema, } from "./limitsobject.js";
/** @internal */
export const Data$inboundSchema = z
    .object({
    entity: z.string().optional(),
    analysis: AIVisionGeneralAnalysisData$inboundSchema.optional(),
});
/** @internal */
export const Data$outboundSchema = z.object({
    entity: z.string().optional(),
    analysis: AIVisionGeneralAnalysisData$outboundSchema.optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Data$;
(function (Data$) {
    /** @deprecated use `Data$inboundSchema` instead. */
    Data$.inboundSchema = Data$inboundSchema;
    /** @deprecated use `Data$outboundSchema` instead. */
    Data$.outboundSchema = Data$outboundSchema;
})(Data$ || (Data$ = {}));
export function dataToJSON(data) {
    return JSON.stringify(Data$outboundSchema.parse(data));
}
export function dataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Data$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Data' from JSON`);
}
/** @internal */
export const AnalyzeAIVisionGeneralResponse$inboundSchema = z.object({
    limits: z.nullable(LimitsObject$inboundSchema).optional(),
    request_id: z.string().optional(),
    data: z.lazy(() => Data$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "request_id": "requestId",
    });
});
/** @internal */
export const AnalyzeAIVisionGeneralResponse$outboundSchema = z.object({
    limits: z.nullable(LimitsObject$outboundSchema).optional(),
    requestId: z.string().optional(),
    data: z.lazy(() => Data$outboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        requestId: "request_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AnalyzeAIVisionGeneralResponse$;
(function (AnalyzeAIVisionGeneralResponse$) {
    /** @deprecated use `AnalyzeAIVisionGeneralResponse$inboundSchema` instead. */
    AnalyzeAIVisionGeneralResponse$.inboundSchema = AnalyzeAIVisionGeneralResponse$inboundSchema;
    /** @deprecated use `AnalyzeAIVisionGeneralResponse$outboundSchema` instead. */
    AnalyzeAIVisionGeneralResponse$.outboundSchema = AnalyzeAIVisionGeneralResponse$outboundSchema;
})(AnalyzeAIVisionGeneralResponse$ || (AnalyzeAIVisionGeneralResponse$ = {}));
export function analyzeAIVisionGeneralResponseToJSON(analyzeAIVisionGeneralResponse) {
    return JSON.stringify(AnalyzeAIVisionGeneralResponse$outboundSchema.parse(analyzeAIVisionGeneralResponse));
}
export function analyzeAIVisionGeneralResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AnalyzeAIVisionGeneralResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnalyzeAIVisionGeneralResponse' from JSON`);
}
//# sourceMappingURL=analyzeaivisiongeneralresponse.js.map