"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.TicketingTicketCreateRequestDto$outboundSchema = exports.TicketingTicketCreateRequestDtoPriority$outboundSchema = exports.TicketingTicketCreateRequestDtoValue$outboundSchema = exports.TicketingTicketCreateRequestDtoSourceValue$outboundSchema = exports.TicketingTicketCreateRequestDto4$outboundSchema = exports.TicketingTicketCreateRequestDtoValue = void 0;
exports.ticketingTicketCreateRequestDto4ToJSON = ticketingTicketCreateRequestDto4ToJSON;
exports.ticketingTicketCreateRequestDtoSourceValueToJSON = ticketingTicketCreateRequestDtoSourceValueToJSON;
exports.ticketingTicketCreateRequestDtoPriorityToJSON = ticketingTicketCreateRequestDtoPriorityToJSON;
exports.ticketingTicketCreateRequestDtoToJSON = ticketingTicketCreateRequestDtoToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const openEnums = __importStar(require("../../types/enums.js"));
const ticketingcontent_js_1 = require("./ticketingcontent.js");
/**
 * The priority of the ticket.
 */
var TicketingTicketCreateRequestDtoValue;
(function (TicketingTicketCreateRequestDtoValue) {
    TicketingTicketCreateRequestDtoValue["Lowest"] = "lowest";
    TicketingTicketCreateRequestDtoValue["Low"] = "low";
    TicketingTicketCreateRequestDtoValue["Medium"] = "medium";
    TicketingTicketCreateRequestDtoValue["High"] = "high";
    TicketingTicketCreateRequestDtoValue["Highest"] = "highest";
    TicketingTicketCreateRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(TicketingTicketCreateRequestDtoValue || (exports.TicketingTicketCreateRequestDtoValue = TicketingTicketCreateRequestDtoValue = {}));
/** @internal */
exports.TicketingTicketCreateRequestDto4$outboundSchema = z.object({});
function ticketingTicketCreateRequestDto4ToJSON(ticketingTicketCreateRequestDto4) {
    return JSON.stringify(exports.TicketingTicketCreateRequestDto4$outboundSchema.parse(ticketingTicketCreateRequestDto4));
}
/** @internal */
exports.TicketingTicketCreateRequestDtoSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.TicketingTicketCreateRequestDto4$outboundSchema),
    z.array(z.any()),
]);
function ticketingTicketCreateRequestDtoSourceValueToJSON(ticketingTicketCreateRequestDtoSourceValue) {
    return JSON.stringify(exports.TicketingTicketCreateRequestDtoSourceValue$outboundSchema.parse(ticketingTicketCreateRequestDtoSourceValue));
}
/** @internal */
exports.TicketingTicketCreateRequestDtoValue$outboundSchema = openEnums.outboundSchema(TicketingTicketCreateRequestDtoValue);
/** @internal */
exports.TicketingTicketCreateRequestDtoPriority$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.TicketingTicketCreateRequestDto4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingTicketCreateRequestDtoValue$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
function ticketingTicketCreateRequestDtoPriorityToJSON(ticketingTicketCreateRequestDtoPriority) {
    return JSON.stringify(exports.TicketingTicketCreateRequestDtoPriority$outboundSchema.parse(ticketingTicketCreateRequestDtoPriority));
}
/** @internal */
exports.TicketingTicketCreateRequestDto$outboundSchema = z.object({
    assignees: z.nullable(z.array(z.string())).optional(),
    componentIds: z.nullable(z.string()).optional(),
    content: z.nullable(z.array(ticketingcontent_js_1.TicketingContent$outboundSchema)).optional(),
    creatorId: z.nullable(z.string()).optional(),
    organizationId: z.nullable(z.string()).optional(),
    parentId: z.nullable(z.string()).optional(),
    priority: z.nullable(z.lazy(() => exports.TicketingTicketCreateRequestDtoPriority$outboundSchema)).optional(),
    projectId: z.nullable(z.string()).optional(),
    reporters: z.nullable(z.array(z.string())).optional(),
    tags: z.nullable(z.array(z.string())).optional(),
    title: z.nullable(z.string()).optional(),
    type: z.nullable(z.string()).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        componentIds: "component_ids",
        creatorId: "creator_id",
        organizationId: "organization_id",
        parentId: "parent_id",
        projectId: "project_id",
        unifiedCustomFields: "unified_custom_fields",
    });
});
function ticketingTicketCreateRequestDtoToJSON(ticketingTicketCreateRequestDto) {
    return JSON.stringify(exports.TicketingTicketCreateRequestDto$outboundSchema.parse(ticketingTicketCreateRequestDto));
}
//# sourceMappingURL=ticketingticketcreaterequestdto.js.map