import type { Prisma } from '../../generated/prisma';
import * as z from 'zod';
import { BackupDestinationWhereInputObjectSchema as BackupDestinationWhereInputObjectSchema } from './objects/BackupDestinationWhereInput.schema';
import { BackupDestinationOrderByWithAggregationInputObjectSchema as BackupDestinationOrderByWithAggregationInputObjectSchema } from './objects/BackupDestinationOrderByWithAggregationInput.schema';
import { BackupDestinationScalarWhereWithAggregatesInputObjectSchema as BackupDestinationScalarWhereWithAggregatesInputObjectSchema } from './objects/BackupDestinationScalarWhereWithAggregatesInput.schema';
import { BackupDestinationScalarFieldEnumSchema } from './enums/BackupDestinationScalarFieldEnum.schema';
import { BackupDestinationCountAggregateInputObjectSchema as BackupDestinationCountAggregateInputObjectSchema } from './objects/BackupDestinationCountAggregateInput.schema';
import { BackupDestinationMinAggregateInputObjectSchema as BackupDestinationMinAggregateInputObjectSchema } from './objects/BackupDestinationMinAggregateInput.schema';
import { BackupDestinationMaxAggregateInputObjectSchema as BackupDestinationMaxAggregateInputObjectSchema } from './objects/BackupDestinationMaxAggregateInput.schema';
import { BackupDestinationAvgAggregateInputObjectSchema as BackupDestinationAvgAggregateInputObjectSchema } from './objects/BackupDestinationAvgAggregateInput.schema';
import { BackupDestinationSumAggregateInputObjectSchema as BackupDestinationSumAggregateInputObjectSchema } from './objects/BackupDestinationSumAggregateInput.schema';

export const BackupDestinationGroupBySchema: z.ZodType<Prisma.BackupDestinationGroupByArgs> = z.object({ where: BackupDestinationWhereInputObjectSchema.optional(), orderBy: z.union([BackupDestinationOrderByWithAggregationInputObjectSchema, BackupDestinationOrderByWithAggregationInputObjectSchema.array()]).optional(), having: BackupDestinationScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(BackupDestinationScalarFieldEnumSchema), _count: z.union([ z.literal(true), BackupDestinationCountAggregateInputObjectSchema ]).optional(), _min: BackupDestinationMinAggregateInputObjectSchema.optional(), _max: BackupDestinationMaxAggregateInputObjectSchema.optional(), _avg: BackupDestinationAvgAggregateInputObjectSchema.optional(), _sum: BackupDestinationSumAggregateInputObjectSchema.optional() }).strict() as unknown as z.ZodType<Prisma.BackupDestinationGroupByArgs>;

export const BackupDestinationGroupByZodSchema = z.object({ where: BackupDestinationWhereInputObjectSchema.optional(), orderBy: z.union([BackupDestinationOrderByWithAggregationInputObjectSchema, BackupDestinationOrderByWithAggregationInputObjectSchema.array()]).optional(), having: BackupDestinationScalarWhereWithAggregatesInputObjectSchema.optional(), take: z.number().optional(), skip: z.number().optional(), by: z.array(BackupDestinationScalarFieldEnumSchema), _count: z.union([ z.literal(true), BackupDestinationCountAggregateInputObjectSchema ]).optional(), _min: BackupDestinationMinAggregateInputObjectSchema.optional(), _max: BackupDestinationMaxAggregateInputObjectSchema.optional(), _avg: BackupDestinationAvgAggregateInputObjectSchema.optional(), _sum: BackupDestinationSumAggregateInputObjectSchema.optional() }).strict();