"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.TicketingCommentResult$ = exports.TicketingCommentResult$outboundSchema = exports.TicketingCommentResult$inboundSchema = exports.TicketingCommentResultData$ = exports.TicketingCommentResultData$outboundSchema = exports.TicketingCommentResultData$inboundSchema = exports.TicketingCommentResultInternal$ = exports.TicketingCommentResultInternal$outboundSchema = exports.TicketingCommentResultInternal$inboundSchema = exports.TicketingCommentResult2$ = exports.TicketingCommentResult2$outboundSchema = exports.TicketingCommentResult2$inboundSchema = exports.TicketingCommentResult2 = void 0;
exports.ticketingCommentResultInternalToJSON = ticketingCommentResultInternalToJSON;
exports.ticketingCommentResultInternalFromJSON = ticketingCommentResultInternalFromJSON;
exports.ticketingCommentResultDataToJSON = ticketingCommentResultDataToJSON;
exports.ticketingCommentResultDataFromJSON = ticketingCommentResultDataFromJSON;
exports.ticketingCommentResultToJSON = ticketingCommentResultToJSON;
exports.ticketingCommentResultFromJSON = ticketingCommentResultFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const rawresponse_js_1 = require("./rawresponse.js");
const ticketingcontent_js_1 = require("./ticketingcontent.js");
var TicketingCommentResult2;
(function (TicketingCommentResult2) {
    TicketingCommentResult2["True"] = "true";
    TicketingCommentResult2["False"] = "false";
})(TicketingCommentResult2 || (exports.TicketingCommentResult2 = TicketingCommentResult2 = {}));
/** @internal */
exports.TicketingCommentResult2$inboundSchema = z.nativeEnum(TicketingCommentResult2);
/** @internal */
exports.TicketingCommentResult2$outboundSchema = exports.TicketingCommentResult2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingCommentResult2$;
(function (TicketingCommentResult2$) {
    /** @deprecated use `TicketingCommentResult2$inboundSchema` instead. */
    TicketingCommentResult2$.inboundSchema = exports.TicketingCommentResult2$inboundSchema;
    /** @deprecated use `TicketingCommentResult2$outboundSchema` instead. */
    TicketingCommentResult2$.outboundSchema = exports.TicketingCommentResult2$outboundSchema;
})(TicketingCommentResult2$ || (exports.TicketingCommentResult2$ = TicketingCommentResult2$ = {}));
/** @internal */
exports.TicketingCommentResultInternal$inboundSchema = z.union([z.boolean(), exports.TicketingCommentResult2$inboundSchema]);
/** @internal */
exports.TicketingCommentResultInternal$outboundSchema = z.union([z.boolean(), exports.TicketingCommentResult2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingCommentResultInternal$;
(function (TicketingCommentResultInternal$) {
    /** @deprecated use `TicketingCommentResultInternal$inboundSchema` instead. */
    TicketingCommentResultInternal$.inboundSchema = exports.TicketingCommentResultInternal$inboundSchema;
    /** @deprecated use `TicketingCommentResultInternal$outboundSchema` instead. */
    TicketingCommentResultInternal$.outboundSchema = exports.TicketingCommentResultInternal$outboundSchema;
})(TicketingCommentResultInternal$ || (exports.TicketingCommentResultInternal$ = TicketingCommentResultInternal$ = {}));
function ticketingCommentResultInternalToJSON(ticketingCommentResultInternal) {
    return JSON.stringify(exports.TicketingCommentResultInternal$outboundSchema.parse(ticketingCommentResultInternal));
}
function ticketingCommentResultInternalFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingCommentResultInternal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingCommentResultInternal' from JSON`);
}
/** @internal */
exports.TicketingCommentResultData$inboundSchema = z.object({
    content: z.nullable(z.array(ticketingcontent_js_1.TicketingContent$inboundSchema)).optional(),
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    id: z.nullable(z.string()).optional(),
    internal: z.nullable(z.union([z.boolean(), exports.TicketingCommentResult2$inboundSchema])).optional(),
    remote_id: z.nullable(z.string()).optional(),
    ticket_id: z.string(),
    updated_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    user_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "created_at": "createdAt",
        "remote_id": "remoteId",
        "ticket_id": "ticketId",
        "updated_at": "updatedAt",
        "user_id": "userId",
    });
});
/** @internal */
exports.TicketingCommentResultData$outboundSchema = z.object({
    content: z.nullable(z.array(ticketingcontent_js_1.TicketingContent$outboundSchema)).optional(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    id: z.nullable(z.string()).optional(),
    internal: z.nullable(z.union([z.boolean(), exports.TicketingCommentResult2$outboundSchema])).optional(),
    remoteId: z.nullable(z.string()).optional(),
    ticketId: z.string(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    userId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        createdAt: "created_at",
        remoteId: "remote_id",
        ticketId: "ticket_id",
        updatedAt: "updated_at",
        userId: "user_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingCommentResultData$;
(function (TicketingCommentResultData$) {
    /** @deprecated use `TicketingCommentResultData$inboundSchema` instead. */
    TicketingCommentResultData$.inboundSchema = exports.TicketingCommentResultData$inboundSchema;
    /** @deprecated use `TicketingCommentResultData$outboundSchema` instead. */
    TicketingCommentResultData$.outboundSchema = exports.TicketingCommentResultData$outboundSchema;
})(TicketingCommentResultData$ || (exports.TicketingCommentResultData$ = TicketingCommentResultData$ = {}));
function ticketingCommentResultDataToJSON(ticketingCommentResultData) {
    return JSON.stringify(exports.TicketingCommentResultData$outboundSchema.parse(ticketingCommentResultData));
}
function ticketingCommentResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingCommentResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingCommentResultData' from JSON`);
}
/** @internal */
exports.TicketingCommentResult$inboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.TicketingCommentResultData$inboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$inboundSchema)).optional(),
});
/** @internal */
exports.TicketingCommentResult$outboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.TicketingCommentResultData$outboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingCommentResult$;
(function (TicketingCommentResult$) {
    /** @deprecated use `TicketingCommentResult$inboundSchema` instead. */
    TicketingCommentResult$.inboundSchema = exports.TicketingCommentResult$inboundSchema;
    /** @deprecated use `TicketingCommentResult$outboundSchema` instead. */
    TicketingCommentResult$.outboundSchema = exports.TicketingCommentResult$outboundSchema;
})(TicketingCommentResult$ || (exports.TicketingCommentResult$ = TicketingCommentResult$ = {}));
function ticketingCommentResultToJSON(ticketingCommentResult) {
    return JSON.stringify(exports.TicketingCommentResult$outboundSchema.parse(ticketingCommentResult));
}
function ticketingCommentResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingCommentResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingCommentResult' from JSON`);
}
//# sourceMappingURL=ticketingcommentresult.js.map