directive @range(min: Float, max: Float) on FIELD_DEFINITION

enum LengthUnit {
  M
  CENTIM
}

enum VelocityUnit {
  KILOM_PER_HR
  MILES_PER_HR
}

type Query {
  vehicle: Vehicle
}

enum Vehicle_ADAS_ActiveAutonomyLevel_Enum {
  SAE_0
  SAE_5
}

enum Vehicle_ADAS_ObstacleDetection_WarningType_Enum {
  UNDEFINED
  CROSS_TRAFFIC
  BLIND_SPOT
  COLLISION_PREVENTION
}

enum Vehicle_LowVoltageSystemState_Enum {
  UNDEFINED
  LOCK
  OFF
  ACC
  ON
  START
}

"""High-level vehicle data."""
type Vehicle {
  id: ID!
  averageSpeed(unit: VelocityUnit = KILOM_PER_HR): Int
  isAutoPowerOptimize: Boolean
  lowVoltageSystemState: Vehicle_LowVoltageSystemState_Enum
  adas: Vehicle_ADAS
  body: Vehicle_Body
  occupant_s: [Vehicle_Occupant]
}

"""All Advanced Driver Assist Systems data."""
type Vehicle_ADAS {
  activeAutonomyLevel: Vehicle_ADAS_ActiveAutonomyLevel_Enum
  isAutoPowerOptimize: Boolean
  abs: Vehicle_ADAS_ABS
  obstacleDetection_s: [Vehicle_ADAS_ObstacleDetection]
}

"""Antilock Breaking System (ABS) signals."""
type Vehicle_ADAS_ABS {
  isEngaged: Boolean
  isError: Boolean
}


"""Signals form Obstacle Sensor System."""
type Vehicle_ADAS_ObstacleDetection {
  id: ID!
  distance(unit: LengthUnit = CENTIM): Int @range(min: 0, max: 10000)
  isEnabled: Boolean
  warningType: Vehicle_ADAS_ObstacleDetection_WarningType_Enum
}


"""Occupant (Driver or Passenger) data."""
type Vehicle_Occupant {
  id: ID!
  instanceLabel: String
  identifier: Vehicle_Occupant_Identifier
}


"""Identifier attributes based on OAuth 2.0."""
type Vehicle_Occupant_Identifier {
  issuer: String
  subject: String
}


"""All body components."""
type Vehicle_Body {
  """Body type code as defined by ISO 3779."""
  bodyType: String
  mirrors_s: [Vehicle_Body_Mirrors]
}


"""All mirrors."""
type Vehicle_Body_Mirrors {
  id: ID!
  isFolded: Boolean
}
