"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.atsCreateNotesRequestDtoFromJSON = exports.atsCreateNotesRequestDtoToJSON = exports.AtsCreateNotesRequestDto$ = exports.AtsCreateNotesRequestDto$outboundSchema = exports.AtsCreateNotesRequestDto$inboundSchema = exports.visibilityFromJSON = exports.visibilityToJSON = exports.Visibility$ = exports.Visibility$outboundSchema = exports.Visibility$inboundSchema = exports.AtsCreateNotesRequestDtoValue$ = exports.AtsCreateNotesRequestDtoValue$outboundSchema = exports.AtsCreateNotesRequestDtoValue$inboundSchema = exports.atsCreateNotesRequestDtoSourceValueFromJSON = exports.atsCreateNotesRequestDtoSourceValueToJSON = exports.AtsCreateNotesRequestDtoSourceValue$ = exports.AtsCreateNotesRequestDtoSourceValue$outboundSchema = exports.AtsCreateNotesRequestDtoSourceValue$inboundSchema = exports.atsCreateNotesRequestDto4FromJSON = exports.atsCreateNotesRequestDto4ToJSON = exports.AtsCreateNotesRequestDto4$ = exports.AtsCreateNotesRequestDto4$outboundSchema = exports.AtsCreateNotesRequestDto4$inboundSchema = exports.AtsCreateNotesRequestDtoValue = 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 notecontentapimodel_js_1 = require("./notecontentapimodel.js");
/**
 * The visibility of the notes.
 */
