"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.ticketingTicketStatusFromJSON = exports.ticketingTicketStatusToJSON = exports.TicketingTicketStatus$ = exports.TicketingTicketStatus$outboundSchema = exports.TicketingTicketStatus$inboundSchema = exports.ticketingTicketStatusTypeFromJSON = exports.ticketingTicketStatusTypeToJSON = exports.TicketingTicketStatusType$ = exports.TicketingTicketStatusType$outboundSchema = exports.TicketingTicketStatusType$inboundSchema = exports.TicketingTicketStatusValue$ = exports.TicketingTicketStatusValue$outboundSchema = exports.TicketingTicketStatusValue$inboundSchema = exports.ticketingTicketStatusSourceValueFromJSON = exports.ticketingTicketStatusSourceValueToJSON = exports.TicketingTicketStatusSourceValue$ = exports.TicketingTicketStatusSourceValue$outboundSchema = exports.TicketingTicketStatusSourceValue$inboundSchema = exports.ticketingTicketStatus4FromJSON = exports.ticketingTicketStatus4ToJSON = exports.TicketingTicketStatus4$ = exports.TicketingTicketStatus4$outboundSchema = exports.TicketingTicketStatus4$inboundSchema = exports.TicketingTicketStatusValue = 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");
/**
 * The type of this status
 */
