#!/usr/bin/env python3
# @generated AUTOGENERATED file. Do not Change!

from dataclasses import dataclass, field as _field
from ...config import custom_scalars, datetime
from gql_client.runtime.variables import encode_variables
from gql import gql, Client
from gql.transport.exceptions import TransportQueryError
from functools import partial
from numbers import Number
from typing import Any, AsyncGenerator, Dict, List, Generator, Optional
from time import perf_counter
from dataclasses_json import DataClassJsonMixin, config

from .equipment_port_definition import EquipmentPortDefinitionFragment, QUERY as EquipmentPortDefinitionFragmentQuery

from .equipment_position_definition import EquipmentPositionDefinitionFragment, QUERY as EquipmentPositionDefinitionFragmentQuery

from .property_type import PropertyTypeFragment, QUERY as PropertyTypeFragmentQuery

# fmt: off
QUERY: List[str] = EquipmentPortDefinitionFragmentQuery + EquipmentPositionDefinitionFragmentQuery + PropertyTypeFragmentQuery + ["""
fragment EquipmentTypeFragment on EquipmentType {
  id
  name
  category
  propertyTypes {
    ...PropertyTypeFragment
  }
  positionDefinitions {
    ...EquipmentPositionDefinitionFragment
  }
  portDefinitions {
    ...EquipmentPortDefinitionFragment
  }
}

"""]

@dataclass(frozen=True)
class EquipmentTypeFragment(DataClassJsonMixin):
    @dataclass(frozen=True)
    class PropertyType(PropertyTypeFragment):
        pass

    @dataclass(frozen=True)
    class EquipmentPositionDefinition(EquipmentPositionDefinitionFragment):
        pass

    @dataclass(frozen=True)
    class EquipmentPortDefinition(EquipmentPortDefinitionFragment):
        pass

    id: str
    name: str
    category: Optional[str]
    propertyTypes: List[PropertyType]
    positionDefinitions: List[EquipmentPositionDefinition]
    portDefinitions: List[EquipmentPortDefinition]
