
/* !!! 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_template_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_template_attr
 * 
 */
export type device_template_attrModel = runtime.Types.Result.DefaultSelection<Prisma.$device_template_attrPayload>

export type AggregateDevice_template_attr = {
  _count: Device_template_attrCountAggregateOutputType | null
  _avg: Device_template_attrAvgAggregateOutputType | null
  _sum: Device_template_attrSumAggregateOutputType | null
  _min: Device_template_attrMinAggregateOutputType | null
  _max: Device_template_attrMaxAggregateOutputType | null
}

export type Device_template_attrAvgAggregateOutputType = {
  id: number | null
  template_id: number | null
}

export type Device_template_attrSumAggregateOutputType = {
  id: number | null
  template_id: number | null
}

export type Device_template_attrMinAggregateOutputType = {
  id: number | null
  template_id: number | null
  attr: string | null
  default_val: string | null
}

export type Device_template_attrMaxAggregateOutputType = {
  id: number | null
  template_id: number | null
  attr: string | null
  default_val: string | null
}

export type Device_template_attrCountAggregateOutputType = {
  id: number
  template_id: number
  attr: number
  default_val: number
  _all: number
}


export type Device_template_attrAvgAggregateInputType = {
  id?: true
  template_id?: true
}

export type Device_template_attrSumAggregateInputType = {
  id?: true
  template_id?: true
}

export type Device_template_attrMinAggregateInputType = {
  id?: true
  template_id?: true
  attr?: true
  default_val?: true
}

export type Device_template_attrMaxAggregateInputType = {
  id?: true
  template_id?: true
  attr?: true
  default_val?: true
}

export type Device_template_attrCountAggregateInputType = {
  id?: true
  template_id?: true
  attr?: true
  default_val?: true
  _all?: true
}

