
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
/* eslint-disable */
// biome-ignore-all lint: generated file
// @ts-nocheck 
/*
 * This file exports the `Device` model and its related types.
 *
 * 🟢 You can import this file directly.
 */
import type * as runtime from "@prisma/client/runtime/client"
import type * as $Enums from "../enums"
import type * as Prisma from "../internal/prismaNamespace"

/**
 * Model Device
 * 
 */
export type DeviceModel = runtime.Types.Result.DefaultSelection<Prisma.$DevicePayload>

export type AggregateDevice = {
  _count: DeviceCountAggregateOutputType | null
  _min: DeviceMinAggregateOutputType | null
  _max: DeviceMaxAggregateOutputType | null
}

export type DeviceMinAggregateOutputType = {
  id: string | null
  userId: string | null
  name: string | null
  pairingToken: string | null
  lastSeenAt: Date | null
  createdAt: Date | null
  cmdReportLocation: boolean | null
  cmdSyncWaypoints: boolean | null
}

export type DeviceMaxAggregateOutputType = {
  id: string | null
  userId: string | null
  name: string | null
  pairingToken: string | null
  lastSeenAt: Date | null
  createdAt: Date | null
  cmdReportLocation: boolean | null
  cmdSyncWaypoints: boolean | null
}

export type DeviceCountAggregateOutputType = {
  id: number
  userId: number
  name: number
  pairingToken: number
  lastSeenAt: number
  createdAt: number
  cmdReportLocation: number
  cmdSyncWaypoints: number
  _all: number
}


export type DeviceMinAggregateInputType = {
  id?: true
  userId?: true
  name?: true
  pairingToken?: true
  lastSeenAt?: true
  createdAt?: true
  cmdReportLocation?: true
  cmdSyncWaypoints?: true
}

export type DeviceMaxAggregateInputType = {
  id?: true
  userId?: true
  name?: true
  pairingToken?: true
  lastSeenAt?: true
  createdAt?: true
  cmdReportLocation?: true
  cmdSyncWaypoints?: true
}

export type DeviceCountAggregateInputType = {
  id?: true
  userId?: true
  name?: true
  pairingToken?: true
  lastSeenAt?: true
  createdAt?: true
  cmdReportLocation?: true
  cmdSyncWaypoints?: true
  _all?: true
}

