"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.hrisListTimeOffPoliciesResponseFromJSON = exports.hrisListTimeOffPoliciesResponseToJSON = exports.HrisListTimeOffPoliciesResponse$ = exports.HrisListTimeOffPoliciesResponse$outboundSchema = exports.HrisListTimeOffPoliciesResponse$inboundSchema = exports.hrisListTimeOffPoliciesRequestFromJSON = exports.hrisListTimeOffPoliciesRequestToJSON = exports.HrisListTimeOffPoliciesRequest$ = exports.HrisListTimeOffPoliciesRequest$outboundSchema = exports.HrisListTimeOffPoliciesRequest$inboundSchema = exports.hrisListTimeOffPoliciesQueryParamFilterFromJSON = exports.hrisListTimeOffPoliciesQueryParamFilterToJSON = exports.HrisListTimeOffPoliciesQueryParamFilter$ = exports.HrisListTimeOffPoliciesQueryParamFilter$outboundSchema = exports.HrisListTimeOffPoliciesQueryParamFilter$inboundSchema = exports.QueryParamType$ = exports.QueryParamType$outboundSchema = exports.QueryParamType$inboundSchema = exports.QueryParamType = 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"));
/**
 * Filter to select time-off policies by type
 */
var QueryParamType;
(function (QueryParamType) {
    QueryParamType["Sick"] = "sick";
    QueryParamType["UnmappedValue"] = "unmapped_value";
    QueryParamType["Vacation"] = "vacation";
    QueryParamType["LongTermDisability"] = "long_term_disability";
    QueryParamType["ShortTermDisability"] = "short_term_disability";
    QueryParamType["Absent"] = "absent";
    QueryParamType["CompTime"] = "comp_time";
    QueryParamType["Training"] = "training";
    QueryParamType["AnnualLeave"] = "annual_leave";
    QueryParamType["LeaveOfAbsence"] = "leave_of_absence";
    QueryParamType["Break"] = "break";
    QueryParamType["ChildCareLeave"] = "child_care_leave";
    QueryParamType["MaternityLeave"] = "maternity_leave";
    QueryParamType["JuryDuty"] = "jury_duty";
    QueryParamType["BereavementLeave"] = "bereavement_leave";
    QueryParamType["Sabbatical"] = "sabbatical";
    QueryParamType["Accident"] = "accident";
})(QueryParamType || (exports.QueryParamType = QueryParamType = {}));
/** @internal */
exports.QueryParamType$inboundSchema = z.nativeEnum(QueryParamType);
/** @internal */
exports.QueryParamType$outboundSchema = exports.QueryParamType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QueryParamType$;
(function (QueryParamType$) {
    /** @deprecated use `QueryParamType$inboundSchema` instead. */
    QueryParamType$.inboundSchema = exports.QueryParamType$inboundSchema;
    /** @deprecated use `QueryParamType$outboundSchema` instead. */
    QueryParamType$.outboundSchema = exports.QueryParamType$outboundSchema;
})(QueryParamType$ || (exports.QueryParamType$ = QueryParamType$ = {}));
/** @internal */
exports.HrisListTimeOffPoliciesQueryParamFilter$inboundSchema = z.object({
    type: z.nullable(exports.QueryParamType$inboundSchema).optional(),
    updated_after: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "updated_after": "updatedAfter",
    });
});
/** @internal */
exports.HrisListTimeOffPoliciesQueryParamFilter$outboundSchema = z.object({
    type: z.nullable(exports.QueryParamType$outboundSchema).optional(),
    updatedAfter: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        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 HrisListTimeOffPoliciesQueryParamFilter$;
(function (HrisListTimeOffPoliciesQueryParamFilter$) {
    /** @deprecated use `HrisListTimeOffPoliciesQueryParamFilter$inboundSchema` instead. */
    HrisListTimeOffPoliciesQueryParamFilter$.inboundSchema = exports.HrisListTimeOffPoliciesQueryParamFilter$inboundSchema;
    /** @deprecated use `HrisListTimeOffPoliciesQueryParamFilter$outboundSchema` instead. */
    HrisListTimeOffPoliciesQueryParamFilter$.outboundSchema = exports.HrisListTimeOffPoliciesQueryParamFilter$outboundSchema;
})(HrisListTimeOffPoliciesQueryParamFilter$ || (exports.HrisListTimeOffPoliciesQueryParamFilter$ = HrisListTimeOffPoliciesQueryParamFilter$ = {}));
function hrisListTimeOffPoliciesQueryParamFilterToJSON(hrisListTimeOffPoliciesQueryParamFilter) {
    return JSON.stringify(exports.HrisListTimeOffPoliciesQueryParamFilter$outboundSchema.parse(hrisListTimeOffPoliciesQueryParamFilter));
}
exports.hrisListTimeOffPoliciesQueryParamFilterToJSON = hrisListTimeOffPoliciesQueryParamFilterToJSON;
function hrisListTimeOffPoliciesQueryParamFilterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisListTimeOffPoliciesQueryParamFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisListTimeOffPoliciesQueryParamFilter' from JSON`);
}
exports.hrisListTimeOffPoliciesQueryParamFilterFromJSON = hrisListTimeOffPoliciesQueryParamFilterFromJSON;
/** @internal */
exports.HrisListTimeOffPoliciesRequest$inboundSchema = z.object({
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.HrisListTimeOffPoliciesQueryParamFilter$inboundSchema)).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(),
    updated_after: z.nullable(z.string()).optional(),
    "x-account-id": z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "page_size": "pageSize",
        "updated_after": "updatedAfter",
        "x-account-id": "xAccountId",
    });
});
/** @internal */
exports.HrisListTimeOffPoliciesRequest$outboundSchema = z.object({
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.HrisListTimeOffPoliciesQueryParamFilter$outboundSchema)).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(),
    updatedAfter: z.nullable(z.string()).optional(),
    xAccountId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        pageSize: "page_size",
        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 HrisListTimeOffPoliciesRequest$;
