#!/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 .property_type import PropertyTypeFragment, QUERY as PropertyTypeFragmentQuery

# fmt: off
QUERY: List[str] = PropertyTypeFragmentQuery + ["""
fragment ProjectTypeFragment on ProjectType {
    id
    name
    description
    properties {
      ...PropertyTypeFragment
    }
    workOrders {
        id
        index
        type {
            id
            name
        }
    }
}
"""]

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

    @dataclass(frozen=True)
    class WorkOrderDefinition(DataClassJsonMixin):
        @dataclass(frozen=True)
        class WorkOrderType(DataClassJsonMixin):
            id: str
            name: str

        id: str
        index: Optional[int]
        type: WorkOrderType

    id: str
    name: str
    description: Optional[str]
    properties: List[PropertyType]
    workOrders: List[WorkOrderDefinition]