export type DeviceAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Device to aggregate.
   */
  where?: Prisma.DeviceWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Devices to fetch.
   */
  orderBy?: Prisma.DeviceOrderByWithRelationInput | Prisma.DeviceOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.DeviceWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Devices from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` Devices.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned Devices
  **/
  _count?: true | DeviceCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: DeviceMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: DeviceMaxAggregateInputType
}

export type GetDeviceAggregateType<T extends DeviceAggregateArgs> = {
      [P in keyof T & keyof AggregateDevice]: P extends '_count' | 'count'
    ? T[P] extends true
      ? number
      : Prisma.GetScalarType<T[P], AggregateDevice[P]>
    : Prisma.GetScalarType<T[P], AggregateDevice[P]>
}




export type DeviceGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.DeviceWhereInput
  orderBy?: Prisma.DeviceOrderByWithAggregationInput | Prisma.DeviceOrderByWithAggregationInput[]
  by: Prisma.DeviceScalarFieldEnum[] | Prisma.DeviceScalarFieldEnum
  having?: Prisma.DeviceScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: DeviceCountAggregateInputType | true
  _min?: DeviceMinAggregateInputType
  _max?: DeviceMaxAggregateInputType
}

export type DeviceGroupByOutputType = {
  id: string
  userId: string
  name: string
  pairingToken: string
  lastSeenAt: Date | null
  createdAt: Date
  cmdReportLocation: boolean
  cmdSyncWaypoints: boolean
  _count: DeviceCountAggregateOutputType | null
  _min: DeviceMinAggregateOutputType | null
  _max: DeviceMaxAggregateOutputType | null
}

export type GetDeviceGroupByPayload<T extends DeviceGroupByArgs> = Prisma.PrismaPromise<
  Array<
    Prisma.PickEnumerable<DeviceGroupByOutputType, T['by']> &
      {
        [P in ((keyof T) & (keyof DeviceGroupByOutputType))]: P extends '_count'
          ? T[P] extends boolean
            ? number
            : Prisma.GetScalarType<T[P], DeviceGroupByOutputType[P]>
          : Prisma.GetScalarType<T[P], DeviceGroupByOutputType[P]>
      }
    >
  >



export type DeviceWhereInput = {
  AND?: Prisma.DeviceWhereInput | Prisma.DeviceWhereInput[]
  OR?: Prisma.DeviceWhereInput[]
  NOT?: Prisma.DeviceWhereInput | Prisma.DeviceWhereInput[]
  id?: Prisma.StringFilter<"Device"> | string
  userId?: Prisma.StringFilter<"Device"> | string
  name?: Prisma.StringFilter<"Device"> | string
  pairingToken?: Prisma.StringFilter<"Device"> | string
  lastSeenAt?: Prisma.DateTimeNullableFilter<"Device"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"Device"> | Date | string
  cmdReportLocation?: Prisma.BoolFilter<"Device"> | boolean
  cmdSyncWaypoints?: Prisma.BoolFilter<"Device"> | boolean
  user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
  locations?: Prisma.LocationPointListRelationFilter
  geofence?: Prisma.XOR<Prisma.GeofenceNullableScalarRelationFilter, Prisma.GeofenceWhereInput> | null
  batteryAlert?: Prisma.XOR<Prisma.BatteryAlertNullableScalarRelationFilter, Prisma.BatteryAlertWhereInput> | null
}

export type DeviceOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  userId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  pairingToken?: Prisma.SortOrder
  lastSeenAt?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  cmdReportLocation?: Prisma.SortOrder
  cmdSyncWaypoints?: Prisma.SortOrder
  user?: Prisma.UserOrderByWithRelationInput
  locations?: Prisma.LocationPointOrderByRelationAggregateInput
  geofence?: Prisma.GeofenceOrderByWithRelationInput
  batteryAlert?: Prisma.BatteryAlertOrderByWithRelationInput
}

export type DeviceWhereUniqueInput = Prisma.AtLeast<{
  id?: string
  pairingToken?: string
  AND?: Prisma.DeviceWhereInput | Prisma.DeviceWhereInput[]
  OR?: Prisma.DeviceWhereInput[]
  NOT?: Prisma.DeviceWhereInput | Prisma.DeviceWhereInput[]
  userId?: Prisma.StringFilter<"Device"> | string
  name?: Prisma.StringFilter<"Device"> | string
  lastSeenAt?: Prisma.DateTimeNullableFilter<"Device"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"Device"> | Date | string
  cmdReportLocation?: Prisma.BoolFilter<"Device"> | boolean
  cmdSyncWaypoints?: Prisma.BoolFilter<"Device"> | boolean
  user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
  locations?: Prisma.LocationPointListRelationFilter
  geofence?: Prisma.XOR<Prisma.GeofenceNullableScalarRelationFilter, Prisma.GeofenceWhereInput> | null
  batteryAlert?: Prisma.XOR<Prisma.BatteryAlertNullableScalarRelationFilter, Prisma.BatteryAlertWhereInput> | null
}, "id" | "pairingToken">

export type DeviceOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  userId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  pairingToken?: Prisma.SortOrder
  lastSeenAt?: Prisma.SortOrderInput | Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  cmdReportLocation?: Prisma.SortOrder
  cmdSyncWaypoints?: Prisma.SortOrder
  _count?: Prisma.DeviceCountOrderByAggregateInput
  _max?: Prisma.DeviceMaxOrderByAggregateInput
  _min?: Prisma.DeviceMinOrderByAggregateInput
}

export type DeviceScalarWhereWithAggregatesInput = {
  AND?: Prisma.DeviceScalarWhereWithAggregatesInput | Prisma.DeviceScalarWhereWithAggregatesInput[]
  OR?: Prisma.DeviceScalarWhereWithAggregatesInput[]
  NOT?: Prisma.DeviceScalarWhereWithAggregatesInput | Prisma.DeviceScalarWhereWithAggregatesInput[]
  id?: Prisma.StringWithAggregatesFilter<"Device"> | string
  userId?: Prisma.StringWithAggregatesFilter<"Device"> | string
  name?: Prisma.StringWithAggregatesFilter<"Device"> | string
  pairingToken?: Prisma.StringWithAggregatesFilter<"Device"> | string
  lastSeenAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Device"> | Date | string | null
  createdAt?: Prisma.DateTimeWithAggregatesFilter<"Device"> | Date | string
  cmdReportLocation?: Prisma.BoolWithAggregatesFilter<"Device"> | boolean
  cmdSyncWaypoints?: Prisma.BoolWithAggregatesFilter<"Device"> | boolean
}

export type DeviceCreateInput = {
  id?: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  user: Prisma.UserCreateNestedOneWithoutDevicesInput
  locations?: Prisma.LocationPointCreateNestedManyWithoutDeviceInput
  geofence?: Prisma.GeofenceCreateNestedOneWithoutDeviceInput
  batteryAlert?: Prisma.BatteryAlertCreateNestedOneWithoutDeviceInput
}

export type DeviceUncheckedCreateInput = {
  id?: string
  userId: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  locations?: Prisma.LocationPointUncheckedCreateNestedManyWithoutDeviceInput
  geofence?: Prisma.GeofenceUncheckedCreateNestedOneWithoutDeviceInput
  batteryAlert?: Prisma.BatteryAlertUncheckedCreateNestedOneWithoutDeviceInput
}

export type DeviceUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  user?: Prisma.UserUpdateOneRequiredWithoutDevicesNestedInput
  locations?: Prisma.LocationPointUpdateManyWithoutDeviceNestedInput
  geofence?: Prisma.GeofenceUpdateOneWithoutDeviceNestedInput
  batteryAlert?: Prisma.BatteryAlertUpdateOneWithoutDeviceNestedInput
}

export type DeviceUncheckedUpdateInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  locations?: Prisma.LocationPointUncheckedUpdateManyWithoutDeviceNestedInput
  geofence?: Prisma.GeofenceUncheckedUpdateOneWithoutDeviceNestedInput
  batteryAlert?: Prisma.BatteryAlertUncheckedUpdateOneWithoutDeviceNestedInput
}

export type DeviceCreateManyInput = {
  id?: string
  userId: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
}

export type DeviceUpdateManyMutationInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
}

export type DeviceUncheckedUpdateManyInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
}

export type DeviceListRelationFilter = {
  every?: Prisma.DeviceWhereInput
  some?: Prisma.DeviceWhereInput
  none?: Prisma.DeviceWhereInput
}

export type DeviceOrderByRelationAggregateInput = {
  _count?: Prisma.SortOrder
}

export type DeviceCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  userId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  pairingToken?: Prisma.SortOrder
  lastSeenAt?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  cmdReportLocation?: Prisma.SortOrder
  cmdSyncWaypoints?: Prisma.SortOrder
}

export type DeviceMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  userId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  pairingToken?: Prisma.SortOrder
  lastSeenAt?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  cmdReportLocation?: Prisma.SortOrder
  cmdSyncWaypoints?: Prisma.SortOrder
}

export type DeviceMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  userId?: Prisma.SortOrder
  name?: Prisma.SortOrder
  pairingToken?: Prisma.SortOrder
  lastSeenAt?: Prisma.SortOrder
  createdAt?: Prisma.SortOrder
  cmdReportLocation?: Prisma.SortOrder
  cmdSyncWaypoints?: Prisma.SortOrder
}

export type DeviceScalarRelationFilter = {
  is?: Prisma.DeviceWhereInput
  isNot?: Prisma.DeviceWhereInput
}

export type DeviceCreateNestedManyWithoutUserInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutUserInput, Prisma.DeviceUncheckedCreateWithoutUserInput> | Prisma.DeviceCreateWithoutUserInput[] | Prisma.DeviceUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutUserInput | Prisma.DeviceCreateOrConnectWithoutUserInput[]
  createMany?: Prisma.DeviceCreateManyUserInputEnvelope
  connect?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
}

export type DeviceUncheckedCreateNestedManyWithoutUserInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutUserInput, Prisma.DeviceUncheckedCreateWithoutUserInput> | Prisma.DeviceCreateWithoutUserInput[] | Prisma.DeviceUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutUserInput | Prisma.DeviceCreateOrConnectWithoutUserInput[]
  createMany?: Prisma.DeviceCreateManyUserInputEnvelope
  connect?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
}

export type DeviceUpdateManyWithoutUserNestedInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutUserInput, Prisma.DeviceUncheckedCreateWithoutUserInput> | Prisma.DeviceCreateWithoutUserInput[] | Prisma.DeviceUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutUserInput | Prisma.DeviceCreateOrConnectWithoutUserInput[]
  upsert?: Prisma.DeviceUpsertWithWhereUniqueWithoutUserInput | Prisma.DeviceUpsertWithWhereUniqueWithoutUserInput[]
  createMany?: Prisma.DeviceCreateManyUserInputEnvelope
  set?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
  disconnect?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
  delete?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
  connect?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
  update?: Prisma.DeviceUpdateWithWhereUniqueWithoutUserInput | Prisma.DeviceUpdateWithWhereUniqueWithoutUserInput[]
  updateMany?: Prisma.DeviceUpdateManyWithWhereWithoutUserInput | Prisma.DeviceUpdateManyWithWhereWithoutUserInput[]
  deleteMany?: Prisma.DeviceScalarWhereInput | Prisma.DeviceScalarWhereInput[]
}

export type DeviceUncheckedUpdateManyWithoutUserNestedInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutUserInput, Prisma.DeviceUncheckedCreateWithoutUserInput> | Prisma.DeviceCreateWithoutUserInput[] | Prisma.DeviceUncheckedCreateWithoutUserInput[]
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutUserInput | Prisma.DeviceCreateOrConnectWithoutUserInput[]
  upsert?: Prisma.DeviceUpsertWithWhereUniqueWithoutUserInput | Prisma.DeviceUpsertWithWhereUniqueWithoutUserInput[]
  createMany?: Prisma.DeviceCreateManyUserInputEnvelope
  set?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
  disconnect?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
  delete?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
  connect?: Prisma.DeviceWhereUniqueInput | Prisma.DeviceWhereUniqueInput[]
  update?: Prisma.DeviceUpdateWithWhereUniqueWithoutUserInput | Prisma.DeviceUpdateWithWhereUniqueWithoutUserInput[]
  updateMany?: Prisma.DeviceUpdateManyWithWhereWithoutUserInput | Prisma.DeviceUpdateManyWithWhereWithoutUserInput[]
  deleteMany?: Prisma.DeviceScalarWhereInput | Prisma.DeviceScalarWhereInput[]
}

export type DeviceCreateNestedOneWithoutBatteryAlertInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutBatteryAlertInput, Prisma.DeviceUncheckedCreateWithoutBatteryAlertInput>
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutBatteryAlertInput
  connect?: Prisma.DeviceWhereUniqueInput
}

export type DeviceUpdateOneRequiredWithoutBatteryAlertNestedInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutBatteryAlertInput, Prisma.DeviceUncheckedCreateWithoutBatteryAlertInput>
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutBatteryAlertInput
  upsert?: Prisma.DeviceUpsertWithoutBatteryAlertInput
  connect?: Prisma.DeviceWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.DeviceUpdateToOneWithWhereWithoutBatteryAlertInput, Prisma.DeviceUpdateWithoutBatteryAlertInput>, Prisma.DeviceUncheckedUpdateWithoutBatteryAlertInput>
}

export type DeviceCreateNestedOneWithoutGeofenceInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutGeofenceInput, Prisma.DeviceUncheckedCreateWithoutGeofenceInput>
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutGeofenceInput
  connect?: Prisma.DeviceWhereUniqueInput
}

export type DeviceUpdateOneRequiredWithoutGeofenceNestedInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutGeofenceInput, Prisma.DeviceUncheckedCreateWithoutGeofenceInput>
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutGeofenceInput
  upsert?: Prisma.DeviceUpsertWithoutGeofenceInput
  connect?: Prisma.DeviceWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.DeviceUpdateToOneWithWhereWithoutGeofenceInput, Prisma.DeviceUpdateWithoutGeofenceInput>, Prisma.DeviceUncheckedUpdateWithoutGeofenceInput>
}

export type DeviceCreateNestedOneWithoutLocationsInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutLocationsInput, Prisma.DeviceUncheckedCreateWithoutLocationsInput>
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutLocationsInput
  connect?: Prisma.DeviceWhereUniqueInput
}

export type DeviceUpdateOneRequiredWithoutLocationsNestedInput = {
  create?: Prisma.XOR<Prisma.DeviceCreateWithoutLocationsInput, Prisma.DeviceUncheckedCreateWithoutLocationsInput>
  connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutLocationsInput
  upsert?: Prisma.DeviceUpsertWithoutLocationsInput
  connect?: Prisma.DeviceWhereUniqueInput
  update?: Prisma.XOR<Prisma.XOR<Prisma.DeviceUpdateToOneWithWhereWithoutLocationsInput, Prisma.DeviceUpdateWithoutLocationsInput>, Prisma.DeviceUncheckedUpdateWithoutLocationsInput>
}

export type DeviceCreateWithoutUserInput = {
  id?: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  locations?: Prisma.LocationPointCreateNestedManyWithoutDeviceInput
  geofence?: Prisma.GeofenceCreateNestedOneWithoutDeviceInput
  batteryAlert?: Prisma.BatteryAlertCreateNestedOneWithoutDeviceInput
}

export type DeviceUncheckedCreateWithoutUserInput = {
  id?: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  locations?: Prisma.LocationPointUncheckedCreateNestedManyWithoutDeviceInput
  geofence?: Prisma.GeofenceUncheckedCreateNestedOneWithoutDeviceInput
  batteryAlert?: Prisma.BatteryAlertUncheckedCreateNestedOneWithoutDeviceInput
}

export type DeviceCreateOrConnectWithoutUserInput = {
  where: Prisma.DeviceWhereUniqueInput
  create: Prisma.XOR<Prisma.DeviceCreateWithoutUserInput, Prisma.DeviceUncheckedCreateWithoutUserInput>
}

export type DeviceCreateManyUserInputEnvelope = {
  data: Prisma.DeviceCreateManyUserInput | Prisma.DeviceCreateManyUserInput[]
  skipDuplicates?: boolean
}

export type DeviceUpsertWithWhereUniqueWithoutUserInput = {
  where: Prisma.DeviceWhereUniqueInput
  update: Prisma.XOR<Prisma.DeviceUpdateWithoutUserInput, Prisma.DeviceUncheckedUpdateWithoutUserInput>
  create: Prisma.XOR<Prisma.DeviceCreateWithoutUserInput, Prisma.DeviceUncheckedCreateWithoutUserInput>
}

export type DeviceUpdateWithWhereUniqueWithoutUserInput = {
  where: Prisma.DeviceWhereUniqueInput
  data: Prisma.XOR<Prisma.DeviceUpdateWithoutUserInput, Prisma.DeviceUncheckedUpdateWithoutUserInput>
}

export type DeviceUpdateManyWithWhereWithoutUserInput = {
  where: Prisma.DeviceScalarWhereInput
  data: Prisma.XOR<Prisma.DeviceUpdateManyMutationInput, Prisma.DeviceUncheckedUpdateManyWithoutUserInput>
}

export type DeviceScalarWhereInput = {
  AND?: Prisma.DeviceScalarWhereInput | Prisma.DeviceScalarWhereInput[]
  OR?: Prisma.DeviceScalarWhereInput[]
  NOT?: Prisma.DeviceScalarWhereInput | Prisma.DeviceScalarWhereInput[]
  id?: Prisma.StringFilter<"Device"> | string
  userId?: Prisma.StringFilter<"Device"> | string
  name?: Prisma.StringFilter<"Device"> | string
  pairingToken?: Prisma.StringFilter<"Device"> | string
  lastSeenAt?: Prisma.DateTimeNullableFilter<"Device"> | Date | string | null
  createdAt?: Prisma.DateTimeFilter<"Device"> | Date | string
  cmdReportLocation?: Prisma.BoolFilter<"Device"> | boolean
  cmdSyncWaypoints?: Prisma.BoolFilter<"Device"> | boolean
}

export type DeviceCreateWithoutBatteryAlertInput = {
  id?: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  user: Prisma.UserCreateNestedOneWithoutDevicesInput
  locations?: Prisma.LocationPointCreateNestedManyWithoutDeviceInput
  geofence?: Prisma.GeofenceCreateNestedOneWithoutDeviceInput
}

export type DeviceUncheckedCreateWithoutBatteryAlertInput = {
  id?: string
  userId: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  locations?: Prisma.LocationPointUncheckedCreateNestedManyWithoutDeviceInput
  geofence?: Prisma.GeofenceUncheckedCreateNestedOneWithoutDeviceInput
}

export type DeviceCreateOrConnectWithoutBatteryAlertInput = {
  where: Prisma.DeviceWhereUniqueInput
  create: Prisma.XOR<Prisma.DeviceCreateWithoutBatteryAlertInput, Prisma.DeviceUncheckedCreateWithoutBatteryAlertInput>
}

export type DeviceUpsertWithoutBatteryAlertInput = {
  update: Prisma.XOR<Prisma.DeviceUpdateWithoutBatteryAlertInput, Prisma.DeviceUncheckedUpdateWithoutBatteryAlertInput>
  create: Prisma.XOR<Prisma.DeviceCreateWithoutBatteryAlertInput, Prisma.DeviceUncheckedCreateWithoutBatteryAlertInput>
  where?: Prisma.DeviceWhereInput
}

export type DeviceUpdateToOneWithWhereWithoutBatteryAlertInput = {
  where?: Prisma.DeviceWhereInput
  data: Prisma.XOR<Prisma.DeviceUpdateWithoutBatteryAlertInput, Prisma.DeviceUncheckedUpdateWithoutBatteryAlertInput>
}

export type DeviceUpdateWithoutBatteryAlertInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  user?: Prisma.UserUpdateOneRequiredWithoutDevicesNestedInput
  locations?: Prisma.LocationPointUpdateManyWithoutDeviceNestedInput
  geofence?: Prisma.GeofenceUpdateOneWithoutDeviceNestedInput
}

export type DeviceUncheckedUpdateWithoutBatteryAlertInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  locations?: Prisma.LocationPointUncheckedUpdateManyWithoutDeviceNestedInput
  geofence?: Prisma.GeofenceUncheckedUpdateOneWithoutDeviceNestedInput
}

export type DeviceCreateWithoutGeofenceInput = {
  id?: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  user: Prisma.UserCreateNestedOneWithoutDevicesInput
  locations?: Prisma.LocationPointCreateNestedManyWithoutDeviceInput
  batteryAlert?: Prisma.BatteryAlertCreateNestedOneWithoutDeviceInput
}

export type DeviceUncheckedCreateWithoutGeofenceInput = {
  id?: string
  userId: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  locations?: Prisma.LocationPointUncheckedCreateNestedManyWithoutDeviceInput
  batteryAlert?: Prisma.BatteryAlertUncheckedCreateNestedOneWithoutDeviceInput
}

export type DeviceCreateOrConnectWithoutGeofenceInput = {
  where: Prisma.DeviceWhereUniqueInput
  create: Prisma.XOR<Prisma.DeviceCreateWithoutGeofenceInput, Prisma.DeviceUncheckedCreateWithoutGeofenceInput>
}

export type DeviceUpsertWithoutGeofenceInput = {
  update: Prisma.XOR<Prisma.DeviceUpdateWithoutGeofenceInput, Prisma.DeviceUncheckedUpdateWithoutGeofenceInput>
  create: Prisma.XOR<Prisma.DeviceCreateWithoutGeofenceInput, Prisma.DeviceUncheckedCreateWithoutGeofenceInput>
  where?: Prisma.DeviceWhereInput
}

export type DeviceUpdateToOneWithWhereWithoutGeofenceInput = {
  where?: Prisma.DeviceWhereInput
  data: Prisma.XOR<Prisma.DeviceUpdateWithoutGeofenceInput, Prisma.DeviceUncheckedUpdateWithoutGeofenceInput>
}

export type DeviceUpdateWithoutGeofenceInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  user?: Prisma.UserUpdateOneRequiredWithoutDevicesNestedInput
  locations?: Prisma.LocationPointUpdateManyWithoutDeviceNestedInput
  batteryAlert?: Prisma.BatteryAlertUpdateOneWithoutDeviceNestedInput
}

export type DeviceUncheckedUpdateWithoutGeofenceInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  locations?: Prisma.LocationPointUncheckedUpdateManyWithoutDeviceNestedInput
  batteryAlert?: Prisma.BatteryAlertUncheckedUpdateOneWithoutDeviceNestedInput
}

export type DeviceCreateWithoutLocationsInput = {
  id?: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  user: Prisma.UserCreateNestedOneWithoutDevicesInput
  geofence?: Prisma.GeofenceCreateNestedOneWithoutDeviceInput
  batteryAlert?: Prisma.BatteryAlertCreateNestedOneWithoutDeviceInput
}

export type DeviceUncheckedCreateWithoutLocationsInput = {
  id?: string
  userId: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  geofence?: Prisma.GeofenceUncheckedCreateNestedOneWithoutDeviceInput
  batteryAlert?: Prisma.BatteryAlertUncheckedCreateNestedOneWithoutDeviceInput
}

export type DeviceCreateOrConnectWithoutLocationsInput = {
  where: Prisma.DeviceWhereUniqueInput
  create: Prisma.XOR<Prisma.DeviceCreateWithoutLocationsInput, Prisma.DeviceUncheckedCreateWithoutLocationsInput>
}

export type DeviceUpsertWithoutLocationsInput = {
  update: Prisma.XOR<Prisma.DeviceUpdateWithoutLocationsInput, Prisma.DeviceUncheckedUpdateWithoutLocationsInput>
  create: Prisma.XOR<Prisma.DeviceCreateWithoutLocationsInput, Prisma.DeviceUncheckedCreateWithoutLocationsInput>
  where?: Prisma.DeviceWhereInput
}

export type DeviceUpdateToOneWithWhereWithoutLocationsInput = {
  where?: Prisma.DeviceWhereInput
  data: Prisma.XOR<Prisma.DeviceUpdateWithoutLocationsInput, Prisma.DeviceUncheckedUpdateWithoutLocationsInput>
}

export type DeviceUpdateWithoutLocationsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  user?: Prisma.UserUpdateOneRequiredWithoutDevicesNestedInput
  geofence?: Prisma.GeofenceUpdateOneWithoutDeviceNestedInput
  batteryAlert?: Prisma.BatteryAlertUpdateOneWithoutDeviceNestedInput
}

export type DeviceUncheckedUpdateWithoutLocationsInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  userId?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  geofence?: Prisma.GeofenceUncheckedUpdateOneWithoutDeviceNestedInput
  batteryAlert?: Prisma.BatteryAlertUncheckedUpdateOneWithoutDeviceNestedInput
}

export type DeviceCreateManyUserInput = {
  id?: string
  name: string
  pairingToken: string
  lastSeenAt?: Date | string | null
  createdAt?: Date | string
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
}

export type DeviceUpdateWithoutUserInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  locations?: Prisma.LocationPointUpdateManyWithoutDeviceNestedInput
  geofence?: Prisma.GeofenceUpdateOneWithoutDeviceNestedInput
  batteryAlert?: Prisma.BatteryAlertUpdateOneWithoutDeviceNestedInput
}

export type DeviceUncheckedUpdateWithoutUserInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
  locations?: Prisma.LocationPointUncheckedUpdateManyWithoutDeviceNestedInput
  geofence?: Prisma.GeofenceUncheckedUpdateOneWithoutDeviceNestedInput
  batteryAlert?: Prisma.BatteryAlertUncheckedUpdateOneWithoutDeviceNestedInput
}

export type DeviceUncheckedUpdateManyWithoutUserInput = {
  id?: Prisma.StringFieldUpdateOperationsInput | string
  name?: Prisma.StringFieldUpdateOperationsInput | string
  pairingToken?: Prisma.StringFieldUpdateOperationsInput | string
  lastSeenAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
  cmdReportLocation?: Prisma.BoolFieldUpdateOperationsInput | boolean
  cmdSyncWaypoints?: Prisma.BoolFieldUpdateOperationsInput | boolean
}


/**
 * Count Type DeviceCountOutputType
 */

export type DeviceCountOutputType = {
  locations: number
}

export type DeviceCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  locations?: boolean | DeviceCountOutputTypeCountLocationsArgs
}

/**
 * DeviceCountOutputType without action
 */
export type DeviceCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the DeviceCountOutputType
   */
  select?: Prisma.DeviceCountOutputTypeSelect<ExtArgs> | null
}

/**
 * DeviceCountOutputType without action
 */
export type DeviceCountOutputTypeCountLocationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.LocationPointWhereInput
}


export type DeviceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  userId?: boolean
  name?: boolean
  pairingToken?: boolean
  lastSeenAt?: boolean
  createdAt?: boolean
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
  locations?: boolean | Prisma.Device$locationsArgs<ExtArgs>
  geofence?: boolean | Prisma.Device$geofenceArgs<ExtArgs>
  batteryAlert?: boolean | Prisma.Device$batteryAlertArgs<ExtArgs>
  _count?: boolean | Prisma.DeviceCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["device"]>

export type DeviceSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  userId?: boolean
  name?: boolean
  pairingToken?: boolean
  lastSeenAt?: boolean
  createdAt?: boolean
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["device"]>

export type DeviceSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  userId?: boolean
  name?: boolean
  pairingToken?: boolean
  lastSeenAt?: boolean
  createdAt?: boolean
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}, ExtArgs["result"]["device"]>

export type DeviceSelectScalar = {
  id?: boolean
  userId?: boolean
  name?: boolean
  pairingToken?: boolean
  lastSeenAt?: boolean
  createdAt?: boolean
  cmdReportLocation?: boolean
  cmdSyncWaypoints?: boolean
}

export type DeviceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "name" | "pairingToken" | "lastSeenAt" | "createdAt" | "cmdReportLocation" | "cmdSyncWaypoints", ExtArgs["result"]["device"]>
export type DeviceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
  locations?: boolean | Prisma.Device$locationsArgs<ExtArgs>
  geofence?: boolean | Prisma.Device$geofenceArgs<ExtArgs>
  batteryAlert?: boolean | Prisma.Device$batteryAlertArgs<ExtArgs>
  _count?: boolean | Prisma.DeviceCountOutputTypeDefaultArgs<ExtArgs>
}
export type DeviceIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}
export type DeviceIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
}

export type $DevicePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "Device"
  objects: {
    user: Prisma.$UserPayload<ExtArgs>
    locations: Prisma.$LocationPointPayload<ExtArgs>[]
    geofence: Prisma.$GeofencePayload<ExtArgs> | null
    batteryAlert: Prisma.$BatteryAlertPayload<ExtArgs> | null
  }
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: string
    userId: string
    name: string
    pairingToken: string
    lastSeenAt: Date | null
    createdAt: Date
    cmdReportLocation: boolean
    cmdSyncWaypoints: boolean
  }, ExtArgs["result"]["device"]>
  composites: {}
}

export type DeviceGetPayload<S extends boolean | null | undefined | DeviceDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$DevicePayload, S>

export type DeviceCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
  Omit<DeviceFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
    select?: DeviceCountAggregateInputType | true
  }

export interface DeviceDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['Device'], meta: { name: 'Device' } }
  /**
   * Find zero or one Device that matches the filter.
   * @param {DeviceFindUniqueArgs} args - Arguments to find a Device
   * @example
   * // Get one Device
   * const device = await prisma.device.findUnique({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUnique<T extends DeviceFindUniqueArgs>(args: Prisma.SelectSubset<T, DeviceFindUniqueArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find one Device that matches the filter or throw an error with `error.code='P2025'`
   * if no matches were found.
   * @param {DeviceFindUniqueOrThrowArgs} args - Arguments to find a Device
   * @example
   * // Get one Device
   * const device = await prisma.device.findUniqueOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findUniqueOrThrow<T extends DeviceFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, DeviceFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Device that matches the filter.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {DeviceFindFirstArgs} args - Arguments to find a Device
   * @example
   * // Get one Device
   * const device = await prisma.device.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirst<T extends DeviceFindFirstArgs>(args?: Prisma.SelectSubset<T, DeviceFindFirstArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Device that matches the filter or
   * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {DeviceFindFirstOrThrowArgs} args - Arguments to find a Device
   * @example
   * // Get one Device
   * const device = await prisma.device.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends DeviceFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, DeviceFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find zero or more Devices that matches the filter.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {DeviceFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all Devices
   * const devices = await prisma.device.findMany()
   * 
   * // Get first 10 Devices
   * const devices = await prisma.device.findMany({ take: 10 })
   * 
   * // Only select the `id`
   * const deviceWithIdOnly = await prisma.device.findMany({ select: { id: true } })
   * 
   */
  findMany<T extends DeviceFindManyArgs>(args?: Prisma.SelectSubset<T, DeviceFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

  /**
   * Create a Device.
   * @param {DeviceCreateArgs} args - Arguments to create a Device.
   * @example
   * // Create one Device
   * const Device = await prisma.device.create({
   *   data: {
   *     // ... data to create a Device
   *   }
   * })
   * 
   */
  create<T extends DeviceCreateArgs>(args: Prisma.SelectSubset<T, DeviceCreateArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Create many Devices.
   * @param {DeviceCreateManyArgs} args - Arguments to create many Devices.
   * @example
   * // Create many Devices
   * const device = await prisma.device.createMany({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   *     
   */
  createMany<T extends DeviceCreateManyArgs>(args?: Prisma.SelectSubset<T, DeviceCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Create many Devices and returns the data saved in the database.
   * @param {DeviceCreateManyAndReturnArgs} args - Arguments to create many Devices.
   * @example
   * // Create many Devices
   * const device = await prisma.device.createManyAndReturn({
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Create many Devices and only return the `id`
   * const deviceWithIdOnly = await prisma.device.createManyAndReturn({
   *   select: { id: true },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * 
   */
  createManyAndReturn<T extends DeviceCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, DeviceCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>

  /**
   * Delete a Device.
   * @param {DeviceDeleteArgs} args - Arguments to delete one Device.
   * @example
   * // Delete one Device
   * const Device = await prisma.device.delete({
   *   where: {
   *     // ... filter to delete one Device
   *   }
   * })
   * 
   */
  delete<T extends DeviceDeleteArgs>(args: Prisma.SelectSubset<T, DeviceDeleteArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Update one Device.
   * @param {DeviceUpdateArgs} args - Arguments to update one Device.
   * @example
   * // Update one Device
   * const device = await prisma.device.update({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  update<T extends DeviceUpdateArgs>(args: Prisma.SelectSubset<T, DeviceUpdateArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Delete zero or more Devices.
   * @param {DeviceDeleteManyArgs} args - Arguments to filter Devices to delete.
   * @example
   * // Delete a few Devices
   * const { count } = await prisma.device.deleteMany({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   * 
   */
  deleteMany<T extends DeviceDeleteManyArgs>(args?: Prisma.SelectSubset<T, DeviceDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Devices.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {DeviceUpdateManyArgs} args - Arguments to update one or more rows.
   * @example
   * // Update many Devices
   * const device = await prisma.device.updateMany({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: {
   *     // ... provide data here
   *   }
   * })
   * 
   */
  updateMany<T extends DeviceUpdateManyArgs>(args: Prisma.SelectSubset<T, DeviceUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>

  /**
   * Update zero or more Devices and returns the data updated in the database.
   * @param {DeviceUpdateManyAndReturnArgs} args - Arguments to update many Devices.
   * @example
   * // Update many Devices
   * const device = await prisma.device.updateManyAndReturn({
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * 
   * // Update zero or more Devices and only return the `id`
   * const deviceWithIdOnly = await prisma.device.updateManyAndReturn({
   *   select: { id: true },
   *   where: {
   *     // ... provide filter here
   *   },
   *   data: [
   *     // ... provide data here
   *   ]
   * })
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * 
   */
  updateManyAndReturn<T extends DeviceUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, DeviceUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>

  /**
   * Create or update one Device.
   * @param {DeviceUpsertArgs} args - Arguments to update or create a Device.
   * @example
   * // Update or create a Device
   * const device = await prisma.device.upsert({
   *   create: {
   *     // ... data to create a Device
   *   },
   *   update: {
   *     // ... in case it already exists, update
   *   },
   *   where: {
   *     // ... the filter for the Device we want to update
   *   }
   * })
   */
  upsert<T extends DeviceUpsertArgs>(args: Prisma.SelectSubset<T, DeviceUpsertArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>


  /**
   * Count the number of Devices.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {DeviceCountArgs} args - Arguments to filter Devices to count.
   * @example
   * // Count the number of Devices
   * const count = await prisma.device.count({
   *   where: {
   *     // ... the filter for the Devices we want to count
   *   }
   * })
  **/
  count<T extends DeviceCountArgs>(
    args?: Prisma.Subset<T, DeviceCountArgs>,
  ): Prisma.PrismaPromise<
    T extends runtime.Types.Utils.Record<'select', any>
      ? T['select'] extends true
        ? number
        : Prisma.GetScalarType<T['select'], DeviceCountAggregateOutputType>
      : number
  >

  /**
   * Allows you to perform aggregations operations on a Device.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {DeviceAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
   * @example
   * // Ordered by age ascending
   * // Where email contains prisma.io
   * // Limited to the 10 users
   * const aggregations = await prisma.user.aggregate({
   *   _avg: {
   *     age: true,
   *   },
   *   where: {
   *     email: {
   *       contains: "prisma.io",
   *     },
   *   },
   *   orderBy: {
   *     age: "asc",
   *   },
   *   take: 10,
   * })
  **/
  aggregate<T extends DeviceAggregateArgs>(args: Prisma.Subset<T, DeviceAggregateArgs>): Prisma.PrismaPromise<GetDeviceAggregateType<T>>

  /**
   * Group by Device.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {DeviceGroupByArgs} args - Group by arguments.
   * @example
   * // Group by city, order by createdAt, get count
   * const result = await prisma.user.groupBy({
   *   by: ['city', 'createdAt'],
   *   orderBy: {
   *     createdAt: true
   *   },
   *   _count: {
   *     _all: true
   *   },
   * })
   * 
  **/
  groupBy<
    T extends DeviceGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: DeviceGroupByArgs['orderBy'] }
      : { orderBy?: DeviceGroupByArgs['orderBy'] },
    OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
    ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
    ByValid extends Prisma.Has<ByFields, OrderFields>,
    HavingFields extends Prisma.GetHavingFields<T['having']>,
    HavingValid extends Prisma.Has<ByFields, HavingFields>,
    ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
    InputErrors extends ByEmpty extends Prisma.True
    ? `Error: "by" must not be empty.`
    : HavingValid extends Prisma.False
    ? {
        [P in HavingFields]: P extends ByFields
          ? never
          : P extends string
          ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
          : [
              Error,
              'Field ',
              P,
              ` in "having" needs to be provided in "by"`,
            ]
      }[HavingFields]
    : 'take' extends Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.True
        ? {}
        : {
            [P in OrderFields]: P extends ByFields
              ? never
              : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
          }[OrderFields]
      : 'Error: If you provide "take", you also need to provide "orderBy"'
    : 'skip' extends Prisma.Keys<T>
    ? 'orderBy' extends Prisma.Keys<T>
      ? ByValid extends Prisma.True
        ? {}
        : {
            [P in OrderFields]: P extends ByFields
              ? never
              : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
          }[OrderFields]
      : 'Error: If you provide "skip", you also need to provide "orderBy"'
    : ByValid extends Prisma.True
    ? {}
    : {
        [P in OrderFields]: P extends ByFields
          ? never
          : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
      }[OrderFields]
  >(args: Prisma.SubsetIntersection<T, DeviceGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetDeviceGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the Device model
 */
readonly fields: DeviceFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for Device.
 * Why is this prefixed with `Prisma__`?
 * Because we want to prevent naming conflicts as mentioned in
 * https://github.com/prisma/prisma-client-js/issues/707
 */
export interface Prisma__DeviceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
  locations<T extends Prisma.Device$locationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Device$locationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LocationPointPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
  geofence<T extends Prisma.Device$geofenceArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Device$geofenceArgs<ExtArgs>>): Prisma.Prisma__GeofenceClient<runtime.Types.Result.GetResult<Prisma.$GeofencePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
  batteryAlert<T extends Prisma.Device$batteryAlertArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Device$batteryAlertArgs<ExtArgs>>): Prisma.Prisma__BatteryAlertClient<runtime.Types.Result.GetResult<Prisma.$BatteryAlertPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
  /**
   * Attaches callbacks for the resolution and/or rejection of the Promise.
   * @param onfulfilled The callback to execute when the Promise is resolved.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of which ever callback is executed.
   */
  then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
  /**
   * Attaches a callback for only the rejection of the Promise.
   * @param onrejected The callback to execute when the Promise is rejected.
   * @returns A Promise for the completion of the callback.
   */
  catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
  /**
   * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
   * resolved value cannot be modified from the callback.
   * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
   * @returns A Promise for the completion of the callback.
   */
  finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
}




/**
 * Fields of the Device model
 */
export interface DeviceFieldRefs {
  readonly id: Prisma.FieldRef<"Device", 'String'>
  readonly userId: Prisma.FieldRef<"Device", 'String'>
  readonly name: Prisma.FieldRef<"Device", 'String'>
  readonly pairingToken: Prisma.FieldRef<"Device", 'String'>
  readonly lastSeenAt: Prisma.FieldRef<"Device", 'DateTime'>
  readonly createdAt: Prisma.FieldRef<"Device", 'DateTime'>
  readonly cmdReportLocation: Prisma.FieldRef<"Device", 'Boolean'>
  readonly cmdSyncWaypoints: Prisma.FieldRef<"Device", 'Boolean'>
}
    

// Custom InputTypes
/**
 * Device findUnique
 */
export type DeviceFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
  /**
   * Filter, which Device to fetch.
   */
  where: Prisma.DeviceWhereUniqueInput
}

/**
 * Device findUniqueOrThrow
 */
export type DeviceFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
  /**
   * Filter, which Device to fetch.
   */
  where: Prisma.DeviceWhereUniqueInput
}

/**
 * Device findFirst
 */
export type DeviceFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
  /**
   * Filter, which Device to fetch.
   */
  where?: Prisma.DeviceWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Devices to fetch.
   */
  orderBy?: Prisma.DeviceOrderByWithRelationInput | Prisma.DeviceOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for Devices.
   */
  cursor?: Prisma.DeviceWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Devices from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` Devices.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Devices.
   */
  distinct?: Prisma.DeviceScalarFieldEnum | Prisma.DeviceScalarFieldEnum[]
}

