"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.SupportTicketMessage$ = exports.SupportTicketMessage$outboundSchema = exports.SupportTicketMessage$inboundSchema = exports.SupportTicketMessageLinks$ = exports.SupportTicketMessageLinks$outboundSchema = exports.SupportTicketMessageLinks$inboundSchema = exports.SupportTicketMessageLinksType$ = exports.SupportTicketMessageLinksType$outboundSchema = exports.SupportTicketMessageLinksType$inboundSchema = exports.Type1$ = exports.Type1$outboundSchema = exports.Type1$inboundSchema = exports.SupportTicketMessageType$ = exports.SupportTicketMessageType$outboundSchema = exports.SupportTicketMessageType$inboundSchema = exports.Type1 = exports.SupportTicketMessageType = void 0;
exports.supportTicketMessageLinksTypeToJSON = supportTicketMessageLinksTypeToJSON;
exports.supportTicketMessageLinksTypeFromJSON = supportTicketMessageLinksTypeFromJSON;
exports.supportTicketMessageLinksToJSON = supportTicketMessageLinksToJSON;
exports.supportTicketMessageLinksFromJSON = supportTicketMessageLinksFromJSON;
exports.supportTicketMessageToJSON = supportTicketMessageToJSON;
exports.supportTicketMessageFromJSON = supportTicketMessageFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.SupportTicketMessageType = {
    SupportTicket: "support_ticket",
};
exports.Type1 = {
    Documentation: "documentation",
    Site: "site",
    DiscoursePost: "discourse_post",
    GithubIssue: "github_issue",
    GithubDiscussion: "github_discussion",
    StackoverflowQuestion: "stackoverflow_question",
    DiscordForumPost: "discord_forum_post",
    DiscordMessage: "discord_message",
    CustomQuestionAnswer: "custom_question_answer",
};
/** @internal */
exports.SupportTicketMessageType$inboundSchema = z.nativeEnum(exports.SupportTicketMessageType);
/** @internal */
exports.SupportTicketMessageType$outboundSchema = exports.SupportTicketMessageType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SupportTicketMessageType$;
(function (SupportTicketMessageType$) {
    /** @deprecated use `SupportTicketMessageType$inboundSchema` instead. */
    SupportTicketMessageType$.inboundSchema = exports.SupportTicketMessageType$inboundSchema;
    /** @deprecated use `SupportTicketMessageType$outboundSchema` instead. */
    SupportTicketMessageType$.outboundSchema = exports.SupportTicketMessageType$outboundSchema;
})(SupportTicketMessageType$ || (exports.SupportTicketMessageType$ = SupportTicketMessageType$ = {}));
/** @internal */
exports.Type1$inboundSchema = z.nativeEnum(exports.Type1);
/** @internal */
exports.Type1$outboundSchema = exports.Type1$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Type1$;
(function (Type1$) {
    /** @deprecated use `Type1$inboundSchema` instead. */
    Type1$.inboundSchema = exports.Type1$inboundSchema;
    /** @deprecated use `Type1$outboundSchema` instead. */
    Type1$.outboundSchema = exports.Type1$outboundSchema;
})(Type1$ || (exports.Type1$ = Type1$ = {}));
/** @internal */
exports.SupportTicketMessageLinksType$inboundSchema = z.union([exports.Type1$inboundSchema, z.string()]);
/** @internal */
exports.SupportTicketMessageLinksType$outboundSchema = z.union([exports.Type1$outboundSchema, z.string()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SupportTicketMessageLinksType$;
(function (SupportTicketMessageLinksType$) {
    /** @deprecated use `SupportTicketMessageLinksType$inboundSchema` instead. */
    SupportTicketMessageLinksType$.inboundSchema = exports.SupportTicketMessageLinksType$inboundSchema;
    /** @deprecated use `SupportTicketMessageLinksType$outboundSchema` instead. */
    SupportTicketMessageLinksType$.outboundSchema = exports.SupportTicketMessageLinksType$outboundSchema;
})(SupportTicketMessageLinksType$ || (exports.SupportTicketMessageLinksType$ = SupportTicketMessageLinksType$ = {}));
function supportTicketMessageLinksTypeToJSON(supportTicketMessageLinksType) {
    return JSON.stringify(exports.SupportTicketMessageLinksType$outboundSchema.parse(supportTicketMessageLinksType));
}
function supportTicketMessageLinksTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SupportTicketMessageLinksType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportTicketMessageLinksType' from JSON`);
}
/** @internal */
exports.SupportTicketMessageLinks$inboundSchema = z.object({
    label: z.nullable(z.string()).optional(),
    url: z.string(),
    title: z.nullable(z.string()).optional(),
    description: z.nullable(z.string()).optional(),
    type: z.nullable(z.union([exports.Type1$inboundSchema, z.string()])).optional(),
    breadcrumbs: z.nullable(z.array(z.string())).optional(),
});
/** @internal */
exports.SupportTicketMessageLinks$outboundSchema = z.object({
    label: z.nullable(z.string()).optional(),
    url: z.string(),
    title: z.nullable(z.string()).optional(),
    description: z.nullable(z.string()).optional(),
    type: z.nullable(z.union([exports.Type1$outboundSchema, z.string()])).optional(),
    breadcrumbs: z.nullable(z.array(z.string())).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SupportTicketMessageLinks$;
(function (SupportTicketMessageLinks$) {
    /** @deprecated use `SupportTicketMessageLinks$inboundSchema` instead. */
    SupportTicketMessageLinks$.inboundSchema = exports.SupportTicketMessageLinks$inboundSchema;
    /** @deprecated use `SupportTicketMessageLinks$outboundSchema` instead. */
    SupportTicketMessageLinks$.outboundSchema = exports.SupportTicketMessageLinks$outboundSchema;
})(SupportTicketMessageLinks$ || (exports.SupportTicketMessageLinks$ = SupportTicketMessageLinks$ = {}));
function supportTicketMessageLinksToJSON(supportTicketMessageLinks) {
    return JSON.stringify(exports.SupportTicketMessageLinks$outboundSchema.parse(supportTicketMessageLinks));
}
function supportTicketMessageLinksFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SupportTicketMessageLinks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportTicketMessageLinks' from JSON`);
}
/** @internal */
exports.SupportTicketMessage$inboundSchema = z.object({
    id: z.string(),
    type: exports.SupportTicketMessageType$inboundSchema,
    externalId: z.nullable(z.string()),
    externalUrl: z.nullable(z.string()),
    conversationId: z.string(),
    createdAt: z.string(),
    updatedAt: z.string(),
    role: z.string(),
    content: z.nullable(z.string()),
    name: z.nullable(z.string()).optional(),
    links: z.nullable(z.array(z.lazy(() => exports.SupportTicketMessageLinks$inboundSchema))).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/** @internal */
exports.SupportTicketMessage$outboundSchema = z.object({
    id: z.string(),
    type: exports.SupportTicketMessageType$outboundSchema,
    externalId: z.nullable(z.string()),
    externalUrl: z.nullable(z.string()),
    conversationId: z.string(),
    createdAt: z.string(),
    updatedAt: z.string(),
    role: z.string(),
    content: z.nullable(z.string()),
    name: z.nullable(z.string()).optional(),
    links: z.nullable(z.array(z.lazy(() => exports.SupportTicketMessageLinks$outboundSchema))).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SupportTicketMessage$;
(function (SupportTicketMessage$) {
    /** @deprecated use `SupportTicketMessage$inboundSchema` instead. */
    SupportTicketMessage$.inboundSchema = exports.SupportTicketMessage$inboundSchema;
    /** @deprecated use `SupportTicketMessage$outboundSchema` instead. */
    SupportTicketMessage$.outboundSchema = exports.SupportTicketMessage$outboundSchema;
})(SupportTicketMessage$ || (exports.SupportTicketMessage$ = SupportTicketMessage$ = {}));
function supportTicketMessageToJSON(supportTicketMessage) {
    return JSON.stringify(exports.SupportTicketMessage$outboundSchema.parse(supportTicketMessage));
}
function supportTicketMessageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SupportTicketMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportTicketMessage' from JSON`);
}
//# sourceMappingURL=supportticketmessage.js.map