"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.TicketingComponentResult$ = exports.TicketingComponentResult$outboundSchema = exports.TicketingComponentResult$inboundSchema = exports.TicketingComponentResultData$ = exports.TicketingComponentResultData$outboundSchema = exports.TicketingComponentResultData$inboundSchema = void 0;
exports.ticketingComponentResultDataToJSON = ticketingComponentResultDataToJSON;
exports.ticketingComponentResultDataFromJSON = ticketingComponentResultDataFromJSON;
exports.ticketingComponentResultToJSON = ticketingComponentResultToJSON;
exports.ticketingComponentResultFromJSON = ticketingComponentResultFromJSON;
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");
/** @internal */
exports.TicketingComponentResultData$inboundSchema = z.object({
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    description: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    organization_id: z.nullable(z.string()).optional(),
    project_id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    updated_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "created_at": "createdAt",
        "organization_id": "organizationId",
        "project_id": "projectId",
        "remote_id": "remoteId",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.TicketingComponentResultData$outboundSchema = z.object({
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    description: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    organizationId: z.nullable(z.string()).optional(),
    projectId: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        createdAt: "created_at",
        organizationId: "organization_id",
        projectId: "project_id",
        remoteId: "remote_id",
        updatedAt: "updated_at",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingComponentResultData$;
(function (TicketingComponentResultData$) {
    /** @deprecated use `TicketingComponentResultData$inboundSchema` instead. */
    TicketingComponentResultData$.inboundSchema = exports.TicketingComponentResultData$inboundSchema;
    /** @deprecated use `TicketingComponentResultData$outboundSchema` instead. */
    TicketingComponentResultData$.outboundSchema = exports.TicketingComponentResultData$outboundSchema;
})(TicketingComponentResultData$ || (exports.TicketingComponentResultData$ = TicketingComponentResultData$ = {}));
function ticketingComponentResultDataToJSON(ticketingComponentResultData) {
    return JSON.stringify(exports.TicketingComponentResultData$outboundSchema.parse(ticketingComponentResultData));
}
function ticketingComponentResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingComponentResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingComponentResultData' from JSON`);
}
/** @internal */
exports.TicketingComponentResult$inboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.TicketingComponentResultData$inboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$inboundSchema)).optional(),
});
/** @internal */
exports.TicketingComponentResult$outboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.TicketingComponentResultData$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 TicketingComponentResult$;
(function (TicketingComponentResult$) {
    /** @deprecated use `TicketingComponentResult$inboundSchema` instead. */
    TicketingComponentResult$.inboundSchema = exports.TicketingComponentResult$inboundSchema;
    /** @deprecated use `TicketingComponentResult$outboundSchema` instead. */
    TicketingComponentResult$.outboundSchema = exports.TicketingComponentResult$outboundSchema;
})(TicketingComponentResult$ || (exports.TicketingComponentResult$ = TicketingComponentResult$ = {}));
function ticketingComponentResultToJSON(ticketingComponentResult) {
    return JSON.stringify(exports.TicketingComponentResult$outboundSchema.parse(ticketingComponentResult));
}
function ticketingComponentResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingComponentResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingComponentResult' from JSON`);
}
//# sourceMappingURL=ticketingcomponentresult.js.map