/**
 * Device findFirstOrThrow
 */
export type DeviceFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
  /**
   * Filter, which Device to fetch.
   */
  where?: Prisma.DeviceWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Devices to fetch.
   */
  orderBy?: Prisma.DeviceOrderByWithRelationInput | Prisma.DeviceOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for Devices.
   */
  cursor?: Prisma.DeviceWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Devices from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` Devices.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Devices.
   */
  distinct?: Prisma.DeviceScalarFieldEnum | Prisma.DeviceScalarFieldEnum[]
}

/**
 * Device findMany
 */
export type DeviceFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
  /**
   * Filter, which Devices to fetch.
   */
  where?: Prisma.DeviceWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of Devices to fetch.
   */
  orderBy?: Prisma.DeviceOrderByWithRelationInput | Prisma.DeviceOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing Devices.
   */
  cursor?: Prisma.DeviceWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` Devices from the position of the cursor.
   */
  take?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Skip the first `n` Devices.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of Devices.
   */
  distinct?: Prisma.DeviceScalarFieldEnum | Prisma.DeviceScalarFieldEnum[]
}

/**
 * Device create
 */
export type DeviceCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
  /**
   * The data needed to create a Device.
   */
  data: Prisma.XOR<Prisma.DeviceCreateInput, Prisma.DeviceUncheckedCreateInput>
}

