import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { SortOrderSchema } from '../enums/SortOrder.schema';
import { SortOrderInputObjectSchema as SortOrderInputObjectSchema } from './SortOrderInput.schema';
import { CloudFileCountOrderByAggregateInputObjectSchema as CloudFileCountOrderByAggregateInputObjectSchema } from './CloudFileCountOrderByAggregateInput.schema';
import { CloudFileAvgOrderByAggregateInputObjectSchema as CloudFileAvgOrderByAggregateInputObjectSchema } from './CloudFileAvgOrderByAggregateInput.schema';
import { CloudFileMaxOrderByAggregateInputObjectSchema as CloudFileMaxOrderByAggregateInputObjectSchema } from './CloudFileMaxOrderByAggregateInput.schema';
import { CloudFileMinOrderByAggregateInputObjectSchema as CloudFileMinOrderByAggregateInputObjectSchema } from './CloudFileMinOrderByAggregateInput.schema';
import { CloudFileSumOrderByAggregateInputObjectSchema as CloudFileSumOrderByAggregateInputObjectSchema } from './CloudFileSumOrderByAggregateInput.schema'

const makeSchema = () => z.object({
  id: SortOrderSchema.optional(),
  userId: SortOrderSchema.optional(),
  name: SortOrderSchema.optional(),
  mimeType: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  fileSize: SortOrderSchema.optional(),
  folderId: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  isComplete: SortOrderSchema.optional(),
  totalChunks: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  diskPath: z.union([SortOrderSchema, z.lazy(() => SortOrderInputObjectSchema)]).optional(),
  createdAt: SortOrderSchema.optional(),
  updatedAt: SortOrderSchema.optional(),
  _count: z.lazy(() => CloudFileCountOrderByAggregateInputObjectSchema).optional(),
  _avg: z.lazy(() => CloudFileAvgOrderByAggregateInputObjectSchema).optional(),
  _max: z.lazy(() => CloudFileMaxOrderByAggregateInputObjectSchema).optional(),
  _min: z.lazy(() => CloudFileMinOrderByAggregateInputObjectSchema).optional(),
  _sum: z.lazy(() => CloudFileSumOrderByAggregateInputObjectSchema).optional()
}).strict();
export const CloudFileOrderByWithAggregationInputObjectSchema: z.ZodType<Prisma.CloudFileOrderByWithAggregationInput> = makeSchema() as unknown as z.ZodType<Prisma.CloudFileOrderByWithAggregationInput>;
export const CloudFileOrderByWithAggregationInputObjectZodSchema = makeSchema();