var TicketingTicketStatusValue;
(function (TicketingTicketStatusValue) {
    TicketingTicketStatusValue["ToDo"] = "to-do";
    TicketingTicketStatusValue["InProgress"] = "in-progress";
    TicketingTicketStatusValue["Closed"] = "closed";
    TicketingTicketStatusValue["UnmappedValue"] = "unmapped_value";
})(TicketingTicketStatusValue || (exports.TicketingTicketStatusValue = TicketingTicketStatusValue = {}));
/** @internal */
exports.TicketingTicketStatus4$inboundSchema = z.object({});
/** @internal */
exports.TicketingTicketStatus4$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 TicketingTicketStatus4$;
(function (TicketingTicketStatus4$) {
    /** @deprecated use `TicketingTicketStatus4$inboundSchema` instead. */
    TicketingTicketStatus4$.inboundSchema = exports.TicketingTicketStatus4$inboundSchema;
    /** @deprecated use `TicketingTicketStatus4$outboundSchema` instead. */
    TicketingTicketStatus4$.outboundSchema = exports.TicketingTicketStatus4$outboundSchema;
})(TicketingTicketStatus4$ || (exports.TicketingTicketStatus4$ = TicketingTicketStatus4$ = {}));
function ticketingTicketStatus4ToJSON(ticketingTicketStatus4) {
    return JSON.stringify(exports.TicketingTicketStatus4$outboundSchema.parse(ticketingTicketStatus4));
}
exports.ticketingTicketStatus4ToJSON = ticketingTicketStatus4ToJSON;
function ticketingTicketStatus4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketStatus4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketStatus4' from JSON`);
}
exports.ticketingTicketStatus4FromJSON = ticketingTicketStatus4FromJSON;
/** @internal */
exports.TicketingTicketStatusSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.TicketingTicketStatus4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.TicketingTicketStatusSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.TicketingTicketStatus4$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 TicketingTicketStatusSourceValue$;
(function (TicketingTicketStatusSourceValue$) {
    /** @deprecated use `TicketingTicketStatusSourceValue$inboundSchema` instead. */
    TicketingTicketStatusSourceValue$.inboundSchema = exports.TicketingTicketStatusSourceValue$inboundSchema;
    /** @deprecated use `TicketingTicketStatusSourceValue$outboundSchema` instead. */
    TicketingTicketStatusSourceValue$.outboundSchema = exports.TicketingTicketStatusSourceValue$outboundSchema;
})(TicketingTicketStatusSourceValue$ || (exports.TicketingTicketStatusSourceValue$ = TicketingTicketStatusSourceValue$ = {}));
function ticketingTicketStatusSourceValueToJSON(ticketingTicketStatusSourceValue) {
    return JSON.stringify(exports.TicketingTicketStatusSourceValue$outboundSchema.parse(ticketingTicketStatusSourceValue));
}
exports.ticketingTicketStatusSourceValueToJSON = ticketingTicketStatusSourceValueToJSON;
function ticketingTicketStatusSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketStatusSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketStatusSourceValue' from JSON`);
}
exports.ticketingTicketStatusSourceValueFromJSON = ticketingTicketStatusSourceValueFromJSON;
/** @internal */
exports.TicketingTicketStatusValue$inboundSchema = z
    .union([
    z.nativeEnum(TicketingTicketStatusValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.TicketingTicketStatusValue$outboundSchema = z.union([
    z.nativeEnum(TicketingTicketStatusValue),
    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 TicketingTicketStatusValue$;
(function (TicketingTicketStatusValue$) {
    /** @deprecated use `TicketingTicketStatusValue$inboundSchema` instead. */
    TicketingTicketStatusValue$.inboundSchema = exports.TicketingTicketStatusValue$inboundSchema;
    /** @deprecated use `TicketingTicketStatusValue$outboundSchema` instead. */
    TicketingTicketStatusValue$.outboundSchema = exports.TicketingTicketStatusValue$outboundSchema;
})(TicketingTicketStatusValue$ || (exports.TicketingTicketStatusValue$ = TicketingTicketStatusValue$ = {}));
/** @internal */
exports.TicketingTicketStatusType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.TicketingTicketStatus4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingTicketStatusValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.TicketingTicketStatusType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.TicketingTicketStatus4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.TicketingTicketStatusValue$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 TicketingTicketStatusType$;
(function (TicketingTicketStatusType$) {
    /** @deprecated use `TicketingTicketStatusType$inboundSchema` instead. */
    TicketingTicketStatusType$.inboundSchema = exports.TicketingTicketStatusType$inboundSchema;
    /** @deprecated use `TicketingTicketStatusType$outboundSchema` instead. */
    TicketingTicketStatusType$.outboundSchema = exports.TicketingTicketStatusType$outboundSchema;
})(TicketingTicketStatusType$ || (exports.TicketingTicketStatusType$ = TicketingTicketStatusType$ = {}));
function ticketingTicketStatusTypeToJSON(ticketingTicketStatusType) {
    return JSON.stringify(exports.TicketingTicketStatusType$outboundSchema.parse(ticketingTicketStatusType));
}
exports.ticketingTicketStatusTypeToJSON = ticketingTicketStatusTypeToJSON;
function ticketingTicketStatusTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketStatusType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketStatusType' from JSON`);
}
exports.ticketingTicketStatusTypeFromJSON = ticketingTicketStatusTypeFromJSON;
/** @internal */
exports.TicketingTicketStatus$inboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.TicketingTicketStatusType$inboundSchema))
        .optional(),
});
/** @internal */
exports.TicketingTicketStatus$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    type: z.nullable(z.lazy(() => exports.TicketingTicketStatusType$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingTicketStatus$;
(function (TicketingTicketStatus$) {
    /** @deprecated use `TicketingTicketStatus$inboundSchema` instead. */
    TicketingTicketStatus$.inboundSchema = exports.TicketingTicketStatus$inboundSchema;
    /** @deprecated use `TicketingTicketStatus$outboundSchema` instead. */
    TicketingTicketStatus$.outboundSchema = exports.TicketingTicketStatus$outboundSchema;
})(TicketingTicketStatus$ || (exports.TicketingTicketStatus$ = TicketingTicketStatus$ = {}));
function ticketingTicketStatusToJSON(ticketingTicketStatus) {
    return JSON.stringify(exports.TicketingTicketStatus$outboundSchema.parse(ticketingTicketStatus));
}
exports.ticketingTicketStatusToJSON = ticketingTicketStatusToJSON;
function ticketingTicketStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingTicketStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingTicketStatus' from JSON`);
}
exports.ticketingTicketStatusFromJSON = ticketingTicketStatusFromJSON;
//# sourceMappingURL=ticketingticketstatus.js.map