
/* !!! 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_attr` 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_attr
 * 
 */
export type device_attrModel = runtime.Types.Result.DefaultSelection<Prisma.$device_attrPayload>

export type AggregateDevice_attr = {
  _count: Device_attrCountAggregateOutputType | null
  _avg: Device_attrAvgAggregateOutputType | null
  _sum: Device_attrSumAggregateOutputType | null
  _min: Device_attrMinAggregateOutputType | null
  _max: Device_attrMaxAggregateOutputType | null
}

export type Device_attrAvgAggregateOutputType = {
  id: number | null
  device_id: number | null
}

export type Device_attrSumAggregateOutputType = {
  id: number | null
  device_id: number | null
}

export type Device_attrMinAggregateOutputType = {
  id: number | null
  device_id: number | null
  attr: string | null
  value: string | null
}

export type Device_attrMaxAggregateOutputType = {
  id: number | null
  device_id: number | null
  attr: string | null
  value: string | null
}

export type Device_attrCountAggregateOutputType = {
  id: number
  device_id: number
  attr: number
  value: number
  _all: number
}


export type Device_attrAvgAggregateInputType = {
  id?: true
  device_id?: true
}

export type Device_attrSumAggregateInputType = {
  id?: true
  device_id?: true
}

export type Device_attrMinAggregateInputType = {
  id?: true
  device_id?: true
  attr?: true
  value?: true
}

export type Device_attrMaxAggregateInputType = {
  id?: true
  device_id?: true
  attr?: true
  value?: true
}

export type Device_attrCountAggregateInputType = {
  id?: true
  device_id?: true
  attr?: true
  value?: true
  _all?: true
}

export type Device_attrAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which device_attr to aggregate.
   */
  where?: Prisma.device_attrWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of device_attrs to fetch.
   */
  orderBy?: Prisma.device_attrOrderByWithRelationInput | Prisma.device_attrOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.device_attrWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` device_attrs 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` device_attrs.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned device_attrs
  **/
  _count?: true | Device_attrCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: Device_attrAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: Device_attrSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: Device_attrMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: Device_attrMaxAggregateInputType
}

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




export type device_attrGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.device_attrWhereInput
  orderBy?: Prisma.device_attrOrderByWithAggregationInput | Prisma.device_attrOrderByWithAggregationInput[]
  by: Prisma.Device_attrScalarFieldEnum[] | Prisma.Device_attrScalarFieldEnum
  having?: Prisma.device_attrScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: Device_attrCountAggregateInputType | true
  _avg?: Device_attrAvgAggregateInputType
  _sum?: Device_attrSumAggregateInputType
  _min?: Device_attrMinAggregateInputType
  _max?: Device_attrMaxAggregateInputType
}

export type Device_attrGroupByOutputType = {
  id: number
  device_id: number
  attr: string
  value: string
  _count: Device_attrCountAggregateOutputType | null
  _avg: Device_attrAvgAggregateOutputType | null
  _sum: Device_attrSumAggregateOutputType | null
  _min: Device_attrMinAggregateOutputType | null
  _max: Device_attrMaxAggregateOutputType | null
}

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



export type device_attrWhereInput = {
  AND?: Prisma.device_attrWhereInput | Prisma.device_attrWhereInput[]
  OR?: Prisma.device_attrWhereInput[]
  NOT?: Prisma.device_attrWhereInput | Prisma.device_attrWhereInput[]
  id?: Prisma.IntFilter<"device_attr"> | number
  device_id?: Prisma.IntFilter<"device_attr"> | number
  attr?: Prisma.StringFilter<"device_attr"> | string
  value?: Prisma.StringFilter<"device_attr"> | string
}

export type device_attrOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  device_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  value?: Prisma.SortOrder
  _relevance?: Prisma.device_attrOrderByRelevanceInput
}

export type device_attrWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.device_attrWhereInput | Prisma.device_attrWhereInput[]
  OR?: Prisma.device_attrWhereInput[]
  NOT?: Prisma.device_attrWhereInput | Prisma.device_attrWhereInput[]
  device_id?: Prisma.IntFilter<"device_attr"> | number
  attr?: Prisma.StringFilter<"device_attr"> | string
  value?: Prisma.StringFilter<"device_attr"> | string
}, "id">

export type device_attrOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  device_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  value?: Prisma.SortOrder
  _count?: Prisma.device_attrCountOrderByAggregateInput
  _avg?: Prisma.device_attrAvgOrderByAggregateInput
  _max?: Prisma.device_attrMaxOrderByAggregateInput
  _min?: Prisma.device_attrMinOrderByAggregateInput
  _sum?: Prisma.device_attrSumOrderByAggregateInput
}

export type device_attrScalarWhereWithAggregatesInput = {
  AND?: Prisma.device_attrScalarWhereWithAggregatesInput | Prisma.device_attrScalarWhereWithAggregatesInput[]
  OR?: Prisma.device_attrScalarWhereWithAggregatesInput[]
  NOT?: Prisma.device_attrScalarWhereWithAggregatesInput | Prisma.device_attrScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"device_attr"> | number
  device_id?: Prisma.IntWithAggregatesFilter<"device_attr"> | number
  attr?: Prisma.StringWithAggregatesFilter<"device_attr"> | string
  value?: Prisma.StringWithAggregatesFilter<"device_attr"> | string
}