/**
 * Device createMany
 */
export type DeviceCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to create many Devices.
   */
  data: Prisma.DeviceCreateManyInput | Prisma.DeviceCreateManyInput[]
  skipDuplicates?: boolean
}

/**
 * Device createManyAndReturn
 */
export type DeviceCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelectCreateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * The data used to create many Devices.
   */
  data: Prisma.DeviceCreateManyInput | Prisma.DeviceCreateManyInput[]
  skipDuplicates?: boolean
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceIncludeCreateManyAndReturn<ExtArgs> | null
}

/**
 * Device update
 */
export type DeviceUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
  /**
   * The data needed to update a Device.
   */
  data: Prisma.XOR<Prisma.DeviceUpdateInput, Prisma.DeviceUncheckedUpdateInput>
  /**
   * Choose, which Device to update.
   */
  where: Prisma.DeviceWhereUniqueInput
}

/**
 * Device updateMany
 */
export type DeviceUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update Devices.
   */
  data: Prisma.XOR<Prisma.DeviceUpdateManyMutationInput, Prisma.DeviceUncheckedUpdateManyInput>
  /**
   * Filter which Devices to update
   */
  where?: Prisma.DeviceWhereInput
  /**
   * Limit how many Devices to update.
   */
  limit?: number
}

/**
 * Device updateManyAndReturn
 */
