/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 66821a5e30db
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { ScheduleOverlapPolicy$inboundSchema, ScheduleOverlapPolicy$outboundSchema, } from "./scheduleoverlappolicy.js";
/** @internal */
export const SchedulePolicy$inboundSchema = z.object({
    catchup_window_seconds: z.int().default(31536000),
    overlap: ScheduleOverlapPolicy$inboundSchema.optional(),
    pause_on_failure: z.boolean().default(false),
}).transform((v) => {
    return remap$(v, {
        "catchup_window_seconds": "catchupWindowSeconds",
        "pause_on_failure": "pauseOnFailure",
    });
});
/** @internal */
export const SchedulePolicy$outboundSchema = z.object({
    catchupWindowSeconds: z.int().default(31536000),
    overlap: ScheduleOverlapPolicy$outboundSchema.optional(),
    pauseOnFailure: z.boolean().default(false),
}).transform((v) => {
    return remap$(v, {
        catchupWindowSeconds: "catchup_window_seconds",
        pauseOnFailure: "pause_on_failure",
    });
});
export function schedulePolicyToJSON(schedulePolicy) {
    return JSON.stringify(SchedulePolicy$outboundSchema.parse(schedulePolicy));
}
export function schedulePolicyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SchedulePolicy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SchedulePolicy' from JSON`);
}
//# sourceMappingURL=schedulepolicy.js.map