export type device_attrCreateInput = {
  device_id: number
  attr: string
  value: string
}

export type device_attrUncheckedCreateInput = {
  id?: number
  device_id: number
  attr: string
  value: string
}

export type device_attrUpdateInput = {
  device_id?: Prisma.IntFieldUpdateOperationsInput | number
  attr?: Prisma.StringFieldUpdateOperationsInput | string
  value?: Prisma.StringFieldUpdateOperationsInput | string
}

export type device_attrUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  device_id?: Prisma.IntFieldUpdateOperationsInput | number
  attr?: Prisma.StringFieldUpdateOperationsInput | string
  value?: Prisma.StringFieldUpdateOperationsInput | string
}

export type device_attrCreateManyInput = {
  id?: number
  device_id: number
  attr: string
  value: string
}

export type device_attrUpdateManyMutationInput = {
  device_id?: Prisma.IntFieldUpdateOperationsInput | number
  attr?: Prisma.StringFieldUpdateOperationsInput | string
  value?: Prisma.StringFieldUpdateOperationsInput | string
}

export type device_attrUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  device_id?: Prisma.IntFieldUpdateOperationsInput | number
  attr?: Prisma.StringFieldUpdateOperationsInput | string
  value?: Prisma.StringFieldUpdateOperationsInput | string
}

export type device_attrOrderByRelevanceInput = {
  fields: Prisma.device_attrOrderByRelevanceFieldEnum | Prisma.device_attrOrderByRelevanceFieldEnum[]
  sort: Prisma.SortOrder
  search: string
}

export type device_attrCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  device_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  value?: Prisma.SortOrder
}

export type device_attrAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
  device_id?: Prisma.SortOrder
}

export type device_attrMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  device_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  value?: Prisma.SortOrder
}

export type device_attrMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  device_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  value?: Prisma.SortOrder
}

export type device_attrSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
  device_id?: Prisma.SortOrder
}



export type device_attrSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  device_id?: boolean
  attr?: boolean
  value?: boolean
}, ExtArgs["result"]["device_attr"]>



export type device_attrSelectScalar = {
  id?: boolean
  device_id?: boolean
  attr?: boolean
  value?: boolean
}

export type device_attrOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "device_id" | "attr" | "value", ExtArgs["result"]["device_attr"]>

export type $device_attrPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "device_attr"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    device_id: number
    attr: string
    value: string
  }, ExtArgs["result"]["device_attr"]>
  composites: {}
}

export type device_attrGetPayload<S extends boolean | null | undefined | device_attrDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$device_attrPayload, S>

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

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

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

  /**
   * Find the first Device_attr 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 {device_attrFindFirstArgs} args - Arguments to find a Device_attr
   * @example
   * // Get one Device_attr
   * const device_attr = await prisma.device_attr.findFirst({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirst<T extends device_attrFindFirstArgs>(args?: Prisma.SelectSubset<T, device_attrFindFirstArgs<ExtArgs>>): Prisma.Prisma__device_attrClient<runtime.Types.Result.GetResult<Prisma.$device_attrPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>

  /**
   * Find the first Device_attr 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 {device_attrFindFirstOrThrowArgs} args - Arguments to find a Device_attr
   * @example
   * // Get one Device_attr
   * const device_attr = await prisma.device_attr.findFirstOrThrow({
   *   where: {
   *     // ... provide filter here
   *   }
   * })
   */
  findFirstOrThrow<T extends device_attrFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, device_attrFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__device_attrClient<runtime.Types.Result.GetResult<Prisma.$device_attrPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>

  /**
   * Find zero or more Device_attrs 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 {device_attrFindManyArgs} args - Arguments to filter and select certain fields only.
   * @example
   * // Get all Device_attrs
   * const device_attrs = await prisma.device_attr.findMany()
   * 
   * // Get first 10 Device_attrs
   * const device_attrs = await prisma.device_attr.findMany({ take: 10 })
   * 
   * // Only select the `id`
   * const device_attrWithIdOnly = await prisma.device_attr.findMany({ select: { id: true } })
   * 
   */
  findMany<T extends device_attrFindManyArgs>(args?: Prisma.SelectSubset<T, device_attrFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$device_attrPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>

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

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

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

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

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

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

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


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

  /**
   * Allows you to perform aggregations operations on a Device_attr.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {Device_attrAggregateArgs} 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 Device_attrAggregateArgs>(args: Prisma.Subset<T, Device_attrAggregateArgs>): Prisma.PrismaPromise<GetDevice_attrAggregateType<T>>

  /**
   * Group by Device_attr.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {device_attrGroupByArgs} 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 device_attrGroupByArgs,
    HasSelectOrTake extends Prisma.Or<
      Prisma.Extends<'skip', Prisma.Keys<T>>,
      Prisma.Extends<'take', Prisma.Keys<T>>
    >,
    OrderByArg extends Prisma.True extends HasSelectOrTake
      ? { orderBy: device_attrGroupByArgs['orderBy'] }
      : { orderBy?: device_attrGroupByArgs['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, device_attrGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetDevice_attrGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the device_attr model
 */
readonly fields: device_attrFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for device_attr.
 * 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__device_attrClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
  readonly [Symbol.toStringTag]: "PrismaPromise"
  /**
   * 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_attr model
 */
export interface device_attrFieldRefs {
  readonly id: Prisma.FieldRef<"device_attr", 'Int'>
  readonly device_id: Prisma.FieldRef<"device_attr", 'Int'>
  readonly attr: Prisma.FieldRef<"device_attr", 'String'>
  readonly value: Prisma.FieldRef<"device_attr", 'String'>
}
    

// Custom InputTypes
/**
 * device_attr findUnique
 */
export type device_attrFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
  /**
   * Filter, which device_attr to fetch.
   */
  where: Prisma.device_attrWhereUniqueInput
}

