"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.TicketingProjectResult$ = exports.TicketingProjectResult$outboundSchema = exports.TicketingProjectResult$inboundSchema = exports.TicketingProjectResultData$ = exports.TicketingProjectResultData$outboundSchema = exports.TicketingProjectResultData$inboundSchema = void 0;
exports.ticketingProjectResultDataToJSON = ticketingProjectResultDataToJSON;
exports.ticketingProjectResultDataFromJSON = ticketingProjectResultDataFromJSON;
exports.ticketingProjectResultToJSON = ticketingProjectResultToJSON;
exports.ticketingProjectResultFromJSON = ticketingProjectResultFromJSON;
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.TicketingProjectResultData$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(),
    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",
        "remote_id": "remoteId",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.TicketingProjectResultData$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(),
    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",
        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 TicketingProjectResultData$;
(function (TicketingProjectResultData$) {
    /** @deprecated use `TicketingProjectResultData$inboundSchema` instead. */
    TicketingProjectResultData$.inboundSchema = exports.TicketingProjectResultData$inboundSchema;
    /** @deprecated use `TicketingProjectResultData$outboundSchema` instead. */
    TicketingProjectResultData$.outboundSchema = exports.TicketingProjectResultData$outboundSchema;
})(TicketingProjectResultData$ || (exports.TicketingProjectResultData$ = TicketingProjectResultData$ = {}));
function ticketingProjectResultDataToJSON(ticketingProjectResultData) {
    return JSON.stringify(exports.TicketingProjectResultData$outboundSchema.parse(ticketingProjectResultData));
}
function ticketingProjectResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingProjectResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingProjectResultData' from JSON`);
}
/** @internal */
exports.TicketingProjectResult$inboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.TicketingProjectResultData$inboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$inboundSchema)).optional(),
});
/** @internal */
exports.TicketingProjectResult$outboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.TicketingProjectResultData$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 TicketingProjectResult$;
(function (TicketingProjectResult$) {
    /** @deprecated use `TicketingProjectResult$inboundSchema` instead. */
    TicketingProjectResult$.inboundSchema = exports.TicketingProjectResult$inboundSchema;
    /** @deprecated use `TicketingProjectResult$outboundSchema` instead. */
    TicketingProjectResult$.outboundSchema = exports.TicketingProjectResult$outboundSchema;
})(TicketingProjectResult$ || (exports.TicketingProjectResult$ = TicketingProjectResult$ = {}));
function ticketingProjectResultToJSON(ticketingProjectResult) {
    return JSON.stringify(exports.TicketingProjectResult$outboundSchema.parse(ticketingProjectResult));
}
function ticketingProjectResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingProjectResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingProjectResult' from JSON`);
}
//# sourceMappingURL=ticketingprojectresult.js.map