"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.CreateFeedbackResponseBody$outboundSchema = exports.CreateFeedbackResponseBody$inboundSchema = exports.CreateFeedbackValue$outboundSchema = exports.CreateFeedbackValue$inboundSchema = exports.CreateFeedbackRequestBody$outboundSchema = exports.CreateFeedbackRequestBody$inboundSchema = exports.Value$outboundSchema = exports.Value$inboundSchema = void 0;
exports.valueToJSON = valueToJSON;
exports.valueFromJSON = valueFromJSON;
exports.createFeedbackRequestBodyToJSON = createFeedbackRequestBodyToJSON;
exports.createFeedbackRequestBodyFromJSON = createFeedbackRequestBodyFromJSON;
exports.createFeedbackValueToJSON = createFeedbackValueToJSON;
exports.createFeedbackValueFromJSON = createFeedbackValueFromJSON;
exports.createFeedbackResponseBodyToJSON = createFeedbackResponseBodyToJSON;
exports.createFeedbackResponseBodyFromJSON = createFeedbackResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.Value$inboundSchema = z
    .union([z.string(), z.number(), z.array(z.string())]);
/** @internal */
exports.Value$outboundSchema = z.union([z.string(), z.number(), z.array(z.string())]);
function valueToJSON(value) {
    return JSON.stringify(exports.Value$outboundSchema.parse(value));
}
function valueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Value$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Value' from JSON`);
}
/** @internal */
exports.CreateFeedbackRequestBody$inboundSchema = z.object({
    property: z.string(),
    value: z.union([z.string(), z.number(), z.array(z.string())]),
    trace_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "property": "field",
        "trace_id": "traceId",
    });
});
/** @internal */
exports.CreateFeedbackRequestBody$outboundSchema = z.object({
    field: z.string(),
    value: z.union([z.string(), z.number(), z.array(z.string())]),
    traceId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        field: "property",
        traceId: "trace_id",
    });
});
function createFeedbackRequestBodyToJSON(createFeedbackRequestBody) {
    return JSON.stringify(exports.CreateFeedbackRequestBody$outboundSchema.parse(createFeedbackRequestBody));
}
function createFeedbackRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateFeedbackRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateFeedbackRequestBody' from JSON`);
}
/** @internal */
exports.CreateFeedbackValue$inboundSchema = z.union([z.string(), z.number(), z.array(z.string())]);
/** @internal */
exports.CreateFeedbackValue$outboundSchema = z.union([z.string(), z.number(), z.array(z.string())]);
function createFeedbackValueToJSON(createFeedbackValue) {
    return JSON.stringify(exports.CreateFeedbackValue$outboundSchema.parse(createFeedbackValue));
}
function createFeedbackValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateFeedbackValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateFeedbackValue' from JSON`);
}
/** @internal */
exports.CreateFeedbackResponseBody$inboundSchema = z.object({
    property: z.string(),
    value: z.union([z.string(), z.number(), z.array(z.string())]),
    trace_id: z.string(),
    id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "trace_id": "traceId",
    });
});
/** @internal */
exports.CreateFeedbackResponseBody$outboundSchema = z.object({
    property: z.string(),
    value: z.union([z.string(), z.number(), z.array(z.string())]),
    traceId: z.string(),
    id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        traceId: "trace_id",
    });
});
function createFeedbackResponseBodyToJSON(createFeedbackResponseBody) {
    return JSON.stringify(exports.CreateFeedbackResponseBody$outboundSchema.parse(createFeedbackResponseBody));
}
function createFeedbackResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateFeedbackResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateFeedbackResponseBody' from JSON`);
}
//# sourceMappingURL=createfeedback.js.map