/**
 * device_attr findUniqueOrThrow
 */
export type device_attrFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
  /**
   * Filter, which device_attr to fetch.
   */
  where: Prisma.device_attrWhereUniqueInput
}

/**
 * device_attr findFirst
 */
export type device_attrFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
  /**
   * Filter, which device_attr to fetch.
   */
  where?: Prisma.device_attrWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of device_attrs to fetch.
   */
  orderBy?: Prisma.device_attrOrderByWithRelationInput | Prisma.device_attrOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for device_attrs.
   */
  cursor?: Prisma.device_attrWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` device_attrs 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` device_attrs.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of device_attrs.
   */
  distinct?: Prisma.Device_attrScalarFieldEnum | Prisma.Device_attrScalarFieldEnum[]
}

/**
 * device_attr findFirstOrThrow
 */
export type device_attrFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
  /**
   * Filter, which device_attr to fetch.
   */
  where?: Prisma.device_attrWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of device_attrs to fetch.
   */
  orderBy?: Prisma.device_attrOrderByWithRelationInput | Prisma.device_attrOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for searching for device_attrs.
   */
  cursor?: Prisma.device_attrWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` device_attrs 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` device_attrs.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
   * 
   * Filter by unique combinations of device_attrs.
   */
  distinct?: Prisma.Device_attrScalarFieldEnum | Prisma.Device_attrScalarFieldEnum[]
}

/**
 * device_attr findMany
 */
export type device_attrFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
  /**
   * Filter, which device_attrs to fetch.
   */
  where?: Prisma.device_attrWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of device_attrs to fetch.
   */
  orderBy?: Prisma.device_attrOrderByWithRelationInput | Prisma.device_attrOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing device_attrs.
   */
  cursor?: Prisma.device_attrWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` device_attrs 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` device_attrs.
   */
  skip?: number
  distinct?: Prisma.Device_attrScalarFieldEnum | Prisma.Device_attrScalarFieldEnum[]
}

/**
 * device_attr create
 */
export type device_attrCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
  /**
   * The data needed to create a device_attr.
   */
  data: Prisma.XOR<Prisma.device_attrCreateInput, Prisma.device_attrUncheckedCreateInput>
}

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

/**
 * device_attr update
 */
export type device_attrUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
  /**
   * The data needed to update a device_attr.
   */
  data: Prisma.XOR<Prisma.device_attrUpdateInput, Prisma.device_attrUncheckedUpdateInput>
  /**
   * Choose, which device_attr to update.
   */
  where: Prisma.device_attrWhereUniqueInput
}

/**
 * device_attr updateMany
 */
export type device_attrUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update device_attrs.
   */
  data: Prisma.XOR<Prisma.device_attrUpdateManyMutationInput, Prisma.device_attrUncheckedUpdateManyInput>
  /**
   * Filter which device_attrs to update
   */
  where?: Prisma.device_attrWhereInput
  /**
   * Limit how many device_attrs to update.
   */
  limit?: number
}

/**
 * device_attr upsert
 */
export type device_attrUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
  /**
   * The filter to search for the device_attr to update in case it exists.
   */
  where: Prisma.device_attrWhereUniqueInput
  /**
   * In case the device_attr found by the `where` argument doesn't exist, create a new device_attr with this data.
   */
  create: Prisma.XOR<Prisma.device_attrCreateInput, Prisma.device_attrUncheckedCreateInput>
  /**
   * In case the device_attr was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.device_attrUpdateInput, Prisma.device_attrUncheckedUpdateInput>
}

/**
 * device_attr delete
 */
export type device_attrDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
  /**
   * Filter which device_attr to delete.
   */
  where: Prisma.device_attrWhereUniqueInput
}

/**
 * device_attr deleteMany
 */
export type device_attrDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which device_attrs to delete
   */
  where?: Prisma.device_attrWhereInput
  /**
   * Limit how many device_attrs to delete.
   */
  limit?: number
}

/**
 * device_attr without action
 */
export type device_attrDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_attr
   */
  select?: Prisma.device_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_attr
   */
  omit?: Prisma.device_attrOmit<ExtArgs> | null
}
