text: #!/usr/bin/env python3
  # @generated AUTOGENERATED file. Do not Change!
  
  from dataclasses import dataclass
  from datetime import datetime
  from gql.gql.datetime_utils import DATETIME_FIELD
  from gql.gql.graphql_client import GraphqlClient
  from gql.gql.client import OperationException
  from gql.gql.reporter import FailedOperationException
  from functools import partial
  from numbers import Number
  from typing import Any, Callable, List, Mapping, Optional, Dict
  from time import perf_counter
  from dataclasses_json import DataClassJsonMixin
  
  from ..fragment.customer import CustomerFragment, QUERY as CustomerFragmentQuery
  
  QUERY: List[str] = CustomerFragmentQuery + ["""
  query ServiceTypeServicesQuery($id: ID!) {
    serviceType: node(id: $id) {
      ... on ServiceType {
        services {
          id
          name
          externalId
          customer {
            ...CustomerFragment
          }
        }
      }
    }
  }
  
  """]
  
  @dataclass
  class ServiceTypeServicesQuery(DataClassJsonMixin):
      @dataclass
      class ServiceTypeServicesQueryData(DataClassJsonMixin):
          @dataclass
          class Node(DataClassJsonMixin):
              @dataclass
              class Service(DataClassJsonMixin):
                  @dataclass
                  class Customer(CustomerFragment):
                      pass
  
                  id: str
                  name: str
                  externalId: Optional[str]
                  customer: Optional[Customer]
  
              services: List[Service]
  
          serviceType: Optional[Node]
  
      data: ServiceTypeServicesQueryData
  
      @classmethod
      # fmt: off
      def execute(cls, client: GraphqlClient, id: str) -> Optional[ServiceTypeServicesQueryData.Node]:
          # fmt: off
          variables: Dict[str, Any] = {"id": id}
          try:
              network_start = perf_counter()
              response_text = client.call(''.join(set(QUERY)), variables=variables)
              decode_start = perf_counter()
              res = cls.from_json(response_text).data
              decode_time = perf_counter() - decode_start
              network_time = decode_start - network_start
              client.reporter.log_successful_operation("ServiceTypeServicesQuery", variables, network_time, decode_time)
              return res.serviceType
          except OperationException as e:
              raise FailedOperationException(
                  client.reporter,
                  e.err_msg,
                  e.err_id,
                  "ServiceTypeServicesQuery",
                  variables,
              )
  