import type { Prisma } from '../../generated/prisma';
import * as z from 'zod';
import { DatabaseBackupWhereInputObjectSchema as DatabaseBackupWhereInputObjectSchema } from './objects/DatabaseBackupWhereInput.schema';
import { DatabaseBackupOrderByWithAggregationInputObjectSchema as DatabaseBackupOrderByWithAggregationInputObjectSchema } from './objects/DatabaseBackupOrderByWithAggregationInput.schema';
import { DatabaseBackupScalarWhereWithAggregatesInputObjectSchema as DatabaseBackupScalarWhereWithAggregatesInputObjectSchema } from './objects/DatabaseBackupScalarWhereWithAggregatesInput.schema';
import { DatabaseBackupScalarFieldEnumSchema } from './enums/DatabaseBackupScalarFieldEnum.schema';
import { DatabaseBackupCountAggregateInputObjectSchema as DatabaseBackupCountAggregateInputObjectSchema } from './objects/DatabaseBackupCountAggregateInput.schema';
import { DatabaseBackupMinAggregateInputObjectSchema as DatabaseBackupMinAggregateInputObjectSchema } from './objects/DatabaseBackupMinAggregateInput.schema';
import { DatabaseBackupMaxAggregateInputObjectSchema as DatabaseBackupMaxAggregateInputObjectSchema } from './objects/DatabaseBackupMaxAggregateInput.schema';
import { DatabaseBackupAvgAggregateInputObjectSchema as DatabaseBackupAvgAggregateInputObjectSchema } from './objects/DatabaseBackupAvgAggregateInput.schema';
import { DatabaseBackupSumAggregateInputObjectSchema as DatabaseBackupSumAggregateInputObjectSchema } from './objects/DatabaseBackupSumAggregateInput.schema';

export const DatabaseBackupGroupBySchema: z.ZodType<Prisma.DatabaseBackupGroupByArgs> = z.object({ where: DatabaseBackupWhereInputObjectSchema.optional(), orderBy: z.union([DatabaseBackupOrderByWithAggregationInputObjectSchema, DatabaseBackupOrderByWithAggregationInputObjectSchema.array()]).optional(), having: DatabaseBackupScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(DatabaseBackupScalarFieldEnumSchema), _count: z.union([ z.literal(true), DatabaseBackupCountAggregateInputObjectSchema ]).optional(), _min: DatabaseBackupMinAggregateInputObjectSchema.optional(), _max: DatabaseBackupMaxAggregateInputObjectSchema.optional(), _avg: DatabaseBackupAvgAggregateInputObjectSchema.optional(), _sum: DatabaseBackupSumAggregateInputObjectSchema.optional() }).strict() as unknown as z.ZodType<Prisma.DatabaseBackupGroupByArgs>;

export const DatabaseBackupGroupByZodSchema = z.object({ where: DatabaseBackupWhereInputObjectSchema.optional(), orderBy: z.union([DatabaseBackupOrderByWithAggregationInputObjectSchema, DatabaseBackupOrderByWithAggregationInputObjectSchema.array()]).optional(), having: DatabaseBackupScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(DatabaseBackupScalarFieldEnumSchema), _count: z.union([ z.literal(true), DatabaseBackupCountAggregateInputObjectSchema ]).optional(), _min: DatabaseBackupMinAggregateInputObjectSchema.optional(), _max: DatabaseBackupMaxAggregateInputObjectSchema.optional(), _avg: DatabaseBackupAvgAggregateInputObjectSchema.optional(), _sum: DatabaseBackupSumAggregateInputObjectSchema.optional() }).strict();