/*
 * 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 { CldTextAnalysisData$inboundSchema, CldTextAnalysisData$outboundSchema, } from "./cldtextanalysisdata.js";
import { LimitsObject$inboundSchema, LimitsObject$outboundSchema, } from "./limitsobject.js";
/** @internal */
export const AnalyzeCldTextResponseData$inboundSchema = z.object({
    entity: z.string().optional(),
    analysis: CldTextAnalysisData$inboundSchema.optional(),
});
/** @internal */
export const AnalyzeCldTextResponseData$outboundSchema = z.object({
    entity: z.string().optional(),
    analysis: CldTextAnalysisData$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 AnalyzeCldTextResponseData$;
(function (AnalyzeCldTextResponseData$) {
    /** @deprecated use `AnalyzeCldTextResponseData$inboundSchema` instead. */
    AnalyzeCldTextResponseData$.inboundSchema = AnalyzeCldTextResponseData$inboundSchema;
    /** @deprecated use `AnalyzeCldTextResponseData$outboundSchema` instead. */
    AnalyzeCldTextResponseData$.outboundSchema = AnalyzeCldTextResponseData$outboundSchema;
})(AnalyzeCldTextResponseData$ || (AnalyzeCldTextResponseData$ = {}));
export function analyzeCldTextResponseDataToJSON(analyzeCldTextResponseData) {
    return JSON.stringify(AnalyzeCldTextResponseData$outboundSchema.parse(analyzeCldTextResponseData));
}
export function analyzeCldTextResponseDataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AnalyzeCldTextResponseData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnalyzeCldTextResponseData' from JSON`);
}
/** @internal */
export const AnalyzeCldTextResponse$inboundSchema = z.object({
    limits: z.nullable(LimitsObject$inboundSchema).optional(),
    request_id: z.string().optional(),
    data: z.lazy(() => AnalyzeCldTextResponseData$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "request_id": "requestId",
    });
});
/** @internal */
export const AnalyzeCldTextResponse$outboundSchema = z.object({
    limits: z.nullable(LimitsObject$outboundSchema).optional(),
    requestId: z.string().optional(),
    data: z.lazy(() => AnalyzeCldTextResponseData$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 AnalyzeCldTextResponse$;
(function (AnalyzeCldTextResponse$) {
    /** @deprecated use `AnalyzeCldTextResponse$inboundSchema` instead. */
    AnalyzeCldTextResponse$.inboundSchema = AnalyzeCldTextResponse$inboundSchema;
    /** @deprecated use `AnalyzeCldTextResponse$outboundSchema` instead. */
    AnalyzeCldTextResponse$.outboundSchema = AnalyzeCldTextResponse$outboundSchema;
})(AnalyzeCldTextResponse$ || (AnalyzeCldTextResponse$ = {}));
export function analyzeCldTextResponseToJSON(analyzeCldTextResponse) {
    return JSON.stringify(AnalyzeCldTextResponse$outboundSchema.parse(analyzeCldTextResponse));
}
export function analyzeCldTextResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AnalyzeCldTextResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AnalyzeCldTextResponse' from JSON`);
}
//# sourceMappingURL=analyzecldtextresponse.js.map