"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.TicketingReadTicketType$outboundSchema = exports.TicketingReadTicketType$inboundSchema = exports.ticketingReadTicketStatusFromJSON = exports.ticketingReadTicketStatusToJSON = exports.TicketingReadTicketStatus$ = exports.TicketingReadTicketStatus$outboundSchema = exports.TicketingReadTicketStatus$inboundSchema = exports.ticketingReadTicketSchemasTypeFromJSON = exports.ticketingReadTicketSchemasTypeToJSON = exports.TicketingReadTicketSchemasType$ = exports.TicketingReadTicketSchemasType$outboundSchema = exports.TicketingReadTicketSchemasType$inboundSchema = exports.TicketingReadTicketSchemasValue$ = exports.TicketingReadTicketSchemasValue$outboundSchema = exports.TicketingReadTicketSchemasValue$inboundSchema = exports.ticketingReadTicketSchemasSourceValueFromJSON = exports.ticketingReadTicketSchemasSourceValueToJSON = exports.TicketingReadTicketSchemasSourceValue$ = exports.TicketingReadTicketSchemasSourceValue$outboundSchema = exports.TicketingReadTicketSchemasSourceValue$inboundSchema = exports.ticketingReadTicketSchemas4FromJSON = exports.ticketingReadTicketSchemas4ToJSON = exports.TicketingReadTicketSchemas4$ = exports.TicketingReadTicketSchemas4$outboundSchema = exports.TicketingReadTicketSchemas4$inboundSchema = exports.priorityFromJSON = exports.priorityToJSON = exports.Priority$ = exports.Priority$outboundSchema = exports.Priority$inboundSchema = exports.TicketingReadTicketValue$ = exports.TicketingReadTicketValue$outboundSchema = exports.TicketingReadTicketValue$inboundSchema = exports.ticketingReadTicketSourceValueFromJSON = exports.ticketingReadTicketSourceValueToJSON = exports.TicketingReadTicketSourceValue$ = exports.TicketingReadTicketSourceValue$outboundSchema = exports.TicketingReadTicketSourceValue$inboundSchema = exports.ticketingReadTicket4FromJSON = exports.ticketingReadTicket4ToJSON = exports.TicketingReadTicket4$ = exports.TicketingReadTicket4$outboundSchema = exports.TicketingReadTicket4$inboundSchema = exports.organizationFromJSON = exports.organizationToJSON = exports.Organization$ = exports.Organization$outboundSchema = exports.Organization$inboundSchema = exports.TicketingReadTicketSchemasValue = exports.TicketingReadTicketValue = void 0;
exports.ticketingReadTicketFromJSON = exports.ticketingReadTicketToJSON = exports.TicketingReadTicket$ = exports.TicketingReadTicket$outboundSchema = exports.TicketingReadTicket$inboundSchema = exports.ticketingReadTicketTypeFromJSON = exports.ticketingReadTicketTypeToJSON = exports.TicketingReadTicketType$ = 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 TicketingReadTicketValue;
(function (TicketingReadTicketValue) {
    TicketingReadTicketValue["Lowest"] = "lowest";
    TicketingReadTicketValue["Low"] = "low";
    TicketingReadTicketValue["Medium"] = "medium";
    TicketingReadTicketValue["High"] = "high";
    TicketingReadTicketValue["Highest"] = "highest";
    TicketingReadTicketValue["UnmappedValue"] = "unmapped_value";
})(TicketingReadTicketValue || (exports.TicketingReadTicketValue = TicketingReadTicketValue = {}));
/**
 * The type of this status
 */
