/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Employee, Employee$inboundSchema } from "./employee.js"; import { Schedule, Schedule$inboundSchema } from "./schedule.js"; export type EmployeeSchedules = { employee?: Employee | undefined; schedules?: Array | null | undefined; }; /** @internal */ export const EmployeeSchedules$inboundSchema: z.ZodType< EmployeeSchedules, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ employee: types.optional(Employee$inboundSchema), schedules: z.nullable(z.array(Schedule$inboundSchema)).optional(), }) ); export function employeeSchedulesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EmployeeSchedules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmployeeSchedules' from JSON`, ); }