(function (HrisListTimeOffPoliciesRequest$) {
    /** @deprecated use `HrisListTimeOffPoliciesRequest$inboundSchema` instead. */
    HrisListTimeOffPoliciesRequest$.inboundSchema = exports.HrisListTimeOffPoliciesRequest$inboundSchema;
    /** @deprecated use `HrisListTimeOffPoliciesRequest$outboundSchema` instead. */
    HrisListTimeOffPoliciesRequest$.outboundSchema = exports.HrisListTimeOffPoliciesRequest$outboundSchema;
})(HrisListTimeOffPoliciesRequest$ || (exports.HrisListTimeOffPoliciesRequest$ = HrisListTimeOffPoliciesRequest$ = {}));
function hrisListTimeOffPoliciesRequestToJSON(hrisListTimeOffPoliciesRequest) {
    return JSON.stringify(exports.HrisListTimeOffPoliciesRequest$outboundSchema.parse(hrisListTimeOffPoliciesRequest));
}
exports.hrisListTimeOffPoliciesRequestToJSON = hrisListTimeOffPoliciesRequestToJSON;
function hrisListTimeOffPoliciesRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisListTimeOffPoliciesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisListTimeOffPoliciesRequest' from JSON`);
}
exports.hrisListTimeOffPoliciesRequestFromJSON = hrisListTimeOffPoliciesRequestFromJSON;
/** @internal */
exports.HrisListTimeOffPoliciesResponse$inboundSchema = z.object({
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
    TimeOffPoliciesPaginated: shared.TimeOffPoliciesPaginated$inboundSchema
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ContentType": "contentType",
        "Headers": "headers",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
        "TimeOffPoliciesPaginated": "timeOffPoliciesPaginated",
    });
});
/** @internal */
exports.HrisListTimeOffPoliciesResponse$outboundSchema = z.object({
    contentType: z.string(),
    headers: z.record(z.array(z.string())),
    statusCode: z.number().int(),
    rawResponse: z.instanceof(Response).transform(() => {
        throw new Error("Response cannot be serialized");
    }),
    timeOffPoliciesPaginated: shared.TimeOffPoliciesPaginated$outboundSchema
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        contentType: "ContentType",
        headers: "Headers",
        statusCode: "StatusCode",
        rawResponse: "RawResponse",
        timeOffPoliciesPaginated: "TimeOffPoliciesPaginated",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var HrisListTimeOffPoliciesResponse$;
(function (HrisListTimeOffPoliciesResponse$) {
    /** @deprecated use `HrisListTimeOffPoliciesResponse$inboundSchema` instead. */
    HrisListTimeOffPoliciesResponse$.inboundSchema = exports.HrisListTimeOffPoliciesResponse$inboundSchema;
    /** @deprecated use `HrisListTimeOffPoliciesResponse$outboundSchema` instead. */
    HrisListTimeOffPoliciesResponse$.outboundSchema = exports.HrisListTimeOffPoliciesResponse$outboundSchema;
})(HrisListTimeOffPoliciesResponse$ || (exports.HrisListTimeOffPoliciesResponse$ = HrisListTimeOffPoliciesResponse$ = {}));
function hrisListTimeOffPoliciesResponseToJSON(hrisListTimeOffPoliciesResponse) {
    return JSON.stringify(exports.HrisListTimeOffPoliciesResponse$outboundSchema.parse(hrisListTimeOffPoliciesResponse));
}
exports.hrisListTimeOffPoliciesResponseToJSON = hrisListTimeOffPoliciesResponseToJSON;
function hrisListTimeOffPoliciesResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HrisListTimeOffPoliciesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HrisListTimeOffPoliciesResponse' from JSON`);
}
exports.hrisListTimeOffPoliciesResponseFromJSON = hrisListTimeOffPoliciesResponseFromJSON;
//# sourceMappingURL=hrislisttimeoffpolicies.js.map