var AtsCreateNotesRequestDtoValue;
(function (AtsCreateNotesRequestDtoValue) {
    AtsCreateNotesRequestDtoValue["Private"] = "private";
    AtsCreateNotesRequestDtoValue["Public"] = "public";
})(AtsCreateNotesRequestDtoValue || (exports.AtsCreateNotesRequestDtoValue = AtsCreateNotesRequestDtoValue = {}));
/** @internal */
exports.AtsCreateNotesRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.AtsCreateNotesRequestDto4$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 AtsCreateNotesRequestDto4$;
(function (AtsCreateNotesRequestDto4$) {
    /** @deprecated use `AtsCreateNotesRequestDto4$inboundSchema` instead. */
    AtsCreateNotesRequestDto4$.inboundSchema = exports.AtsCreateNotesRequestDto4$inboundSchema;
    /** @deprecated use `AtsCreateNotesRequestDto4$outboundSchema` instead. */
    AtsCreateNotesRequestDto4$.outboundSchema = exports.AtsCreateNotesRequestDto4$outboundSchema;
})(AtsCreateNotesRequestDto4$ || (exports.AtsCreateNotesRequestDto4$ = AtsCreateNotesRequestDto4$ = {}));
function atsCreateNotesRequestDto4ToJSON(atsCreateNotesRequestDto4) {
    return JSON.stringify(exports.AtsCreateNotesRequestDto4$outboundSchema.parse(atsCreateNotesRequestDto4));
}
exports.atsCreateNotesRequestDto4ToJSON = atsCreateNotesRequestDto4ToJSON;
function atsCreateNotesRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsCreateNotesRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsCreateNotesRequestDto4' from JSON`);
}
exports.atsCreateNotesRequestDto4FromJSON = atsCreateNotesRequestDto4FromJSON;
/** @internal */
exports.AtsCreateNotesRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.AtsCreateNotesRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.AtsCreateNotesRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.AtsCreateNotesRequestDto4$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 AtsCreateNotesRequestDtoSourceValue$;
(function (AtsCreateNotesRequestDtoSourceValue$) {
    /** @deprecated use `AtsCreateNotesRequestDtoSourceValue$inboundSchema` instead. */
    AtsCreateNotesRequestDtoSourceValue$.inboundSchema = exports.AtsCreateNotesRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `AtsCreateNotesRequestDtoSourceValue$outboundSchema` instead. */
    AtsCreateNotesRequestDtoSourceValue$.outboundSchema = exports.AtsCreateNotesRequestDtoSourceValue$outboundSchema;
})(AtsCreateNotesRequestDtoSourceValue$ || (exports.AtsCreateNotesRequestDtoSourceValue$ = AtsCreateNotesRequestDtoSourceValue$ = {}));
function atsCreateNotesRequestDtoSourceValueToJSON(atsCreateNotesRequestDtoSourceValue) {
    return JSON.stringify(exports.AtsCreateNotesRequestDtoSourceValue$outboundSchema.parse(atsCreateNotesRequestDtoSourceValue));
}
exports.atsCreateNotesRequestDtoSourceValueToJSON = atsCreateNotesRequestDtoSourceValueToJSON;
function atsCreateNotesRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsCreateNotesRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsCreateNotesRequestDtoSourceValue' from JSON`);
}
exports.atsCreateNotesRequestDtoSourceValueFromJSON = atsCreateNotesRequestDtoSourceValueFromJSON;
/** @internal */
exports.AtsCreateNotesRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(AtsCreateNotesRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.AtsCreateNotesRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(AtsCreateNotesRequestDtoValue),
    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 AtsCreateNotesRequestDtoValue$;
(function (AtsCreateNotesRequestDtoValue$) {
    /** @deprecated use `AtsCreateNotesRequestDtoValue$inboundSchema` instead. */
    AtsCreateNotesRequestDtoValue$.inboundSchema = exports.AtsCreateNotesRequestDtoValue$inboundSchema;
    /** @deprecated use `AtsCreateNotesRequestDtoValue$outboundSchema` instead. */
    AtsCreateNotesRequestDtoValue$.outboundSchema = exports.AtsCreateNotesRequestDtoValue$outboundSchema;
})(AtsCreateNotesRequestDtoValue$ || (exports.AtsCreateNotesRequestDtoValue$ = AtsCreateNotesRequestDtoValue$ = {}));
/** @internal */
exports.Visibility$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.AtsCreateNotesRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsCreateNotesRequestDtoValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.Visibility$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.AtsCreateNotesRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsCreateNotesRequestDtoValue$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 Visibility$;
(function (Visibility$) {
    /** @deprecated use `Visibility$inboundSchema` instead. */
    Visibility$.inboundSchema = exports.Visibility$inboundSchema;
    /** @deprecated use `Visibility$outboundSchema` instead. */
    Visibility$.outboundSchema = exports.Visibility$outboundSchema;
})(Visibility$ || (exports.Visibility$ = Visibility$ = {}));
function visibilityToJSON(visibility) {
    return JSON.stringify(exports.Visibility$outboundSchema.parse(visibility));
}
exports.visibilityToJSON = visibilityToJSON;
function visibilityFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Visibility$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Visibility' from JSON`);
}
exports.visibilityFromJSON = visibilityFromJSON;
/** @internal */
exports.AtsCreateNotesRequestDto$inboundSchema = z.object({
    author_id: z.nullable(z.string()).optional(),
    content: z.nullable(z.array(notecontentapimodel_js_1.NoteContentApiModel$inboundSchema)).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    visibility: z.nullable(z.lazy(() => exports.Visibility$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "author_id": "authorId",
    });
});
/** @internal */
exports.AtsCreateNotesRequestDto$outboundSchema = z.object({
    authorId: z.nullable(z.string()).optional(),
    content: z.nullable(z.array(notecontentapimodel_js_1.NoteContentApiModel$outboundSchema)).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    visibility: z.nullable(z.lazy(() => exports.Visibility$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        authorId: "author_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsCreateNotesRequestDto$;
(function (AtsCreateNotesRequestDto$) {
    /** @deprecated use `AtsCreateNotesRequestDto$inboundSchema` instead. */
    AtsCreateNotesRequestDto$.inboundSchema = exports.AtsCreateNotesRequestDto$inboundSchema;
    /** @deprecated use `AtsCreateNotesRequestDto$outboundSchema` instead. */
    AtsCreateNotesRequestDto$.outboundSchema = exports.AtsCreateNotesRequestDto$outboundSchema;
})(AtsCreateNotesRequestDto$ || (exports.AtsCreateNotesRequestDto$ = AtsCreateNotesRequestDto$ = {}));
function atsCreateNotesRequestDtoToJSON(atsCreateNotesRequestDto) {
    return JSON.stringify(exports.AtsCreateNotesRequestDto$outboundSchema.parse(atsCreateNotesRequestDto));
}
exports.atsCreateNotesRequestDtoToJSON = atsCreateNotesRequestDtoToJSON;
function atsCreateNotesRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsCreateNotesRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsCreateNotesRequestDto' from JSON`);
}
exports.atsCreateNotesRequestDtoFromJSON = atsCreateNotesRequestDtoFromJSON;
//# sourceMappingURL=atscreatenotesrequestdto.js.map