"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.AtsUpdateBackgroundCheckResultRequestDto$outboundSchema = exports.Score$outboundSchema = exports.AtsUpdateBackgroundCheckResultRequestDtoResult$outboundSchema = exports.AtsUpdateBackgroundCheckResultRequestDtoValue$outboundSchema = exports.AtsUpdateBackgroundCheckResultRequestDtoSourceValue$outboundSchema = exports.AtsUpdateBackgroundCheckResultRequestDto4$outboundSchema = exports.AtsUpdateBackgroundCheckResultRequestDtoCandidate$outboundSchema = exports.AtsUpdateBackgroundCheckResultRequestDtoValue = void 0;
exports.atsUpdateBackgroundCheckResultRequestDtoCandidateToJSON = atsUpdateBackgroundCheckResultRequestDtoCandidateToJSON;
exports.atsUpdateBackgroundCheckResultRequestDto4ToJSON = atsUpdateBackgroundCheckResultRequestDto4ToJSON;
exports.atsUpdateBackgroundCheckResultRequestDtoSourceValueToJSON = atsUpdateBackgroundCheckResultRequestDtoSourceValueToJSON;
exports.atsUpdateBackgroundCheckResultRequestDtoResultToJSON = atsUpdateBackgroundCheckResultRequestDtoResultToJSON;
exports.scoreToJSON = scoreToJSON;
exports.atsUpdateBackgroundCheckResultRequestDtoToJSON = atsUpdateBackgroundCheckResultRequestDtoToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const openEnums = __importStar(require("../../types/enums.js"));
const attachment_js_1 = require("./attachment.js");
/**
 * The result of the test.
 */
var AtsUpdateBackgroundCheckResultRequestDtoValue;
(function (AtsUpdateBackgroundCheckResultRequestDtoValue) {
    AtsUpdateBackgroundCheckResultRequestDtoValue["Initiated"] = "initiated";
    AtsUpdateBackgroundCheckResultRequestDtoValue["InProgress"] = "in_progress";
    AtsUpdateBackgroundCheckResultRequestDtoValue["Cancelled"] = "cancelled";
    AtsUpdateBackgroundCheckResultRequestDtoValue["Completed"] = "completed";
    AtsUpdateBackgroundCheckResultRequestDtoValue["Expired"] = "expired";
    AtsUpdateBackgroundCheckResultRequestDtoValue["Failed"] = "failed";
    AtsUpdateBackgroundCheckResultRequestDtoValue["Passed"] = "passed";
    AtsUpdateBackgroundCheckResultRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(AtsUpdateBackgroundCheckResultRequestDtoValue || (exports.AtsUpdateBackgroundCheckResultRequestDtoValue = AtsUpdateBackgroundCheckResultRequestDtoValue = {}));
/** @internal */
exports.AtsUpdateBackgroundCheckResultRequestDtoCandidate$outboundSchema = z.object({
    id: z.nullable(z.string()).optional(),
    profileUrl: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        profileUrl: "profile_url",
    });
});
function atsUpdateBackgroundCheckResultRequestDtoCandidateToJSON(atsUpdateBackgroundCheckResultRequestDtoCandidate) {
    return JSON.stringify(exports.AtsUpdateBackgroundCheckResultRequestDtoCandidate$outboundSchema.parse(atsUpdateBackgroundCheckResultRequestDtoCandidate));
}
/** @internal */
exports.AtsUpdateBackgroundCheckResultRequestDto4$outboundSchema = z.object({});
function atsUpdateBackgroundCheckResultRequestDto4ToJSON(atsUpdateBackgroundCheckResultRequestDto4) {
    return JSON.stringify(exports.AtsUpdateBackgroundCheckResultRequestDto4$outboundSchema.parse(atsUpdateBackgroundCheckResultRequestDto4));
}
/** @internal */
exports.AtsUpdateBackgroundCheckResultRequestDtoSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.AtsUpdateBackgroundCheckResultRequestDto4$outboundSchema),
    z.array(z.any()),
]);
function atsUpdateBackgroundCheckResultRequestDtoSourceValueToJSON(atsUpdateBackgroundCheckResultRequestDtoSourceValue) {
    return JSON.stringify(exports.AtsUpdateBackgroundCheckResultRequestDtoSourceValue$outboundSchema.parse(atsUpdateBackgroundCheckResultRequestDtoSourceValue));
}
/** @internal */
exports.AtsUpdateBackgroundCheckResultRequestDtoValue$outboundSchema = openEnums.outboundSchema(AtsUpdateBackgroundCheckResultRequestDtoValue);
/** @internal */
exports.AtsUpdateBackgroundCheckResultRequestDtoResult$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.AtsUpdateBackgroundCheckResultRequestDto4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsUpdateBackgroundCheckResultRequestDtoValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
function atsUpdateBackgroundCheckResultRequestDtoResultToJSON(atsUpdateBackgroundCheckResultRequestDtoResult) {
    return JSON.stringify(exports.AtsUpdateBackgroundCheckResultRequestDtoResult$outboundSchema.parse(atsUpdateBackgroundCheckResultRequestDtoResult));
}
/** @internal */
exports.Score$outboundSchema = z.object({
    label: z.nullable(z.string()).optional(),
    max: z.nullable(z.string()).optional(),
    min: z.nullable(z.string()).optional(),
    value: z.nullable(z.string()).optional(),
});
function scoreToJSON(score) {
    return JSON.stringify(exports.Score$outboundSchema.parse(score));
}
/** @internal */
exports.AtsUpdateBackgroundCheckResultRequestDto$outboundSchema = z.object({
    attachments: z.nullable(z.array(attachment_js_1.Attachment$outboundSchema)).optional(),
    candidate: z.nullable(z.lazy(() => exports.AtsUpdateBackgroundCheckResultRequestDtoCandidate$outboundSchema)).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    result: z.nullable(z.lazy(() => exports.AtsUpdateBackgroundCheckResultRequestDtoResult$outboundSchema)).optional(),
    resultUrl: z.nullable(z.string()).optional(),
    score: z.nullable(z.lazy(() => exports.Score$outboundSchema)).optional(),
    startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    submissionDate: z.nullable(z.date().transform(v => v.toISOString()))
        .optional(),
    summary: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        resultUrl: "result_url",
        startDate: "start_date",
        submissionDate: "submission_date",
    });
});
function atsUpdateBackgroundCheckResultRequestDtoToJSON(atsUpdateBackgroundCheckResultRequestDto) {
    return JSON.stringify(exports.AtsUpdateBackgroundCheckResultRequestDto$outboundSchema.parse(atsUpdateBackgroundCheckResultRequestDto));
}
//# sourceMappingURL=atsupdatebackgroundcheckresultrequestdto.js.map