"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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ticketingCommentResultFromJSON = exports.ticketingCommentResultToJSON = exports.TicketingCommentResult$ = exports.TicketingCommentResult$outboundSchema = exports.TicketingCommentResult$inboundSchema = exports.ticketingCommentResultDataFromJSON = exports.ticketingCommentResultDataToJSON = exports.TicketingCommentResultData$ = exports.TicketingCommentResultData$outboundSchema = exports.TicketingCommentResultData$inboundSchema = void 0;
const z = __importStar(require("zod"));
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");
/** @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.boolean()).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.boolean()).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));
}
exports.ticketingCommentResultDataToJSON = ticketingCommentResultDataToJSON;
function ticketingCommentResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingCommentResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingCommentResultData' from JSON`);
}
exports.ticketingCommentResultDataFromJSON = ticketingCommentResultDataFromJSON;
/** @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));
}
exports.ticketingCommentResultToJSON = ticketingCommentResultToJSON;
function ticketingCommentResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingCommentResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingCommentResult' from JSON`);
}
exports.ticketingCommentResultFromJSON = ticketingCommentResultFromJSON;
//# sourceMappingURL=ticketingcommentresult.js.map