"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.TicketingTicketResultType$outboundSchema = exports.TicketingTicketResultType$inboundSchema = exports.ticketingTicketResultStatusFromJSON = exports.ticketingTicketResultStatusToJSON = exports.TicketingTicketResultStatus$ = exports.TicketingTicketResultStatus$outboundSchema = exports.TicketingTicketResultStatus$inboundSchema = exports.ticketingTicketResultSchemasTypeFromJSON = exports.ticketingTicketResultSchemasTypeToJSON = exports.TicketingTicketResultSchemasType$ = exports.TicketingTicketResultSchemasType$outboundSchema = exports.TicketingTicketResultSchemasType$inboundSchema = exports.TicketingTicketResultSchemasValue$ = exports.TicketingTicketResultSchemasValue$outboundSchema = exports.TicketingTicketResultSchemasValue$inboundSchema = exports.ticketingTicketResultSchemasSourceValueFromJSON = exports.ticketingTicketResultSchemasSourceValueToJSON = exports.TicketingTicketResultSchemasSourceValue$ = exports.TicketingTicketResultSchemasSourceValue$outboundSchema = exports.TicketingTicketResultSchemasSourceValue$inboundSchema = exports.ticketingTicketResultSchemas4FromJSON = exports.ticketingTicketResultSchemas4ToJSON = exports.TicketingTicketResultSchemas4$ = exports.TicketingTicketResultSchemas4$outboundSchema = exports.TicketingTicketResultSchemas4$inboundSchema = exports.ticketingTicketResultPriorityFromJSON = exports.ticketingTicketResultPriorityToJSON = exports.TicketingTicketResultPriority$ = exports.TicketingTicketResultPriority$outboundSchema = exports.TicketingTicketResultPriority$inboundSchema = exports.TicketingTicketResultValue$ = exports.TicketingTicketResultValue$outboundSchema = exports.TicketingTicketResultValue$inboundSchema = exports.ticketingTicketResultSourceValueFromJSON = exports.ticketingTicketResultSourceValueToJSON = exports.TicketingTicketResultSourceValue$ = exports.TicketingTicketResultSourceValue$outboundSchema = exports.TicketingTicketResultSourceValue$inboundSchema = exports.ticketingTicketResult4FromJSON = exports.ticketingTicketResult4ToJSON = exports.TicketingTicketResult4$ = exports.TicketingTicketResult4$outboundSchema = exports.TicketingTicketResult4$inboundSchema = exports.ticketingTicketResultOrganizationFromJSON = exports.ticketingTicketResultOrganizationToJSON = exports.TicketingTicketResultOrganization$ = exports.TicketingTicketResultOrganization$outboundSchema = exports.TicketingTicketResultOrganization$inboundSchema = exports.TicketingTicketResultSchemasValue = exports.TicketingTicketResultValue = void 0;
exports.ticketingTicketResultFromJSON = exports.ticketingTicketResultToJSON = exports.TicketingTicketResult$ = exports.TicketingTicketResult$outboundSchema = exports.TicketingTicketResult$inboundSchema = exports.ticketingTicketResultDataFromJSON = exports.ticketingTicketResultDataToJSON = exports.TicketingTicketResultData$ = exports.TicketingTicketResultData$outboundSchema = exports.TicketingTicketResultData$inboundSchema = exports.ticketingTicketResultTypeFromJSON = exports.ticketingTicketResultTypeToJSON = exports.TicketingTicketResultType$ = 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 rawresponse_js_1 = require("./rawresponse.js");
const ticketingcontent_js_1 = require("./ticketingcontent.js");
/**
 * The priority of the ticket.
 */
var TicketingTicketResultValue;
(function (TicketingTicketResultValue) {
    TicketingTicketResultValue["Lowest"] = "lowest";
    TicketingTicketResultValue["Low"] = "low";
    TicketingTicketResultValue["Medium"] = "medium";
    TicketingTicketResultValue["High"] = "high";
    TicketingTicketResultValue["Highest"] = "highest";
    TicketingTicketResultValue["UnmappedValue"] = "unmapped_value";
})(TicketingTicketResultValue || (exports.TicketingTicketResultValue = TicketingTicketResultValue = {}));
/**
 * The type of this status
 */
