"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.ticketingTicketCreateRequestDtoFromJSON = exports.ticketingTicketCreateRequestDtoToJSON = exports.TicketingTicketCreateRequestDto$ = exports.TicketingTicketCreateRequestDto$outboundSchema = exports.TicketingTicketCreateRequestDto$inboundSchema = exports.ticketingTicketCreateRequestDtoPriorityFromJSON = exports.ticketingTicketCreateRequestDtoPriorityToJSON = exports.TicketingTicketCreateRequestDtoPriority$ = exports.TicketingTicketCreateRequestDtoPriority$outboundSchema = exports.TicketingTicketCreateRequestDtoPriority$inboundSchema = exports.TicketingTicketCreateRequestDtoValue$ = exports.TicketingTicketCreateRequestDtoValue$outboundSchema = exports.TicketingTicketCreateRequestDtoValue$inboundSchema = exports.ticketingTicketCreateRequestDtoSourceValueFromJSON = exports.ticketingTicketCreateRequestDtoSourceValueToJSON = exports.TicketingTicketCreateRequestDtoSourceValue$ = exports.TicketingTicketCreateRequestDtoSourceValue$outboundSchema = exports.TicketingTicketCreateRequestDtoSourceValue$inboundSchema = exports.ticketingTicketCreateRequestDto4FromJSON = exports.ticketingTicketCreateRequestDto4ToJSON = exports.TicketingTicketCreateRequestDto4$ = exports.TicketingTicketCreateRequestDto4$outboundSchema = exports.TicketingTicketCreateRequestDto4$inboundSchema = exports.TicketingTicketCreateRequestDtoValue = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = 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$inboundSchema = z.object({});
/** @internal */
exports.TicketingTicketCreateRequestDto4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingTicketCreateRequestDto4$;
(function (TicketingTicketCreateRequestDto4$) {
    /** @deprecated use `TicketingTicketCreateRequestDto4$inboundSchema` instead. */
    TicketingTicketCreateRequestDto4$.inboundSchema = exports.TicketingTicketCreateRequestDto4$inboundSchema;
    /** @deprecated use `TicketingTicketCreateRequestDto4$outboundSchema` instead. */
    TicketingTicketCreateRequestDto4$.outboundSchema = exports.TicketingTicketCreateRequestDto4$outboundSchema;
})(TicketingTicketCreateRequestDto4$ || (exports.TicketingTicketCreateRequestDto4$ = TicketingTicketCreateRequestDto4$ = {}));
function ticketingTicketCreateRequestDto4ToJSON(ticketingTicketCreateRequestDto4) {
    return JSON.stringify(exports.TicketingTicketCreateRequestDto4$outboundSchema.parse(ticketingTicketCreateRequestDto4));
}
exports.ticketingTicketCreateRequestDto4ToJSON = ticketingTicketCreateRequestDto4ToJSON;
function ticketingTicketCreateRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketCreateRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketCreateRequestDto4' from JSON`);
}
exports.ticketingTicketCreateRequestDto4FromJSON = ticketingTicketCreateRequestDto4FromJSON;
/** @internal */
exports.TicketingTicketCreateRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.TicketingTicketCreateRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.TicketingTicketCreateRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.TicketingTicketCreateRequestDto4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingTicketCreateRequestDtoSourceValue$;
(function (TicketingTicketCreateRequestDtoSourceValue$) {
    /** @deprecated use `TicketingTicketCreateRequestDtoSourceValue$inboundSchema` instead. */
    TicketingTicketCreateRequestDtoSourceValue$.inboundSchema = exports.TicketingTicketCreateRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `TicketingTicketCreateRequestDtoSourceValue$outboundSchema` instead. */
    TicketingTicketCreateRequestDtoSourceValue$.outboundSchema = exports.TicketingTicketCreateRequestDtoSourceValue$outboundSchema;
})(TicketingTicketCreateRequestDtoSourceValue$ || (exports.TicketingTicketCreateRequestDtoSourceValue$ = TicketingTicketCreateRequestDtoSourceValue$ = {}));
function ticketingTicketCreateRequestDtoSourceValueToJSON(ticketingTicketCreateRequestDtoSourceValue) {
    return JSON.stringify(exports.TicketingTicketCreateRequestDtoSourceValue$outboundSchema.parse(ticketingTicketCreateRequestDtoSourceValue));
}
exports.ticketingTicketCreateRequestDtoSourceValueToJSON = ticketingTicketCreateRequestDtoSourceValueToJSON;
function ticketingTicketCreateRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketCreateRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketCreateRequestDtoSourceValue' from JSON`);
}
exports.ticketingTicketCreateRequestDtoSourceValueFromJSON = ticketingTicketCreateRequestDtoSourceValueFromJSON;
/** @internal */
exports.TicketingTicketCreateRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(TicketingTicketCreateRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.TicketingTicketCreateRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(TicketingTicketCreateRequestDtoValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingTicketCreateRequestDtoValue$;
(function (TicketingTicketCreateRequestDtoValue$) {
    /** @deprecated use `TicketingTicketCreateRequestDtoValue$inboundSchema` instead. */
    TicketingTicketCreateRequestDtoValue$.inboundSchema = exports.TicketingTicketCreateRequestDtoValue$inboundSchema;
    /** @deprecated use `TicketingTicketCreateRequestDtoValue$outboundSchema` instead. */
    TicketingTicketCreateRequestDtoValue$.outboundSchema = exports.TicketingTicketCreateRequestDtoValue$outboundSchema;
})(TicketingTicketCreateRequestDtoValue$ || (exports.TicketingTicketCreateRequestDtoValue$ = TicketingTicketCreateRequestDtoValue$ = {}));
/** @internal */
exports.TicketingTicketCreateRequestDtoPriority$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    source_value: z.nullable(z.union([
        z.lazy(() => exports.TicketingTicketCreateRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingTicketCreateRequestDtoValue$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.TicketingTicketCreateRequestDtoPriority$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.TicketingTicketCreateRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingTicketCreateRequestDtoValue$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingTicketCreateRequestDtoPriority$;
(function (TicketingTicketCreateRequestDtoPriority$) {
    /** @deprecated use `TicketingTicketCreateRequestDtoPriority$inboundSchema` instead. */
    TicketingTicketCreateRequestDtoPriority$.inboundSchema = exports.TicketingTicketCreateRequestDtoPriority$inboundSchema;
    /** @deprecated use `TicketingTicketCreateRequestDtoPriority$outboundSchema` instead. */
    TicketingTicketCreateRequestDtoPriority$.outboundSchema = exports.TicketingTicketCreateRequestDtoPriority$outboundSchema;
})(TicketingTicketCreateRequestDtoPriority$ || (exports.TicketingTicketCreateRequestDtoPriority$ = TicketingTicketCreateRequestDtoPriority$ = {}));
function ticketingTicketCreateRequestDtoPriorityToJSON(ticketingTicketCreateRequestDtoPriority) {
    return JSON.stringify(exports.TicketingTicketCreateRequestDtoPriority$outboundSchema.parse(ticketingTicketCreateRequestDtoPriority));
}
exports.ticketingTicketCreateRequestDtoPriorityToJSON = ticketingTicketCreateRequestDtoPriorityToJSON;
function ticketingTicketCreateRequestDtoPriorityFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketCreateRequestDtoPriority$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketCreateRequestDtoPriority' from JSON`);
}
exports.ticketingTicketCreateRequestDtoPriorityFromJSON = ticketingTicketCreateRequestDtoPriorityFromJSON;
/** @internal */
exports.TicketingTicketCreateRequestDto$inboundSchema = z.object({
    assignees: z.nullable(z.array(z.string())).optional(),
    collections: z.nullable(z.array(z.string())).optional(),
    content: z.nullable(z.array(ticketingcontent_js_1.TicketingContent$inboundSchema)).optional(),
    creator_id: z.nullable(z.string()).optional(),
    organization_id: z.nullable(z.string()).optional(),
    parent_id: z.nullable(z.string()).optional(),
    priority: z.nullable(z.lazy(() => exports.TicketingTicketCreateRequestDtoPriority$inboundSchema)).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(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "creator_id": "creatorId",
        "organization_id": "organizationId",
        "parent_id": "parentId",
    });
});
/** @internal */
exports.TicketingTicketCreateRequestDto$outboundSchema = z.object({
    assignees: z.nullable(z.array(z.string())).optional(),
    collections: z.nullable(z.array(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(),
    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(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        creatorId: "creator_id",
        organizationId: "organization_id",
        parentId: "parent_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingTicketCreateRequestDto$;
(function (TicketingTicketCreateRequestDto$) {
    /** @deprecated use `TicketingTicketCreateRequestDto$inboundSchema` instead. */
    TicketingTicketCreateRequestDto$.inboundSchema = exports.TicketingTicketCreateRequestDto$inboundSchema;
    /** @deprecated use `TicketingTicketCreateRequestDto$outboundSchema` instead. */
    TicketingTicketCreateRequestDto$.outboundSchema = exports.TicketingTicketCreateRequestDto$outboundSchema;
})(TicketingTicketCreateRequestDto$ || (exports.TicketingTicketCreateRequestDto$ = TicketingTicketCreateRequestDto$ = {}));
function ticketingTicketCreateRequestDtoToJSON(ticketingTicketCreateRequestDto) {
    return JSON.stringify(exports.TicketingTicketCreateRequestDto$outboundSchema.parse(ticketingTicketCreateRequestDto));
}
exports.ticketingTicketCreateRequestDtoToJSON = ticketingTicketCreateRequestDtoToJSON;
function ticketingTicketCreateRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketCreateRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketCreateRequestDto' from JSON`);
}
exports.ticketingTicketCreateRequestDtoFromJSON = ticketingTicketCreateRequestDtoFromJSON;
//# sourceMappingURL=ticketingticketcreaterequestdto.js.map