/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 826d0c446e55
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { ScheduleRange$inboundSchema, ScheduleRange$outboundSchema, } from "./schedulerange.js";
/** @internal */
export const ScheduleCalendar$inboundSchema = z.object({
    second: z.array(ScheduleRange$inboundSchema).optional(),
    minute: z.array(ScheduleRange$inboundSchema).optional(),
    hour: z.array(ScheduleRange$inboundSchema).optional(),
    day_of_month: z.array(ScheduleRange$inboundSchema).optional(),
    month: z.array(ScheduleRange$inboundSchema).optional(),
    year: z.array(ScheduleRange$inboundSchema).optional(),
    day_of_week: z.array(ScheduleRange$inboundSchema).optional(),
    comment: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        "day_of_month": "dayOfMonth",
        "day_of_week": "dayOfWeek",
    });
});
/** @internal */
export const ScheduleCalendar$outboundSchema = z.object({
    second: z.array(ScheduleRange$outboundSchema).optional(),
    minute: z.array(ScheduleRange$outboundSchema).optional(),
    hour: z.array(ScheduleRange$outboundSchema).optional(),
    dayOfMonth: z.array(ScheduleRange$outboundSchema).optional(),
    month: z.array(ScheduleRange$outboundSchema).optional(),
    year: z.array(ScheduleRange$outboundSchema).optional(),
    dayOfWeek: z.array(ScheduleRange$outboundSchema).optional(),
    comment: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        dayOfMonth: "day_of_month",
        dayOfWeek: "day_of_week",
    });
});
export function scheduleCalendarToJSON(scheduleCalendar) {
    return JSON.stringify(ScheduleCalendar$outboundSchema.parse(scheduleCalendar));
}
export function scheduleCalendarFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ScheduleCalendar$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduleCalendar' from JSON`);
}
//# sourceMappingURL=schedulecalendar.js.map