import * as z from 'zod';
import { Prisma } from '../../../generated/prisma';
import Decimal from 'decimal.js';
import { StringFieldUpdateOperationsInputObjectSchema as StringFieldUpdateOperationsInputObjectSchema } from './StringFieldUpdateOperationsInput.schema';
import { NullableStringFieldUpdateOperationsInputObjectSchema as NullableStringFieldUpdateOperationsInputObjectSchema } from './NullableStringFieldUpdateOperationsInput.schema';
import { NullableDecimalFieldUpdateOperationsInputObjectSchema as NullableDecimalFieldUpdateOperationsInputObjectSchema } from './NullableDecimalFieldUpdateOperationsInput.schema';
import { ProcedureSourceSchema } from '../enums/ProcedureSource.schema';
import { EnumProcedureSourceFieldUpdateOperationsInputObjectSchema as EnumProcedureSourceFieldUpdateOperationsInputObjectSchema } from './EnumProcedureSourceFieldUpdateOperationsInput.schema';
import { DateTimeFieldUpdateOperationsInputObjectSchema as DateTimeFieldUpdateOperationsInputObjectSchema } from './DateTimeFieldUpdateOperationsInput.schema';
import { AppointmentUpdateOneRequiredWithoutProceduresNestedInputObjectSchema as AppointmentUpdateOneRequiredWithoutProceduresNestedInputObjectSchema } from './AppointmentUpdateOneRequiredWithoutProceduresNestedInput.schema';
import { NpiProviderUpdateOneWithoutAppointmentProceduresNestedInputObjectSchema as NpiProviderUpdateOneWithoutAppointmentProceduresNestedInputObjectSchema } from './NpiProviderUpdateOneWithoutAppointmentProceduresNestedInput.schema'

import { DecimalJSLikeSchema, isValidDecimalInput } from '../../helpers/decimal-helpers';
const makeSchema = () => z.object({
  procedureCode: z.union([z.string(), z.lazy(() => StringFieldUpdateOperationsInputObjectSchema)]).optional(),
  procedureLabel: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  fee: z.union([z.union([
  z.number(),
  z.string(),
  z.instanceof(Decimal),
  z.instanceof(Prisma.Decimal),
  DecimalJSLikeSchema,
]).refine((v) => isValidDecimalInput(v), {
  message: "Field 'fee' must be a Decimal",
}), z.lazy(() => NullableDecimalFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  category: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  toothNumber: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  toothSurface: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  oralCavityArea: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  source: z.union([ProcedureSourceSchema, z.lazy(() => EnumProcedureSourceFieldUpdateOperationsInputObjectSchema)]).optional(),
  comboKey: z.union([z.string(), z.lazy(() => NullableStringFieldUpdateOperationsInputObjectSchema)]).optional().nullable(),
  createdAt: z.union([z.coerce.date(), z.lazy(() => DateTimeFieldUpdateOperationsInputObjectSchema)]).optional(),
  appointment: z.lazy(() => AppointmentUpdateOneRequiredWithoutProceduresNestedInputObjectSchema).optional(),
  npiProvider: z.lazy(() => NpiProviderUpdateOneWithoutAppointmentProceduresNestedInputObjectSchema).optional()
}).strict();
export const AppointmentProcedureUpdateWithoutPatientInputObjectSchema: z.ZodType<Prisma.AppointmentProcedureUpdateWithoutPatientInput> = makeSchema() as unknown as z.ZodType<Prisma.AppointmentProcedureUpdateWithoutPatientInput>;
export const AppointmentProcedureUpdateWithoutPatientInputObjectZodSchema = makeSchema();
