"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.atsListJobsResponseFromJSON = exports.atsListJobsResponseToJSON = exports.AtsListJobsResponse$ = exports.AtsListJobsResponse$outboundSchema = exports.AtsListJobsResponse$inboundSchema = exports.atsListJobsRequestFromJSON = exports.atsListJobsRequestToJSON = exports.AtsListJobsRequest$ = exports.AtsListJobsRequest$outboundSchema = exports.AtsListJobsRequest$inboundSchema = exports.atsListJobsQueryParamFilterFromJSON = exports.atsListJobsQueryParamFilterToJSON = exports.AtsListJobsQueryParamFilter$ = exports.AtsListJobsQueryParamFilter$outboundSchema = exports.AtsListJobsQueryParamFilter$inboundSchema = exports.Status$ = exports.Status$outboundSchema = exports.Status$inboundSchema = exports.JobStatus$ = exports.JobStatus$outboundSchema = exports.JobStatus$inboundSchema = exports.Status = exports.JobStatus = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const shared = __importStar(require("../shared/index.js"));
/**
 * The job_status of the job
 */
var JobStatus;
(function (JobStatus) {
    JobStatus["Open"] = "open";
    JobStatus["Draft"] = "draft";
})(JobStatus || (exports.JobStatus = JobStatus = {}));
/**
 * The status of the job
 *
 * @deprecated enum: This will be removed in a future release, please migrate away from it as soon as possible.
 */
var Status;
(function (Status) {
    Status["Open"] = "open";
    Status["Draft"] = "draft";
})(Status || (exports.Status = Status = {}));
/** @internal */
exports.JobStatus$inboundSchema = z
    .nativeEnum(JobStatus);
/** @internal */
exports.JobStatus$outboundSchema = exports.JobStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JobStatus$;
(function (JobStatus$) {
    /** @deprecated use `JobStatus$inboundSchema` instead. */
    JobStatus$.inboundSchema = exports.JobStatus$inboundSchema;
    /** @deprecated use `JobStatus$outboundSchema` instead. */
    JobStatus$.outboundSchema = exports.JobStatus$outboundSchema;
})(JobStatus$ || (exports.JobStatus$ = JobStatus$ = {}));
/** @internal */
exports.Status$inboundSchema = z
    .nativeEnum(Status);
/** @internal */
exports.Status$outboundSchema = exports.Status$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Status$;
(function (Status$) {
    /** @deprecated use `Status$inboundSchema` instead. */
    Status$.inboundSchema = exports.Status$inboundSchema;
    /** @deprecated use `Status$outboundSchema` instead. */
    Status$.outboundSchema = exports.Status$outboundSchema;
})(Status$ || (exports.Status$ = Status$ = {}));
/** @internal */
exports.AtsListJobsQueryParamFilter$inboundSchema = z.object({
    created_after: z.nullable(z.string()).optional(),
    job_status: z.nullable(exports.JobStatus$inboundSchema).optional(),
    status: z.nullable(exports.Status$inboundSchema).optional(),
    updated_after: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "created_after": "createdAfter",
        "job_status": "jobStatus",
        "updated_after": "updatedAfter",
    });
});
/** @internal */
exports.AtsListJobsQueryParamFilter$outboundSchema = z.object({
    createdAfter: z.nullable(z.string()).optional(),
    jobStatus: z.nullable(exports.JobStatus$outboundSchema).optional(),
    status: z.nullable(exports.Status$outboundSchema).optional(),
    updatedAfter: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        createdAfter: "created_after",
        jobStatus: "job_status",
        updatedAfter: "updated_after",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsListJobsQueryParamFilter$;
(function (AtsListJobsQueryParamFilter$) {
    /** @deprecated use `AtsListJobsQueryParamFilter$inboundSchema` instead. */
    AtsListJobsQueryParamFilter$.inboundSchema = exports.AtsListJobsQueryParamFilter$inboundSchema;
    /** @deprecated use `AtsListJobsQueryParamFilter$outboundSchema` instead. */
    AtsListJobsQueryParamFilter$.outboundSchema = exports.AtsListJobsQueryParamFilter$outboundSchema;
})(AtsListJobsQueryParamFilter$ || (exports.AtsListJobsQueryParamFilter$ = AtsListJobsQueryParamFilter$ = {}));
function atsListJobsQueryParamFilterToJSON(atsListJobsQueryParamFilter) {
    return JSON.stringify(exports.AtsListJobsQueryParamFilter$outboundSchema.parse(atsListJobsQueryParamFilter));
}
exports.atsListJobsQueryParamFilterToJSON = atsListJobsQueryParamFilterToJSON;
function atsListJobsQueryParamFilterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsListJobsQueryParamFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsListJobsQueryParamFilter' from JSON`);
}
exports.atsListJobsQueryParamFilterFromJSON = atsListJobsQueryParamFilterFromJSON;
/** @internal */
exports.AtsListJobsRequest$inboundSchema = z.object({
    expand: z.nullable(z.string()).optional(),
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.AtsListJobsQueryParamFilter$inboundSchema))
        .optional(),
    include: z.nullable(z.string()).optional(),
    next: z.nullable(z.string()).optional(),
    page: z.nullable(z.string()).optional(),
    page_size: z.nullable(z.string()).optional(),
    proxy: z.nullable(z.record(z.any())).optional(),
    raw: z.nullable(z.boolean()).optional(),
    sync_token: z.nullable(z.string()).optional(),
    updated_after: z.nullable(z.string()).optional(),
    "x-account-id": z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "page_size": "pageSize",
        "sync_token": "syncToken",
        "updated_after": "updatedAfter",
        "x-account-id": "xAccountId",
    });
});
/** @internal */
exports.AtsListJobsRequest$outboundSchema = z.object({
    expand: z.nullable(z.string()).optional(),
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.AtsListJobsQueryParamFilter$outboundSchema))
        .optional(),
    include: z.nullable(z.string()).optional(),
    next: z.nullable(z.string()).optional(),
    page: z.nullable(z.string()).optional(),
    pageSize: z.nullable(z.string()).optional(),
    proxy: z.nullable(z.record(z.any())).optional(),
    raw: z.nullable(z.boolean()).optional(),
    syncToken: z.nullable(z.string()).optional(),
    updatedAfter: z.nullable(z.string()).optional(),
    xAccountId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        pageSize: "page_size",
        syncToken: "sync_token",
        updatedAfter: "updated_after",
        xAccountId: "x-account-id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsListJobsRequest$;