var TicketingTicketResultSchemasValue;
(function (TicketingTicketResultSchemasValue) {
    TicketingTicketResultSchemasValue["ToDo"] = "to-do";
    TicketingTicketResultSchemasValue["InProgress"] = "in-progress";
    TicketingTicketResultSchemasValue["Closed"] = "closed";
    TicketingTicketResultSchemasValue["UnmappedValue"] = "unmapped_value";
})(TicketingTicketResultSchemasValue || (exports.TicketingTicketResultSchemasValue = TicketingTicketResultSchemasValue = {}));
/** @internal */
exports.TicketingTicketResultOrganization$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.TicketingTicketResultOrganization$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 TicketingTicketResultOrganization$;
(function (TicketingTicketResultOrganization$) {
    /** @deprecated use `TicketingTicketResultOrganization$inboundSchema` instead. */
    TicketingTicketResultOrganization$.inboundSchema = exports.TicketingTicketResultOrganization$inboundSchema;
    /** @deprecated use `TicketingTicketResultOrganization$outboundSchema` instead. */
    TicketingTicketResultOrganization$.outboundSchema = exports.TicketingTicketResultOrganization$outboundSchema;
})(TicketingTicketResultOrganization$ || (exports.TicketingTicketResultOrganization$ = TicketingTicketResultOrganization$ = {}));
function ticketingTicketResultOrganizationToJSON(ticketingTicketResultOrganization) {
    return JSON.stringify(exports.TicketingTicketResultOrganization$outboundSchema.parse(ticketingTicketResultOrganization));
}
exports.ticketingTicketResultOrganizationToJSON = ticketingTicketResultOrganizationToJSON;
function ticketingTicketResultOrganizationFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResultOrganization$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResultOrganization' from JSON`);
}
exports.ticketingTicketResultOrganizationFromJSON = ticketingTicketResultOrganizationFromJSON;
/** @internal */
exports.TicketingTicketResult4$inboundSchema = z.object({});
/** @internal */
exports.TicketingTicketResult4$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 TicketingTicketResult4$;
(function (TicketingTicketResult4$) {
    /** @deprecated use `TicketingTicketResult4$inboundSchema` instead. */
    TicketingTicketResult4$.inboundSchema = exports.TicketingTicketResult4$inboundSchema;
    /** @deprecated use `TicketingTicketResult4$outboundSchema` instead. */
    TicketingTicketResult4$.outboundSchema = exports.TicketingTicketResult4$outboundSchema;
})(TicketingTicketResult4$ || (exports.TicketingTicketResult4$ = TicketingTicketResult4$ = {}));
function ticketingTicketResult4ToJSON(ticketingTicketResult4) {
    return JSON.stringify(exports.TicketingTicketResult4$outboundSchema.parse(ticketingTicketResult4));
}
exports.ticketingTicketResult4ToJSON = ticketingTicketResult4ToJSON;
function ticketingTicketResult4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResult4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResult4' from JSON`);
}
exports.ticketingTicketResult4FromJSON = ticketingTicketResult4FromJSON;
/** @internal */
exports.TicketingTicketResultSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.TicketingTicketResult4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.TicketingTicketResultSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.TicketingTicketResult4$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 TicketingTicketResultSourceValue$;
(function (TicketingTicketResultSourceValue$) {
    /** @deprecated use `TicketingTicketResultSourceValue$inboundSchema` instead. */
    TicketingTicketResultSourceValue$.inboundSchema = exports.TicketingTicketResultSourceValue$inboundSchema;
    /** @deprecated use `TicketingTicketResultSourceValue$outboundSchema` instead. */
    TicketingTicketResultSourceValue$.outboundSchema = exports.TicketingTicketResultSourceValue$outboundSchema;
})(TicketingTicketResultSourceValue$ || (exports.TicketingTicketResultSourceValue$ = TicketingTicketResultSourceValue$ = {}));
function ticketingTicketResultSourceValueToJSON(ticketingTicketResultSourceValue) {
    return JSON.stringify(exports.TicketingTicketResultSourceValue$outboundSchema.parse(ticketingTicketResultSourceValue));
}
exports.ticketingTicketResultSourceValueToJSON = ticketingTicketResultSourceValueToJSON;
function ticketingTicketResultSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResultSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResultSourceValue' from JSON`);
}
exports.ticketingTicketResultSourceValueFromJSON = ticketingTicketResultSourceValueFromJSON;
/** @internal */
exports.TicketingTicketResultValue$inboundSchema = z
    .union([
    z.nativeEnum(TicketingTicketResultValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.TicketingTicketResultValue$outboundSchema = z.union([
    z.nativeEnum(TicketingTicketResultValue),
    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 TicketingTicketResultValue$;
(function (TicketingTicketResultValue$) {
    /** @deprecated use `TicketingTicketResultValue$inboundSchema` instead. */
    TicketingTicketResultValue$.inboundSchema = exports.TicketingTicketResultValue$inboundSchema;
    /** @deprecated use `TicketingTicketResultValue$outboundSchema` instead. */
    TicketingTicketResultValue$.outboundSchema = exports.TicketingTicketResultValue$outboundSchema;
})(TicketingTicketResultValue$ || (exports.TicketingTicketResultValue$ = TicketingTicketResultValue$ = {}));
/** @internal */
exports.TicketingTicketResultPriority$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    source_value: z.nullable(z.union([
        z.lazy(() => exports.TicketingTicketResult4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingTicketResultValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.TicketingTicketResultPriority$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.TicketingTicketResult4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingTicketResultValue$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 TicketingTicketResultPriority$;
(function (TicketingTicketResultPriority$) {
    /** @deprecated use `TicketingTicketResultPriority$inboundSchema` instead. */
    TicketingTicketResultPriority$.inboundSchema = exports.TicketingTicketResultPriority$inboundSchema;
    /** @deprecated use `TicketingTicketResultPriority$outboundSchema` instead. */
    TicketingTicketResultPriority$.outboundSchema = exports.TicketingTicketResultPriority$outboundSchema;
})(TicketingTicketResultPriority$ || (exports.TicketingTicketResultPriority$ = TicketingTicketResultPriority$ = {}));
function ticketingTicketResultPriorityToJSON(ticketingTicketResultPriority) {
    return JSON.stringify(exports.TicketingTicketResultPriority$outboundSchema.parse(ticketingTicketResultPriority));
}
exports.ticketingTicketResultPriorityToJSON = ticketingTicketResultPriorityToJSON;
function ticketingTicketResultPriorityFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResultPriority$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResultPriority' from JSON`);
}
exports.ticketingTicketResultPriorityFromJSON = ticketingTicketResultPriorityFromJSON;
/** @internal */
exports.TicketingTicketResultSchemas4$inboundSchema = z.object({});
/** @internal */
exports.TicketingTicketResultSchemas4$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 TicketingTicketResultSchemas4$;
(function (TicketingTicketResultSchemas4$) {
    /** @deprecated use `TicketingTicketResultSchemas4$inboundSchema` instead. */
    TicketingTicketResultSchemas4$.inboundSchema = exports.TicketingTicketResultSchemas4$inboundSchema;
    /** @deprecated use `TicketingTicketResultSchemas4$outboundSchema` instead. */
    TicketingTicketResultSchemas4$.outboundSchema = exports.TicketingTicketResultSchemas4$outboundSchema;
})(TicketingTicketResultSchemas4$ || (exports.TicketingTicketResultSchemas4$ = TicketingTicketResultSchemas4$ = {}));
function ticketingTicketResultSchemas4ToJSON(ticketingTicketResultSchemas4) {
    return JSON.stringify(exports.TicketingTicketResultSchemas4$outboundSchema.parse(ticketingTicketResultSchemas4));
}
exports.ticketingTicketResultSchemas4ToJSON = ticketingTicketResultSchemas4ToJSON;
function ticketingTicketResultSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResultSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResultSchemas4' from JSON`);
}
exports.ticketingTicketResultSchemas4FromJSON = ticketingTicketResultSchemas4FromJSON;
/** @internal */
exports.TicketingTicketResultSchemasSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.TicketingTicketResultSchemas4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.TicketingTicketResultSchemasSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.TicketingTicketResultSchemas4$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 TicketingTicketResultSchemasSourceValue$;
(function (TicketingTicketResultSchemasSourceValue$) {
    /** @deprecated use `TicketingTicketResultSchemasSourceValue$inboundSchema` instead. */
    TicketingTicketResultSchemasSourceValue$.inboundSchema = exports.TicketingTicketResultSchemasSourceValue$inboundSchema;
    /** @deprecated use `TicketingTicketResultSchemasSourceValue$outboundSchema` instead. */
    TicketingTicketResultSchemasSourceValue$.outboundSchema = exports.TicketingTicketResultSchemasSourceValue$outboundSchema;
})(TicketingTicketResultSchemasSourceValue$ || (exports.TicketingTicketResultSchemasSourceValue$ = TicketingTicketResultSchemasSourceValue$ = {}));
function ticketingTicketResultSchemasSourceValueToJSON(ticketingTicketResultSchemasSourceValue) {
    return JSON.stringify(exports.TicketingTicketResultSchemasSourceValue$outboundSchema.parse(ticketingTicketResultSchemasSourceValue));
}
exports.ticketingTicketResultSchemasSourceValueToJSON = ticketingTicketResultSchemasSourceValueToJSON;
function ticketingTicketResultSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResultSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResultSchemasSourceValue' from JSON`);
}
exports.ticketingTicketResultSchemasSourceValueFromJSON = ticketingTicketResultSchemasSourceValueFromJSON;
/** @internal */
exports.TicketingTicketResultSchemasValue$inboundSchema = z
    .union([
    z.nativeEnum(TicketingTicketResultSchemasValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.TicketingTicketResultSchemasValue$outboundSchema = z.union([
    z.nativeEnum(TicketingTicketResultSchemasValue),
    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 TicketingTicketResultSchemasValue$;
(function (TicketingTicketResultSchemasValue$) {
    /** @deprecated use `TicketingTicketResultSchemasValue$inboundSchema` instead. */
    TicketingTicketResultSchemasValue$.inboundSchema = exports.TicketingTicketResultSchemasValue$inboundSchema;
    /** @deprecated use `TicketingTicketResultSchemasValue$outboundSchema` instead. */
    TicketingTicketResultSchemasValue$.outboundSchema = exports.TicketingTicketResultSchemasValue$outboundSchema;
})(TicketingTicketResultSchemasValue$ || (exports.TicketingTicketResultSchemasValue$ = TicketingTicketResultSchemasValue$ = {}));
/** @internal */
exports.TicketingTicketResultSchemasType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.TicketingTicketResultSchemas4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingTicketResultSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.TicketingTicketResultSchemasType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.TicketingTicketResultSchemas4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingTicketResultSchemasValue$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 TicketingTicketResultSchemasType$;
(function (TicketingTicketResultSchemasType$) {
    /** @deprecated use `TicketingTicketResultSchemasType$inboundSchema` instead. */
    TicketingTicketResultSchemasType$.inboundSchema = exports.TicketingTicketResultSchemasType$inboundSchema;
    /** @deprecated use `TicketingTicketResultSchemasType$outboundSchema` instead. */
    TicketingTicketResultSchemasType$.outboundSchema = exports.TicketingTicketResultSchemasType$outboundSchema;
})(TicketingTicketResultSchemasType$ || (exports.TicketingTicketResultSchemasType$ = TicketingTicketResultSchemasType$ = {}));
function ticketingTicketResultSchemasTypeToJSON(ticketingTicketResultSchemasType) {
    return JSON.stringify(exports.TicketingTicketResultSchemasType$outboundSchema.parse(ticketingTicketResultSchemasType));
}
exports.ticketingTicketResultSchemasTypeToJSON = ticketingTicketResultSchemasTypeToJSON;
function ticketingTicketResultSchemasTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResultSchemasType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResultSchemasType' from JSON`);
}
exports.ticketingTicketResultSchemasTypeFromJSON = ticketingTicketResultSchemasTypeFromJSON;
/** @internal */
exports.TicketingTicketResultStatus$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.TicketingTicketResultSchemasType$inboundSchema))
        .optional(),
});
/** @internal */
exports.TicketingTicketResultStatus$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.TicketingTicketResultSchemasType$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingTicketResultStatus$;
(function (TicketingTicketResultStatus$) {
    /** @deprecated use `TicketingTicketResultStatus$inboundSchema` instead. */
    TicketingTicketResultStatus$.inboundSchema = exports.TicketingTicketResultStatus$inboundSchema;
    /** @deprecated use `TicketingTicketResultStatus$outboundSchema` instead. */
    TicketingTicketResultStatus$.outboundSchema = exports.TicketingTicketResultStatus$outboundSchema;
})(TicketingTicketResultStatus$ || (exports.TicketingTicketResultStatus$ = TicketingTicketResultStatus$ = {}));
function ticketingTicketResultStatusToJSON(ticketingTicketResultStatus) {
    return JSON.stringify(exports.TicketingTicketResultStatus$outboundSchema.parse(ticketingTicketResultStatus));
}
exports.ticketingTicketResultStatusToJSON = ticketingTicketResultStatusToJSON;
function ticketingTicketResultStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResultStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResultStatus' from JSON`);
}
exports.ticketingTicketResultStatusFromJSON = ticketingTicketResultStatusFromJSON;
/** @internal */
exports.TicketingTicketResultType$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.TicketingTicketResultType$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 TicketingTicketResultType$;
(function (TicketingTicketResultType$) {
    /** @deprecated use `TicketingTicketResultType$inboundSchema` instead. */
    TicketingTicketResultType$.inboundSchema = exports.TicketingTicketResultType$inboundSchema;
    /** @deprecated use `TicketingTicketResultType$outboundSchema` instead. */
    TicketingTicketResultType$.outboundSchema = exports.TicketingTicketResultType$outboundSchema;
})(TicketingTicketResultType$ || (exports.TicketingTicketResultType$ = TicketingTicketResultType$ = {}));
function ticketingTicketResultTypeToJSON(ticketingTicketResultType) {
    return JSON.stringify(exports.TicketingTicketResultType$outboundSchema.parse(ticketingTicketResultType));
}
exports.ticketingTicketResultTypeToJSON = ticketingTicketResultTypeToJSON;
function ticketingTicketResultTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResultType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResultType' from JSON`);
}
exports.ticketingTicketResultTypeFromJSON = ticketingTicketResultTypeFromJSON;
/** @internal */
exports.TicketingTicketResultData$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.TicketingTicketResultOrganization$inboundSchema)).optional(),
    parent_id: z.nullable(z.string()).optional(),
    priority: z.nullable(z.lazy(() => exports.TicketingTicketResultPriority$inboundSchema)).optional(),
    remote_id: z.nullable(z.string()).optional(),
    reporters: z.nullable(z.array(z.string())).optional(),
    status: z.nullable(z.lazy(() => exports.TicketingTicketResultStatus$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.TicketingTicketResultType$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.TicketingTicketResultData$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.TicketingTicketResultOrganization$outboundSchema)).optional(),
    parentId: z.nullable(z.string()).optional(),
    priority: z.nullable(z.lazy(() => exports.TicketingTicketResultPriority$outboundSchema)).optional(),
    remoteId: z.nullable(z.string()).optional(),
    reporters: z.nullable(z.array(z.string())).optional(),
    status: z.nullable(z.lazy(() => exports.TicketingTicketResultStatus$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.TicketingTicketResultType$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 TicketingTicketResultData$;
(function (TicketingTicketResultData$) {
    /** @deprecated use `TicketingTicketResultData$inboundSchema` instead. */
    TicketingTicketResultData$.inboundSchema = exports.TicketingTicketResultData$inboundSchema;
    /** @deprecated use `TicketingTicketResultData$outboundSchema` instead. */
    TicketingTicketResultData$.outboundSchema = exports.TicketingTicketResultData$outboundSchema;
})(TicketingTicketResultData$ || (exports.TicketingTicketResultData$ = TicketingTicketResultData$ = {}));
function ticketingTicketResultDataToJSON(ticketingTicketResultData) {
    return JSON.stringify(exports.TicketingTicketResultData$outboundSchema.parse(ticketingTicketResultData));
}
exports.ticketingTicketResultDataToJSON = ticketingTicketResultDataToJSON;
function ticketingTicketResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResultData' from JSON`);
}
exports.ticketingTicketResultDataFromJSON = ticketingTicketResultDataFromJSON;
/** @internal */
exports.TicketingTicketResult$inboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.TicketingTicketResultData$inboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$inboundSchema)).optional(),
});
/** @internal */
exports.TicketingTicketResult$outboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.TicketingTicketResultData$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 TicketingTicketResult$;
(function (TicketingTicketResult$) {
    /** @deprecated use `TicketingTicketResult$inboundSchema` instead. */
    TicketingTicketResult$.inboundSchema = exports.TicketingTicketResult$inboundSchema;
    /** @deprecated use `TicketingTicketResult$outboundSchema` instead. */
    TicketingTicketResult$.outboundSchema = exports.TicketingTicketResult$outboundSchema;
})(TicketingTicketResult$ || (exports.TicketingTicketResult$ = TicketingTicketResult$ = {}));
function ticketingTicketResultToJSON(ticketingTicketResult) {
    return JSON.stringify(exports.TicketingTicketResult$outboundSchema.parse(ticketingTicketResult));
}
exports.ticketingTicketResultToJSON = ticketingTicketResultToJSON;
function ticketingTicketResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketResult' from JSON`);
}
exports.ticketingTicketResultFromJSON = ticketingTicketResultFromJSON;
//# sourceMappingURL=ticketingticketresult.js.map