export type Device_template_attrAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which device_template_attr to aggregate.
   */
  where?: Prisma.device_template_attrWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of device_template_attrs to fetch.
   */
  orderBy?: Prisma.device_template_attrOrderByWithRelationInput | Prisma.device_template_attrOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the start position
   */
  cursor?: Prisma.device_template_attrWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` device_template_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_template_attrs.
   */
  skip?: number
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Count returned device_template_attrs
  **/
  _count?: true | Device_template_attrCountAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to average
  **/
  _avg?: Device_template_attrAvgAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to sum
  **/
  _sum?: Device_template_attrSumAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the minimum value
  **/
  _min?: Device_template_attrMinAggregateInputType
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
   * 
   * Select which fields to find the maximum value
  **/
  _max?: Device_template_attrMaxAggregateInputType
}

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




export type device_template_attrGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  where?: Prisma.device_template_attrWhereInput
  orderBy?: Prisma.device_template_attrOrderByWithAggregationInput | Prisma.device_template_attrOrderByWithAggregationInput[]
  by: Prisma.Device_template_attrScalarFieldEnum[] | Prisma.Device_template_attrScalarFieldEnum
  having?: Prisma.device_template_attrScalarWhereWithAggregatesInput
  take?: number
  skip?: number
  _count?: Device_template_attrCountAggregateInputType | true
  _avg?: Device_template_attrAvgAggregateInputType
  _sum?: Device_template_attrSumAggregateInputType
  _min?: Device_template_attrMinAggregateInputType
  _max?: Device_template_attrMaxAggregateInputType
}

export type Device_template_attrGroupByOutputType = {
  id: number
  template_id: number
  attr: string
  default_val: string
  _count: Device_template_attrCountAggregateOutputType | null
  _avg: Device_template_attrAvgAggregateOutputType | null
  _sum: Device_template_attrSumAggregateOutputType | null
  _min: Device_template_attrMinAggregateOutputType | null
  _max: Device_template_attrMaxAggregateOutputType | null
}

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



export type device_template_attrWhereInput = {
  AND?: Prisma.device_template_attrWhereInput | Prisma.device_template_attrWhereInput[]
  OR?: Prisma.device_template_attrWhereInput[]
  NOT?: Prisma.device_template_attrWhereInput | Prisma.device_template_attrWhereInput[]
  id?: Prisma.IntFilter<"device_template_attr"> | number
  template_id?: Prisma.IntFilter<"device_template_attr"> | number
  attr?: Prisma.StringFilter<"device_template_attr"> | string
  default_val?: Prisma.StringFilter<"device_template_attr"> | string
}

export type device_template_attrOrderByWithRelationInput = {
  id?: Prisma.SortOrder
  template_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  default_val?: Prisma.SortOrder
  _relevance?: Prisma.device_template_attrOrderByRelevanceInput
}

export type device_template_attrWhereUniqueInput = Prisma.AtLeast<{
  id?: number
  AND?: Prisma.device_template_attrWhereInput | Prisma.device_template_attrWhereInput[]
  OR?: Prisma.device_template_attrWhereInput[]
  NOT?: Prisma.device_template_attrWhereInput | Prisma.device_template_attrWhereInput[]
  template_id?: Prisma.IntFilter<"device_template_attr"> | number
  attr?: Prisma.StringFilter<"device_template_attr"> | string
  default_val?: Prisma.StringFilter<"device_template_attr"> | string
}, "id">

export type device_template_attrOrderByWithAggregationInput = {
  id?: Prisma.SortOrder
  template_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  default_val?: Prisma.SortOrder
  _count?: Prisma.device_template_attrCountOrderByAggregateInput
  _avg?: Prisma.device_template_attrAvgOrderByAggregateInput
  _max?: Prisma.device_template_attrMaxOrderByAggregateInput
  _min?: Prisma.device_template_attrMinOrderByAggregateInput
  _sum?: Prisma.device_template_attrSumOrderByAggregateInput
}

export type device_template_attrScalarWhereWithAggregatesInput = {
  AND?: Prisma.device_template_attrScalarWhereWithAggregatesInput | Prisma.device_template_attrScalarWhereWithAggregatesInput[]
  OR?: Prisma.device_template_attrScalarWhereWithAggregatesInput[]
  NOT?: Prisma.device_template_attrScalarWhereWithAggregatesInput | Prisma.device_template_attrScalarWhereWithAggregatesInput[]
  id?: Prisma.IntWithAggregatesFilter<"device_template_attr"> | number
  template_id?: Prisma.IntWithAggregatesFilter<"device_template_attr"> | number
  attr?: Prisma.StringWithAggregatesFilter<"device_template_attr"> | string
  default_val?: Prisma.StringWithAggregatesFilter<"device_template_attr"> | string
}

export type device_template_attrCreateInput = {
  template_id: number
  attr: string
  default_val: string
}

export type device_template_attrUncheckedCreateInput = {
  id?: number
  template_id: number
  attr: string
  default_val: string
}

export type device_template_attrUpdateInput = {
  template_id?: Prisma.IntFieldUpdateOperationsInput | number
  attr?: Prisma.StringFieldUpdateOperationsInput | string
  default_val?: Prisma.StringFieldUpdateOperationsInput | string
}

export type device_template_attrUncheckedUpdateInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  template_id?: Prisma.IntFieldUpdateOperationsInput | number
  attr?: Prisma.StringFieldUpdateOperationsInput | string
  default_val?: Prisma.StringFieldUpdateOperationsInput | string
}

export type device_template_attrCreateManyInput = {
  id?: number
  template_id: number
  attr: string
  default_val: string
}

export type device_template_attrUpdateManyMutationInput = {
  template_id?: Prisma.IntFieldUpdateOperationsInput | number
  attr?: Prisma.StringFieldUpdateOperationsInput | string
  default_val?: Prisma.StringFieldUpdateOperationsInput | string
}

export type device_template_attrUncheckedUpdateManyInput = {
  id?: Prisma.IntFieldUpdateOperationsInput | number
  template_id?: Prisma.IntFieldUpdateOperationsInput | number
  attr?: Prisma.StringFieldUpdateOperationsInput | string
  default_val?: Prisma.StringFieldUpdateOperationsInput | string
}

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

export type device_template_attrCountOrderByAggregateInput = {
  id?: Prisma.SortOrder
  template_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  default_val?: Prisma.SortOrder
}

export type device_template_attrAvgOrderByAggregateInput = {
  id?: Prisma.SortOrder
  template_id?: Prisma.SortOrder
}

export type device_template_attrMaxOrderByAggregateInput = {
  id?: Prisma.SortOrder
  template_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  default_val?: Prisma.SortOrder
}

export type device_template_attrMinOrderByAggregateInput = {
  id?: Prisma.SortOrder
  template_id?: Prisma.SortOrder
  attr?: Prisma.SortOrder
  default_val?: Prisma.SortOrder
}

export type device_template_attrSumOrderByAggregateInput = {
  id?: Prisma.SortOrder
  template_id?: Prisma.SortOrder
}



export type device_template_attrSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
  id?: boolean
  template_id?: boolean
  attr?: boolean
  default_val?: boolean
}, ExtArgs["result"]["device_template_attr"]>



export type device_template_attrSelectScalar = {
  id?: boolean
  template_id?: boolean
  attr?: boolean
  default_val?: boolean
}

export type device_template_attrOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "template_id" | "attr" | "default_val", ExtArgs["result"]["device_template_attr"]>

export type $device_template_attrPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  name: "device_template_attr"
  objects: {}
  scalars: runtime.Types.Extensions.GetPayloadResult<{
    id: number
    template_id: number
    attr: string
    default_val: string
  }, ExtArgs["result"]["device_template_attr"]>
  composites: {}
}

export type device_template_attrGetPayload<S extends boolean | null | undefined | device_template_attrDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$device_template_attrPayload, S>

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

  /**
   * Group by Device_template_attr.
   * Note, that providing `undefined` is treated as the value not being there.
   * Read more here: https://pris.ly/d/null-undefined
   * @param {device_template_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_template_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_template_attrGroupByArgs['orderBy'] }
      : { orderBy?: device_template_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_template_attrGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetDevice_template_attrGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
/**
 * Fields of the device_template_attr model
 */
readonly fields: device_template_attrFieldRefs;
}

/**
 * The delegate class that acts as a "Promise-like" for device_template_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_template_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_template_attr model
 */
export interface device_template_attrFieldRefs {
  readonly id: Prisma.FieldRef<"device_template_attr", 'Int'>
  readonly template_id: Prisma.FieldRef<"device_template_attr", 'Int'>
  readonly attr: Prisma.FieldRef<"device_template_attr", 'String'>
  readonly default_val: Prisma.FieldRef<"device_template_attr", 'String'>
}
    

// Custom InputTypes
/**
 * device_template_attr findUnique
 */
export type device_template_attrFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_template_attr
   */
  select?: Prisma.device_template_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_template_attr
   */
  omit?: Prisma.device_template_attrOmit<ExtArgs> | null
  /**
   * Filter, which device_template_attr to fetch.
   */
  where: Prisma.device_template_attrWhereUniqueInput
}

/**
 * device_template_attr findUniqueOrThrow
 */
export type device_template_attrFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_template_attr
   */
  select?: Prisma.device_template_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_template_attr
   */
  omit?: Prisma.device_template_attrOmit<ExtArgs> | null
  /**
   * Filter, which device_template_attr to fetch.
   */
  where: Prisma.device_template_attrWhereUniqueInput
}

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

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

/**
 * device_template_attr findMany
 */
export type device_template_attrFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_template_attr
   */
  select?: Prisma.device_template_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_template_attr
   */
  omit?: Prisma.device_template_attrOmit<ExtArgs> | null
  /**
   * Filter, which device_template_attrs to fetch.
   */
  where?: Prisma.device_template_attrWhereInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
   * 
   * Determine the order of device_template_attrs to fetch.
   */
  orderBy?: Prisma.device_template_attrOrderByWithRelationInput | Prisma.device_template_attrOrderByWithRelationInput[]
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
   * 
   * Sets the position for listing device_template_attrs.
   */
  cursor?: Prisma.device_template_attrWhereUniqueInput
  /**
   * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
   * 
   * Take `±n` device_template_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_template_attrs.
   */
  skip?: number
  distinct?: Prisma.Device_template_attrScalarFieldEnum | Prisma.Device_template_attrScalarFieldEnum[]
}

/**
 * device_template_attr create
 */
export type device_template_attrCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_template_attr
   */
  select?: Prisma.device_template_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_template_attr
   */
  omit?: Prisma.device_template_attrOmit<ExtArgs> | null
  /**
   * The data needed to create a device_template_attr.
   */
  data: Prisma.XOR<Prisma.device_template_attrCreateInput, Prisma.device_template_attrUncheckedCreateInput>
}

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

/**
 * device_template_attr update
 */
export type device_template_attrUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_template_attr
   */
  select?: Prisma.device_template_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_template_attr
   */
  omit?: Prisma.device_template_attrOmit<ExtArgs> | null
  /**
   * The data needed to update a device_template_attr.
   */
  data: Prisma.XOR<Prisma.device_template_attrUpdateInput, Prisma.device_template_attrUncheckedUpdateInput>
  /**
   * Choose, which device_template_attr to update.
   */
  where: Prisma.device_template_attrWhereUniqueInput
}

/**
 * device_template_attr updateMany
 */
export type device_template_attrUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * The data used to update device_template_attrs.
   */
  data: Prisma.XOR<Prisma.device_template_attrUpdateManyMutationInput, Prisma.device_template_attrUncheckedUpdateManyInput>
  /**
   * Filter which device_template_attrs to update
   */
  where?: Prisma.device_template_attrWhereInput
  /**
   * Limit how many device_template_attrs to update.
   */
  limit?: number
}

/**
 * device_template_attr upsert
 */
export type device_template_attrUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_template_attr
   */
  select?: Prisma.device_template_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_template_attr
   */
  omit?: Prisma.device_template_attrOmit<ExtArgs> | null
  /**
   * The filter to search for the device_template_attr to update in case it exists.
   */
  where: Prisma.device_template_attrWhereUniqueInput
  /**
   * In case the device_template_attr found by the `where` argument doesn't exist, create a new device_template_attr with this data.
   */
  create: Prisma.XOR<Prisma.device_template_attrCreateInput, Prisma.device_template_attrUncheckedCreateInput>
  /**
   * In case the device_template_attr was found with the provided `where` argument, update it with this data.
   */
  update: Prisma.XOR<Prisma.device_template_attrUpdateInput, Prisma.device_template_attrUncheckedUpdateInput>
}

/**
 * device_template_attr delete
 */
export type device_template_attrDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Select specific fields to fetch from the device_template_attr
   */
  select?: Prisma.device_template_attrSelect<ExtArgs> | null
  /**
   * Omit specific fields from the device_template_attr
   */
  omit?: Prisma.device_template_attrOmit<ExtArgs> | null
  /**
   * Filter which device_template_attr to delete.
   */
  where: Prisma.device_template_attrWhereUniqueInput
}

/**
 * device_template_attr deleteMany
 */
export type device_template_attrDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
  /**
   * Filter which device_template_attrs to delete
   */
  where?: Prisma.device_template_attrWhereInput
  /**
   * Limit how many device_template_attrs to delete.
   */
  limit?: number
}

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