var TicketingReadTicketSchemasValue;
(function (TicketingReadTicketSchemasValue) {
    TicketingReadTicketSchemasValue["ToDo"] = "to-do";
    TicketingReadTicketSchemasValue["InProgress"] = "in-progress";
    TicketingReadTicketSchemasValue["Closed"] = "closed";
    TicketingReadTicketSchemasValue["UnmappedValue"] = "unmapped_value";
})(TicketingReadTicketSchemasValue || (exports.TicketingReadTicketSchemasValue = TicketingReadTicketSchemasValue = {}));
/** @internal */
exports.Organization$inboundSchema = z.object({
    domain: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.Organization$outboundSchema = z.object({
    domain: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        remoteId: "remote_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Organization$;
(function (Organization$) {
    /** @deprecated use `Organization$inboundSchema` instead. */
    Organization$.inboundSchema = exports.Organization$inboundSchema;
    /** @deprecated use `Organization$outboundSchema` instead. */
    Organization$.outboundSchema = exports.Organization$outboundSchema;
})(Organization$ || (exports.Organization$ = Organization$ = {}));
function organizationToJSON(organization) {
    return JSON.stringify(exports.Organization$outboundSchema.parse(organization));
}
exports.organizationToJSON = organizationToJSON;
function organizationFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Organization$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Organization' from JSON`);
}
exports.organizationFromJSON = organizationFromJSON;
/** @internal */
exports.TicketingReadTicket4$inboundSchema = z.object({});
/** @internal */
exports.TicketingReadTicket4$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 TicketingReadTicket4$;
(function (TicketingReadTicket4$) {
    /** @deprecated use `TicketingReadTicket4$inboundSchema` instead. */
    TicketingReadTicket4$.inboundSchema = exports.TicketingReadTicket4$inboundSchema;
    /** @deprecated use `TicketingReadTicket4$outboundSchema` instead. */
    TicketingReadTicket4$.outboundSchema = exports.TicketingReadTicket4$outboundSchema;
})(TicketingReadTicket4$ || (exports.TicketingReadTicket4$ = TicketingReadTicket4$ = {}));
function ticketingReadTicket4ToJSON(ticketingReadTicket4) {
    return JSON.stringify(exports.TicketingReadTicket4$outboundSchema.parse(ticketingReadTicket4));
}
exports.ticketingReadTicket4ToJSON = ticketingReadTicket4ToJSON;
function ticketingReadTicket4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingReadTicket4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingReadTicket4' from JSON`);
}
exports.ticketingReadTicket4FromJSON = ticketingReadTicket4FromJSON;
/** @internal */
exports.TicketingReadTicketSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.TicketingReadTicket4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.TicketingReadTicketSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.TicketingReadTicket4$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 TicketingReadTicketSourceValue$;
(function (TicketingReadTicketSourceValue$) {
    /** @deprecated use `TicketingReadTicketSourceValue$inboundSchema` instead. */
    TicketingReadTicketSourceValue$.inboundSchema = exports.TicketingReadTicketSourceValue$inboundSchema;
    /** @deprecated use `TicketingReadTicketSourceValue$outboundSchema` instead. */
    TicketingReadTicketSourceValue$.outboundSchema = exports.TicketingReadTicketSourceValue$outboundSchema;
})(TicketingReadTicketSourceValue$ || (exports.TicketingReadTicketSourceValue$ = TicketingReadTicketSourceValue$ = {}));
function ticketingReadTicketSourceValueToJSON(ticketingReadTicketSourceValue) {
    return JSON.stringify(exports.TicketingReadTicketSourceValue$outboundSchema.parse(ticketingReadTicketSourceValue));
}
exports.ticketingReadTicketSourceValueToJSON = ticketingReadTicketSourceValueToJSON;
function ticketingReadTicketSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingReadTicketSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingReadTicketSourceValue' from JSON`);
}
exports.ticketingReadTicketSourceValueFromJSON = ticketingReadTicketSourceValueFromJSON;
/** @internal */
exports.TicketingReadTicketValue$inboundSchema = z
    .union([
    z.nativeEnum(TicketingReadTicketValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.TicketingReadTicketValue$outboundSchema = z.union([
    z.nativeEnum(TicketingReadTicketValue),
    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 TicketingReadTicketValue$;
(function (TicketingReadTicketValue$) {
    /** @deprecated use `TicketingReadTicketValue$inboundSchema` instead. */
    TicketingReadTicketValue$.inboundSchema = exports.TicketingReadTicketValue$inboundSchema;
    /** @deprecated use `TicketingReadTicketValue$outboundSchema` instead. */
    TicketingReadTicketValue$.outboundSchema = exports.TicketingReadTicketValue$outboundSchema;
})(TicketingReadTicketValue$ || (exports.TicketingReadTicketValue$ = TicketingReadTicketValue$ = {}));
/** @internal */
exports.Priority$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    source_value: z.nullable(z.union([
        z.lazy(() => exports.TicketingReadTicket4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingReadTicketValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.Priority$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.TicketingReadTicket4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingReadTicketValue$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 Priority$;
(function (Priority$) {
    /** @deprecated use `Priority$inboundSchema` instead. */
    Priority$.inboundSchema = exports.Priority$inboundSchema;
    /** @deprecated use `Priority$outboundSchema` instead. */
    Priority$.outboundSchema = exports.Priority$outboundSchema;
})(Priority$ || (exports.Priority$ = Priority$ = {}));
function priorityToJSON(priority) {
    return JSON.stringify(exports.Priority$outboundSchema.parse(priority));
}
exports.priorityToJSON = priorityToJSON;
function priorityFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Priority$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Priority' from JSON`);
}
exports.priorityFromJSON = priorityFromJSON;
/** @internal */
exports.TicketingReadTicketSchemas4$inboundSchema = z.object({});
/** @internal */
exports.TicketingReadTicketSchemas4$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 TicketingReadTicketSchemas4$;
(function (TicketingReadTicketSchemas4$) {
    /** @deprecated use `TicketingReadTicketSchemas4$inboundSchema` instead. */
    TicketingReadTicketSchemas4$.inboundSchema = exports.TicketingReadTicketSchemas4$inboundSchema;
    /** @deprecated use `TicketingReadTicketSchemas4$outboundSchema` instead. */
    TicketingReadTicketSchemas4$.outboundSchema = exports.TicketingReadTicketSchemas4$outboundSchema;
})(TicketingReadTicketSchemas4$ || (exports.TicketingReadTicketSchemas4$ = TicketingReadTicketSchemas4$ = {}));
function ticketingReadTicketSchemas4ToJSON(ticketingReadTicketSchemas4) {
    return JSON.stringify(exports.TicketingReadTicketSchemas4$outboundSchema.parse(ticketingReadTicketSchemas4));
}
exports.ticketingReadTicketSchemas4ToJSON = ticketingReadTicketSchemas4ToJSON;
function ticketingReadTicketSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingReadTicketSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingReadTicketSchemas4' from JSON`);
}
exports.ticketingReadTicketSchemas4FromJSON = ticketingReadTicketSchemas4FromJSON;
/** @internal */
exports.TicketingReadTicketSchemasSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.TicketingReadTicketSchemas4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.TicketingReadTicketSchemasSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.TicketingReadTicketSchemas4$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 TicketingReadTicketSchemasSourceValue$;
(function (TicketingReadTicketSchemasSourceValue$) {
    /** @deprecated use `TicketingReadTicketSchemasSourceValue$inboundSchema` instead. */
    TicketingReadTicketSchemasSourceValue$.inboundSchema = exports.TicketingReadTicketSchemasSourceValue$inboundSchema;
    /** @deprecated use `TicketingReadTicketSchemasSourceValue$outboundSchema` instead. */
    TicketingReadTicketSchemasSourceValue$.outboundSchema = exports.TicketingReadTicketSchemasSourceValue$outboundSchema;
})(TicketingReadTicketSchemasSourceValue$ || (exports.TicketingReadTicketSchemasSourceValue$ = TicketingReadTicketSchemasSourceValue$ = {}));
function ticketingReadTicketSchemasSourceValueToJSON(ticketingReadTicketSchemasSourceValue) {
    return JSON.stringify(exports.TicketingReadTicketSchemasSourceValue$outboundSchema.parse(ticketingReadTicketSchemasSourceValue));
}
exports.ticketingReadTicketSchemasSourceValueToJSON = ticketingReadTicketSchemasSourceValueToJSON;
function ticketingReadTicketSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingReadTicketSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingReadTicketSchemasSourceValue' from JSON`);
}
exports.ticketingReadTicketSchemasSourceValueFromJSON = ticketingReadTicketSchemasSourceValueFromJSON;
/** @internal */
exports.TicketingReadTicketSchemasValue$inboundSchema = z
    .union([
    z.nativeEnum(TicketingReadTicketSchemasValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.TicketingReadTicketSchemasValue$outboundSchema = z.union([
    z.nativeEnum(TicketingReadTicketSchemasValue),
    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 TicketingReadTicketSchemasValue$;
(function (TicketingReadTicketSchemasValue$) {
    /** @deprecated use `TicketingReadTicketSchemasValue$inboundSchema` instead. */
    TicketingReadTicketSchemasValue$.inboundSchema = exports.TicketingReadTicketSchemasValue$inboundSchema;
    /** @deprecated use `TicketingReadTicketSchemasValue$outboundSchema` instead. */
    TicketingReadTicketSchemasValue$.outboundSchema = exports.TicketingReadTicketSchemasValue$outboundSchema;
})(TicketingReadTicketSchemasValue$ || (exports.TicketingReadTicketSchemasValue$ = TicketingReadTicketSchemasValue$ = {}));
/** @internal */
exports.TicketingReadTicketSchemasType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.TicketingReadTicketSchemas4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingReadTicketSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.TicketingReadTicketSchemasType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.TicketingReadTicketSchemas4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingReadTicketSchemasValue$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 TicketingReadTicketSchemasType$;
(function (TicketingReadTicketSchemasType$) {
    /** @deprecated use `TicketingReadTicketSchemasType$inboundSchema` instead. */
    TicketingReadTicketSchemasType$.inboundSchema = exports.TicketingReadTicketSchemasType$inboundSchema;
    /** @deprecated use `TicketingReadTicketSchemasType$outboundSchema` instead. */
    TicketingReadTicketSchemasType$.outboundSchema = exports.TicketingReadTicketSchemasType$outboundSchema;
})(TicketingReadTicketSchemasType$ || (exports.TicketingReadTicketSchemasType$ = TicketingReadTicketSchemasType$ = {}));
function ticketingReadTicketSchemasTypeToJSON(ticketingReadTicketSchemasType) {
    return JSON.stringify(exports.TicketingReadTicketSchemasType$outboundSchema.parse(ticketingReadTicketSchemasType));
}
exports.ticketingReadTicketSchemasTypeToJSON = ticketingReadTicketSchemasTypeToJSON;
function ticketingReadTicketSchemasTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingReadTicketSchemasType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingReadTicketSchemasType' from JSON`);
}
exports.ticketingReadTicketSchemasTypeFromJSON = ticketingReadTicketSchemasTypeFromJSON;
/** @internal */
exports.TicketingReadTicketStatus$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.TicketingReadTicketSchemasType$inboundSchema))
        .optional(),
});
/** @internal */
exports.TicketingReadTicketStatus$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.TicketingReadTicketSchemasType$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingReadTicketStatus$;
(function (TicketingReadTicketStatus$) {
    /** @deprecated use `TicketingReadTicketStatus$inboundSchema` instead. */
    TicketingReadTicketStatus$.inboundSchema = exports.TicketingReadTicketStatus$inboundSchema;
    /** @deprecated use `TicketingReadTicketStatus$outboundSchema` instead. */
    TicketingReadTicketStatus$.outboundSchema = exports.TicketingReadTicketStatus$outboundSchema;
})(TicketingReadTicketStatus$ || (exports.TicketingReadTicketStatus$ = TicketingReadTicketStatus$ = {}));
function ticketingReadTicketStatusToJSON(ticketingReadTicketStatus) {
    return JSON.stringify(exports.TicketingReadTicketStatus$outboundSchema.parse(ticketingReadTicketStatus));
}
exports.ticketingReadTicketStatusToJSON = ticketingReadTicketStatusToJSON;
function ticketingReadTicketStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingReadTicketStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingReadTicketStatus' from JSON`);
}
exports.ticketingReadTicketStatusFromJSON = ticketingReadTicketStatusFromJSON;
/** @internal */
exports.TicketingReadTicketType$inboundSchema = z.object({
    collection_id: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "collection_id": "collectionId",
    });
});
/** @internal */
exports.TicketingReadTicketType$outboundSchema = z.object({
    collectionId: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        collectionId: "collection_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingReadTicketType$;
(function (TicketingReadTicketType$) {
    /** @deprecated use `TicketingReadTicketType$inboundSchema` instead. */
    TicketingReadTicketType$.inboundSchema = exports.TicketingReadTicketType$inboundSchema;
    /** @deprecated use `TicketingReadTicketType$outboundSchema` instead. */
    TicketingReadTicketType$.outboundSchema = exports.TicketingReadTicketType$outboundSchema;
})(TicketingReadTicketType$ || (exports.TicketingReadTicketType$ = TicketingReadTicketType$ = {}));
function ticketingReadTicketTypeToJSON(ticketingReadTicketType) {
    return JSON.stringify(exports.TicketingReadTicketType$outboundSchema.parse(ticketingReadTicketType));
}
exports.ticketingReadTicketTypeToJSON = ticketingReadTicketTypeToJSON;
function ticketingReadTicketTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingReadTicketType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingReadTicketType' from JSON`);
}
exports.ticketingReadTicketTypeFromJSON = ticketingReadTicketTypeFromJSON;
/** @internal */
exports.TicketingReadTicket$inboundSchema = z.object({
    assignees: z.nullable(z.array(z.string())).optional(),
    closed_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    collections: z.nullable(z.array(z.string())).optional(),
    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(),
    creator_id: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    organization: z.nullable(z.lazy(() => exports.Organization$inboundSchema)).optional(),
    parent_id: z.nullable(z.string()).optional(),
    priority: z.nullable(z.lazy(() => exports.Priority$inboundSchema)).optional(),
    remote_id: z.nullable(z.string()).optional(),
    reporters: z.nullable(z.array(z.string())).optional(),
    status: z.nullable(z.lazy(() => exports.TicketingReadTicketStatus$inboundSchema))
        .optional(),
    tags: z.nullable(z.array(z.string())).optional(),
    ticket_number: z.nullable(z.string()).optional(),
    ticket_url: z.nullable(z.string()).optional(),
    title: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.TicketingReadTicketType$inboundSchema))
        .optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).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, {
        "closed_at": "closedAt",
        "created_at": "createdAt",
        "creator_id": "creatorId",
        "parent_id": "parentId",
        "remote_id": "remoteId",
        "ticket_number": "ticketNumber",
        "ticket_url": "ticketUrl",
        "unified_custom_fields": "unifiedCustomFields",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.TicketingReadTicket$outboundSchema = z.object({
    assignees: z.nullable(z.array(z.string())).optional(),
    closedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    collections: z.nullable(z.array(z.string())).optional(),
    content: z.nullable(z.array(ticketingcontent_js_1.TicketingContent$outboundSchema)).optional(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    creatorId: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    organization: z.nullable(z.lazy(() => exports.Organization$outboundSchema))
        .optional(),
    parentId: z.nullable(z.string()).optional(),
    priority: z.nullable(z.lazy(() => exports.Priority$outboundSchema)).optional(),
    remoteId: z.nullable(z.string()).optional(),
    reporters: z.nullable(z.array(z.string())).optional(),
    status: z.nullable(z.lazy(() => exports.TicketingReadTicketStatus$outboundSchema))
        .optional(),
    tags: z.nullable(z.array(z.string())).optional(),
    ticketNumber: z.nullable(z.string()).optional(),
    ticketUrl: z.nullable(z.string()).optional(),
    title: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.TicketingReadTicketType$outboundSchema))
        .optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        closedAt: "closed_at",
        createdAt: "created_at",
        creatorId: "creator_id",
        parentId: "parent_id",
        remoteId: "remote_id",
        ticketNumber: "ticket_number",
        ticketUrl: "ticket_url",
        unifiedCustomFields: "unified_custom_fields",
        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 TicketingReadTicket$;
(function (TicketingReadTicket$) {
    /** @deprecated use `TicketingReadTicket$inboundSchema` instead. */
    TicketingReadTicket$.inboundSchema = exports.TicketingReadTicket$inboundSchema;
    /** @deprecated use `TicketingReadTicket$outboundSchema` instead. */
    TicketingReadTicket$.outboundSchema = exports.TicketingReadTicket$outboundSchema;
})(TicketingReadTicket$ || (exports.TicketingReadTicket$ = TicketingReadTicket$ = {}));
function ticketingReadTicketToJSON(ticketingReadTicket) {
    return JSON.stringify(exports.TicketingReadTicket$outboundSchema.parse(ticketingReadTicket));
}
exports.ticketingReadTicketToJSON = ticketingReadTicketToJSON;
function ticketingReadTicketFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingReadTicket$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingReadTicket' from JSON`);
}
exports.ticketingReadTicketFromJSON = ticketingReadTicketFromJSON;
//# sourceMappingURL=ticketingreadticket.js.map