"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.atsUpdateNotesRequestDtoFromJSON = exports.atsUpdateNotesRequestDtoToJSON = exports.AtsUpdateNotesRequestDto$ = exports.AtsUpdateNotesRequestDto$outboundSchema = exports.AtsUpdateNotesRequestDto$inboundSchema = exports.atsUpdateNotesRequestDtoVisibilityFromJSON = exports.atsUpdateNotesRequestDtoVisibilityToJSON = exports.AtsUpdateNotesRequestDtoVisibility$ = exports.AtsUpdateNotesRequestDtoVisibility$outboundSchema = exports.AtsUpdateNotesRequestDtoVisibility$inboundSchema = exports.AtsUpdateNotesRequestDtoValue$ = exports.AtsUpdateNotesRequestDtoValue$outboundSchema = exports.AtsUpdateNotesRequestDtoValue$inboundSchema = exports.atsUpdateNotesRequestDtoSourceValueFromJSON = exports.atsUpdateNotesRequestDtoSourceValueToJSON = exports.AtsUpdateNotesRequestDtoSourceValue$ = exports.AtsUpdateNotesRequestDtoSourceValue$outboundSchema = exports.AtsUpdateNotesRequestDtoSourceValue$inboundSchema = exports.atsUpdateNotesRequestDto4FromJSON = exports.atsUpdateNotesRequestDto4ToJSON = exports.AtsUpdateNotesRequestDto4$ = exports.AtsUpdateNotesRequestDto4$outboundSchema = exports.AtsUpdateNotesRequestDto4$inboundSchema = exports.AtsUpdateNotesRequestDtoValue = 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 AtsUpdateNotesRequestDtoValue;
(function (AtsUpdateNotesRequestDtoValue) {
    AtsUpdateNotesRequestDtoValue["Private"] = "private";
    AtsUpdateNotesRequestDtoValue["Public"] = "public";
    AtsUpdateNotesRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(AtsUpdateNotesRequestDtoValue || (exports.AtsUpdateNotesRequestDtoValue = AtsUpdateNotesRequestDtoValue = {}));
/** @internal */
exports.AtsUpdateNotesRequestDto4$inboundSchema = z.object({});
/** @internal */
exports.AtsUpdateNotesRequestDto4$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 AtsUpdateNotesRequestDto4$;
(function (AtsUpdateNotesRequestDto4$) {
    /** @deprecated use `AtsUpdateNotesRequestDto4$inboundSchema` instead. */
    AtsUpdateNotesRequestDto4$.inboundSchema = exports.AtsUpdateNotesRequestDto4$inboundSchema;
    /** @deprecated use `AtsUpdateNotesRequestDto4$outboundSchema` instead. */
    AtsUpdateNotesRequestDto4$.outboundSchema = exports.AtsUpdateNotesRequestDto4$outboundSchema;
})(AtsUpdateNotesRequestDto4$ || (exports.AtsUpdateNotesRequestDto4$ = AtsUpdateNotesRequestDto4$ = {}));
function atsUpdateNotesRequestDto4ToJSON(atsUpdateNotesRequestDto4) {
    return JSON.stringify(exports.AtsUpdateNotesRequestDto4$outboundSchema.parse(atsUpdateNotesRequestDto4));
}
exports.atsUpdateNotesRequestDto4ToJSON = atsUpdateNotesRequestDto4ToJSON;
function atsUpdateNotesRequestDto4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateNotesRequestDto4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateNotesRequestDto4' from JSON`);
}
exports.atsUpdateNotesRequestDto4FromJSON = atsUpdateNotesRequestDto4FromJSON;
/** @internal */
exports.AtsUpdateNotesRequestDtoSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.AtsUpdateNotesRequestDto4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.AtsUpdateNotesRequestDtoSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.AtsUpdateNotesRequestDto4$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 AtsUpdateNotesRequestDtoSourceValue$;
(function (AtsUpdateNotesRequestDtoSourceValue$) {
    /** @deprecated use `AtsUpdateNotesRequestDtoSourceValue$inboundSchema` instead. */
    AtsUpdateNotesRequestDtoSourceValue$.inboundSchema = exports.AtsUpdateNotesRequestDtoSourceValue$inboundSchema;
    /** @deprecated use `AtsUpdateNotesRequestDtoSourceValue$outboundSchema` instead. */
    AtsUpdateNotesRequestDtoSourceValue$.outboundSchema = exports.AtsUpdateNotesRequestDtoSourceValue$outboundSchema;
})(AtsUpdateNotesRequestDtoSourceValue$ || (exports.AtsUpdateNotesRequestDtoSourceValue$ = AtsUpdateNotesRequestDtoSourceValue$ = {}));
function atsUpdateNotesRequestDtoSourceValueToJSON(atsUpdateNotesRequestDtoSourceValue) {
    return JSON.stringify(exports.AtsUpdateNotesRequestDtoSourceValue$outboundSchema.parse(atsUpdateNotesRequestDtoSourceValue));
}
exports.atsUpdateNotesRequestDtoSourceValueToJSON = atsUpdateNotesRequestDtoSourceValueToJSON;
function atsUpdateNotesRequestDtoSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateNotesRequestDtoSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateNotesRequestDtoSourceValue' from JSON`);
}
exports.atsUpdateNotesRequestDtoSourceValueFromJSON = atsUpdateNotesRequestDtoSourceValueFromJSON;
/** @internal */
exports.AtsUpdateNotesRequestDtoValue$inboundSchema = z
    .union([
    z.nativeEnum(AtsUpdateNotesRequestDtoValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.AtsUpdateNotesRequestDtoValue$outboundSchema = z.union([
    z.nativeEnum(AtsUpdateNotesRequestDtoValue),
    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 AtsUpdateNotesRequestDtoValue$;
(function (AtsUpdateNotesRequestDtoValue$) {
    /** @deprecated use `AtsUpdateNotesRequestDtoValue$inboundSchema` instead. */
    AtsUpdateNotesRequestDtoValue$.inboundSchema = exports.AtsUpdateNotesRequestDtoValue$inboundSchema;
    /** @deprecated use `AtsUpdateNotesRequestDtoValue$outboundSchema` instead. */
    AtsUpdateNotesRequestDtoValue$.outboundSchema = exports.AtsUpdateNotesRequestDtoValue$outboundSchema;
})(AtsUpdateNotesRequestDtoValue$ || (exports.AtsUpdateNotesRequestDtoValue$ = AtsUpdateNotesRequestDtoValue$ = {}));
/** @internal */
exports.AtsUpdateNotesRequestDtoVisibility$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.AtsUpdateNotesRequestDto4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsUpdateNotesRequestDtoValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.AtsUpdateNotesRequestDtoVisibility$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.AtsUpdateNotesRequestDto4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsUpdateNotesRequestDtoValue$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 AtsUpdateNotesRequestDtoVisibility$;
(function (AtsUpdateNotesRequestDtoVisibility$) {
    /** @deprecated use `AtsUpdateNotesRequestDtoVisibility$inboundSchema` instead. */
    AtsUpdateNotesRequestDtoVisibility$.inboundSchema = exports.AtsUpdateNotesRequestDtoVisibility$inboundSchema;
    /** @deprecated use `AtsUpdateNotesRequestDtoVisibility$outboundSchema` instead. */
    AtsUpdateNotesRequestDtoVisibility$.outboundSchema = exports.AtsUpdateNotesRequestDtoVisibility$outboundSchema;
})(AtsUpdateNotesRequestDtoVisibility$ || (exports.AtsUpdateNotesRequestDtoVisibility$ = AtsUpdateNotesRequestDtoVisibility$ = {}));
function atsUpdateNotesRequestDtoVisibilityToJSON(atsUpdateNotesRequestDtoVisibility) {
    return JSON.stringify(exports.AtsUpdateNotesRequestDtoVisibility$outboundSchema.parse(atsUpdateNotesRequestDtoVisibility));
}
exports.atsUpdateNotesRequestDtoVisibilityToJSON = atsUpdateNotesRequestDtoVisibilityToJSON;
function atsUpdateNotesRequestDtoVisibilityFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateNotesRequestDtoVisibility$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateNotesRequestDtoVisibility' from JSON`);
}
exports.atsUpdateNotesRequestDtoVisibilityFromJSON = atsUpdateNotesRequestDtoVisibilityFromJSON;
/** @internal */
exports.AtsUpdateNotesRequestDto$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.AtsUpdateNotesRequestDtoVisibility$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "author_id": "authorId",
    });
});
/** @internal */
exports.AtsUpdateNotesRequestDto$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.AtsUpdateNotesRequestDtoVisibility$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 AtsUpdateNotesRequestDto$;
(function (AtsUpdateNotesRequestDto$) {
    /** @deprecated use `AtsUpdateNotesRequestDto$inboundSchema` instead. */
    AtsUpdateNotesRequestDto$.inboundSchema = exports.AtsUpdateNotesRequestDto$inboundSchema;
    /** @deprecated use `AtsUpdateNotesRequestDto$outboundSchema` instead. */
    AtsUpdateNotesRequestDto$.outboundSchema = exports.AtsUpdateNotesRequestDto$outboundSchema;
})(AtsUpdateNotesRequestDto$ || (exports.AtsUpdateNotesRequestDto$ = AtsUpdateNotesRequestDto$ = {}));
function atsUpdateNotesRequestDtoToJSON(atsUpdateNotesRequestDto) {
    return JSON.stringify(exports.AtsUpdateNotesRequestDto$outboundSchema.parse(atsUpdateNotesRequestDto));
}
exports.atsUpdateNotesRequestDtoToJSON = atsUpdateNotesRequestDtoToJSON;
function atsUpdateNotesRequestDtoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsUpdateNotesRequestDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsUpdateNotesRequestDto' from JSON`);
}
exports.atsUpdateNotesRequestDtoFromJSON = atsUpdateNotesRequestDtoFromJSON;
//# sourceMappingURL=atsupdatenotesrequestdto.js.map