(function (AtsListJobsRequest$) {
    /** @deprecated use `AtsListJobsRequest$inboundSchema` instead. */
    AtsListJobsRequest$.inboundSchema = exports.AtsListJobsRequest$inboundSchema;
    /** @deprecated use `AtsListJobsRequest$outboundSchema` instead. */
    AtsListJobsRequest$.outboundSchema = exports.AtsListJobsRequest$outboundSchema;
})(AtsListJobsRequest$ || (exports.AtsListJobsRequest$ = AtsListJobsRequest$ = {}));
function atsListJobsRequestToJSON(atsListJobsRequest) {
    return JSON.stringify(exports.AtsListJobsRequest$outboundSchema.parse(atsListJobsRequest));
}
exports.atsListJobsRequestToJSON = atsListJobsRequestToJSON;
function atsListJobsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsListJobsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsListJobsRequest' from JSON`);
}
exports.atsListJobsRequestFromJSON = atsListJobsRequestFromJSON;
/** @internal */
exports.AtsListJobsResponse$inboundSchema = z.object({
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())),
    JobsPaginated: shared.JobsPaginated$inboundSchema.optional(),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ContentType": "contentType",
        "Headers": "headers",
        "JobsPaginated": "jobsPaginated",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
    });
});
/** @internal */
exports.AtsListJobsResponse$outboundSchema = z.object({
    contentType: z.string(),
    headers: z.record(z.array(z.string())),
    jobsPaginated: shared.JobsPaginated$outboundSchema.optional(),
    statusCode: z.number().int(),
    rawResponse: z.instanceof(Response).transform(() => {
        throw new Error("Response cannot be serialized");
    }),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        contentType: "ContentType",
        headers: "Headers",
        jobsPaginated: "JobsPaginated",
        statusCode: "StatusCode",
        rawResponse: "RawResponse",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsListJobsResponse$;
(function (AtsListJobsResponse$) {
    /** @deprecated use `AtsListJobsResponse$inboundSchema` instead. */
    AtsListJobsResponse$.inboundSchema = exports.AtsListJobsResponse$inboundSchema;
    /** @deprecated use `AtsListJobsResponse$outboundSchema` instead. */
    AtsListJobsResponse$.outboundSchema = exports.AtsListJobsResponse$outboundSchema;
})(AtsListJobsResponse$ || (exports.AtsListJobsResponse$ = AtsListJobsResponse$ = {}));
function atsListJobsResponseToJSON(atsListJobsResponse) {
    return JSON.stringify(exports.AtsListJobsResponse$outboundSchema.parse(atsListJobsResponse));
}
exports.atsListJobsResponseToJSON = atsListJobsResponseToJSON;
function atsListJobsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsListJobsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsListJobsResponse' from JSON`);
}
exports.atsListJobsResponseFromJSON = atsListJobsResponseFromJSON;
//# sourceMappingURL=atslistjobs.js.map