export type DeviceUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelectUpdateManyAndReturn<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * The data used to update Devices.
   */
  data: Prisma.XOR<Prisma.DeviceUpdateManyMutationInput, Prisma.DeviceUncheckedUpdateManyInput>
  /**
   * Filter which Devices to update
   */
  where?: Prisma.DeviceWhereInput
  /**
   * Limit how many Devices to update.
   */
  limit?: number
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceIncludeUpdateManyAndReturn<ExtArgs> | null
}

/**
 * Device upsert
 */
export type DeviceUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
  /**
   * The filter to search for the Device to update in case it exists.
   */
  where: Prisma.DeviceWhereUniqueInput
  /**
   * In case the Device found by the `where` argument doesn't exist, create a new Device with this data.
   */
  create: Prisma.XOR<Prisma.DeviceCreateInput, Prisma.DeviceUncheckedCreateInput>
  /**
   * In case the Device was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.DeviceUpdateInput, Prisma.DeviceUncheckedUpdateInput>
}

/**
 * Device delete
 */
export type DeviceDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
  /**
   * Filter which Device to delete.
   */
  where: Prisma.DeviceWhereUniqueInput
}

/**
 * Device deleteMany
 */
export type DeviceDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which Devices to delete
   */
  where?: Prisma.DeviceWhereInput
  /**
   * Limit how many Devices to delete.
   */
  limit?: number
}

