/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PayScheduleAssignmentPayPeriod, PayScheduleAssignmentPayPeriod$inboundSchema, } from "./payscheduleassignmentpayperiod.js"; import { PayScheduleAssignmentTransitionPayPeriod, PayScheduleAssignmentTransitionPayPeriod$inboundSchema, } from "./payscheduleassignmenttransitionpayperiod.js"; export type PayScheduleAssignmentEmployeeChange = { /** * The UUID of the employee. */ employeeUuid?: string | undefined; /** * The employee's first name. */ firstName?: string | undefined; /** * The employee's last name. */ lastName?: string | undefined; /** * New pay schedule frequency and name. */ payFrequency?: string | undefined; /** * Pay schedule assignment first pay period information. */ firstPayPeriod?: PayScheduleAssignmentPayPeriod | undefined; /** * Pay schedule assignment transition pay period information. */ transitionPayPeriod?: PayScheduleAssignmentTransitionPayPeriod | undefined; }; /** @internal */ export const PayScheduleAssignmentEmployeeChange$inboundSchema: z.ZodType< PayScheduleAssignmentEmployeeChange, z.ZodTypeDef, unknown > = z.object({ employee_uuid: z.string().optional(), first_name: z.string().optional(), last_name: z.string().optional(), pay_frequency: z.string().optional(), first_pay_period: PayScheduleAssignmentPayPeriod$inboundSchema.optional(), transition_pay_period: PayScheduleAssignmentTransitionPayPeriod$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "employee_uuid": "employeeUuid", "first_name": "firstName", "last_name": "lastName", "pay_frequency": "payFrequency", "first_pay_period": "firstPayPeriod", "transition_pay_period": "transitionPayPeriod", }); }); export function payScheduleAssignmentEmployeeChangeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PayScheduleAssignmentEmployeeChange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayScheduleAssignmentEmployeeChange' from JSON`, ); }