"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetChunksCountResponseBody$outboundSchema = exports.GetChunksCountResponseBody$inboundSchema = exports.GetChunksCountRequest$outboundSchema = exports.GetChunksCountRequest$inboundSchema = exports.GetChunksCountRequestBody$outboundSchema = exports.GetChunksCountRequestBody$inboundSchema = void 0;
exports.getChunksCountRequestBodyToJSON = getChunksCountRequestBodyToJSON;
exports.getChunksCountRequestBodyFromJSON = getChunksCountRequestBodyFromJSON;
exports.getChunksCountRequestToJSON = getChunksCountRequestToJSON;
exports.getChunksCountRequestFromJSON = getChunksCountRequestFromJSON;
exports.getChunksCountResponseBodyToJSON = getChunksCountResponseBodyToJSON;
exports.getChunksCountResponseBodyFromJSON = getChunksCountResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.GetChunksCountRequestBody$inboundSchema = z.object({
    q: z.string().default(""),
    enabled: z.boolean().optional(),
    status: z.string().optional(),
});
/** @internal */
exports.GetChunksCountRequestBody$outboundSchema = z.object({
    q: z.string().default(""),
    enabled: z.boolean().optional(),
    status: z.string().optional(),
});
function getChunksCountRequestBodyToJSON(getChunksCountRequestBody) {
    return JSON.stringify(exports.GetChunksCountRequestBody$outboundSchema.parse(getChunksCountRequestBody));
}
function getChunksCountRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetChunksCountRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetChunksCountRequestBody' from JSON`);
}
/** @internal */
exports.GetChunksCountRequest$inboundSchema = z.object({
    knowledge_id: z.string(),
    datasource_id: z.string(),
    RequestBody: z.lazy(() => exports.GetChunksCountRequestBody$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "knowledge_id": "knowledgeId",
        "datasource_id": "datasourceId",
        "RequestBody": "requestBody",
    });
});
/** @internal */
exports.GetChunksCountRequest$outboundSchema = z.object({
    knowledgeId: z.string(),
    datasourceId: z.string(),
    requestBody: z.lazy(() => exports.GetChunksCountRequestBody$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        knowledgeId: "knowledge_id",
        datasourceId: "datasource_id",
        requestBody: "RequestBody",
    });
});
function getChunksCountRequestToJSON(getChunksCountRequest) {
    return JSON.stringify(exports.GetChunksCountRequest$outboundSchema.parse(getChunksCountRequest));
}
function getChunksCountRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetChunksCountRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetChunksCountRequest' from JSON`);
}
/** @internal */
exports.GetChunksCountResponseBody$inboundSchema = z.object({
    count: z.number(),
});
/** @internal */
exports.GetChunksCountResponseBody$outboundSchema = z.object({
    count: z.number(),
});
function getChunksCountResponseBodyToJSON(getChunksCountResponseBody) {
    return JSON.stringify(exports.GetChunksCountResponseBody$outboundSchema.parse(getChunksCountResponseBody));
}
function getChunksCountResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetChunksCountResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetChunksCountResponseBody' from JSON`);
}
//# sourceMappingURL=getchunkscount.js.map