/**
 * Device.locations
 */
export type Device$locationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the LocationPoint
   */
  select?: Prisma.LocationPointSelect<ExtArgs> | null
  /**
   * Omit specific fields from the LocationPoint
   */
  omit?: Prisma.LocationPointOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.LocationPointInclude<ExtArgs> | null
  where?: Prisma.LocationPointWhereInput
  orderBy?: Prisma.LocationPointOrderByWithRelationInput | Prisma.LocationPointOrderByWithRelationInput[]
  cursor?: Prisma.LocationPointWhereUniqueInput
  take?: number
  skip?: number
  distinct?: Prisma.LocationPointScalarFieldEnum | Prisma.LocationPointScalarFieldEnum[]
}

/**
 * Device.geofence
 */
export type Device$geofenceArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Geofence
   */
  select?: Prisma.GeofenceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Geofence
   */
  omit?: Prisma.GeofenceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.GeofenceInclude<ExtArgs> | null
  where?: Prisma.GeofenceWhereInput
}

/**
 * Device.batteryAlert
 */
export type Device$batteryAlertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the BatteryAlert
   */
  select?: Prisma.BatteryAlertSelect<ExtArgs> | null
  /**
   * Omit specific fields from the BatteryAlert
   */
  omit?: Prisma.BatteryAlertOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.BatteryAlertInclude<ExtArgs> | null
  where?: Prisma.BatteryAlertWhereInput
}

/**
 * Device without action
 */
export type DeviceDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the Device
   */
  select?: Prisma.DeviceSelect<ExtArgs> | null
  /**
   * Omit specific fields from the Device
   */
  omit?: Prisma.DeviceOmit<ExtArgs> | null
  /**
   * Choose, which related nodes to fetch as well
   */
  include?: Prisma.DeviceInclude<ExtArgs> | null
}
