← All schemas
ieu.vehicle
Canonical URL: http://schematalog.com/api/schemas/ieu.vehicle/versions/1.0
Published: 05 June 2023 21:56
Properties
| Parameter | Description | Type | Required | Nullable | Default | Example |
|---|---|---|---|---|---|---|
allowed |
Allowed boolean | Boolean | Optional | Yes | ||
consent_status |
String | Optional | Yes | |||
created |
Time of the creation of this entity / first activity recorded | ISO 8601 Timestamp | Optional | "2020-05-22T10:30:55+00:00" |
||
data_provider_key |
Data provider key | String | Optional | Yes | ||
fuel_type |
Fuel type | String | Optional | Yes | "petrol" |
|
licence_plate |
Licence/registration plate of the vehicle | String | Optional | Yes | "AB20 ABC" |
|
make |
Vehicle make | String | Optional | Yes | "BMW" |
|
message_id |
The message unique identifier | UUID | Required | |||
message_type |
The message type | String | Required | "ieu.vehicle" |
||
meta |
Meta information for the vehicle. Submit null to delete a field. | Object | Optional | |||
model |
Vehicle model | String | Optional | Yes | "3 - Series" |
|
seed_odo |
Odometer reading to offset GPS-based readings. In meters. | Integer | Optional | 0 |
||
seed_odo_time |
Time at which the seed_odo is supplied. | ISO 8601 Timestamp | Optional | Yes | "2017-10-11T14:07:02+00:00" |
|
source_id |
The source unique identifier. Entity id in this case. | UUID | Required | |||
source_message_type |
The type of message sent by the source | String | Optional | |||
source_type |
The source type of the message received by the service | String | Required | "IEU" |
"TM8" |
|
specification |
Detailed information for the vehicle model, obtained from the VIN. | Object | Optional | |||
tenant_id |
The tenant/club for this message | String | Required | |||
time |
Time of the message | ISO 8601 Timestamp | Required | "2020-05-22T10:30:55+00:00" |
||
vehicle_id |
Unique identifier of the Vehicle | UUID | Required | "2CB26F5A-9EF2-4530-8B02-A93DFE63F6CC" |
||
vin |
Vehicle Identification Number (VIN) | String | Optional | Yes | ||
year |
Build year | ISO 8601 Timestamp | Optional | Yes | 2017 |
JSON
{
"type": "object",
"properties": {
"make": {
"type": "string",
"nullable": true,
"description": "Vehicle make",
"example": "BMW"
},
"model": {
"type": "string",
"nullable": true,
"description": "Vehicle model",
"example": "3 - Series"
},
"year": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Build year",
"example": "2017"
},
"fuel_type": {
"type": "string",
"nullable": true,
"minLength": 1,
"description": "Fuel type",
"example": "petrol"
},
"vin": {
"type": "string",
"nullable": true,
"description": "Vehicle Identification Number (VIN)"
},
"seed_odo": {
"type": "integer",
"default": 0,
"minimum": 0,
"description": "Odometer reading to offset GPS-based readings. In meters."
},
"licence_plate": {
"type": "string",
"nullable": true,
"description": "Licence/registration plate of the vehicle",
"example": "AB20 ABC"
},
"meta": {
"type": "object",
"description": "Meta information for the vehicle. Submit null to delete a field.",
"additionalProperties": {
"nullable": true
}
},
"specification": {
"type": "object",
"description": "Detailed information for the vehicle model, obtained from the VIN.",
"additionalProperties": {
"nullable": true
}
},
"created": {
"type": "string",
"format": "date-time",
"description": "Time of the creation of this entity / first activity recorded",
"example": "2020-05-22T10:30:55+00:00"
},
"time": {
"type": "string",
"format": "date-time",
"description": "Time of the message",
"example": "2020-05-22T10:30:55+00:00"
},
"vehicle_id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier of the Vehicle",
"example": "2CB26F5A-9EF2-4530-8B02-A93DFE63F6CC"
},
"seed_odo_time": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Time at which the seed_odo is supplied.",
"example": "2017-10-11T14:07:02+00:00"
},
"consent_status": {
"type": "string",
"enum": [
"approved",
"suspended",
"revoked"
],
"nullable": true
},
"data_provider_key": {
"type": "string",
"nullable": true,
"description": "Data provider key"
},
"allowed": {
"type": "boolean",
"nullable": true,
"description": "Allowed boolean"
},
"tenant_id": {
"type": "string",
"description": "The tenant/club for this message"
},
"source_id": {
"type": "string",
"format": "uuid",
"description": "The source unique identifier. Entity id in this case."
},
"source_type": {
"type": "string",
"default": "IEU",
"description": "The source type of the message received by the service",
"example": "TM8"
},
"message_id": {
"type": "string",
"format": "uuid",
"description": "The message unique identifier"
},
"message_type": {
"type": "string",
"default": "ieu.vehicle",
"description": "The message type"
},
"source_message_type": {
"type": "string",
"description": "The type of message sent by the source"
}
},
"required": [
"message_id",
"message_type",
"source_id",
"source_type",
"tenant_id",
"time",
"vehicle_id"
],
"$id": "http://schematalog.com/api/schemas/ieu.vehicle/versions/1.0",
"title": "ieu.vehicle"
}
YAML
$id: http://schematalog.com/api/schemas/ieu.vehicle/versions/1.0
properties:
allowed:
description: Allowed boolean
nullable: true
type: boolean
consent_status:
enum:
- approved
- suspended
- revoked
nullable: true
type: string
created:
description: Time of the creation of this entity / first activity recorded
example: '2020-05-22T10:30:55+00:00'
format: date-time
type: string
data_provider_key:
description: Data provider key
nullable: true
type: string
fuel_type:
description: Fuel type
example: petrol
minLength: 1
nullable: true
type: string
licence_plate:
description: Licence/registration plate of the vehicle
example: AB20 ABC
nullable: true
type: string
make:
description: Vehicle make
example: BMW
nullable: true
type: string
message_id:
description: The message unique identifier
format: uuid
type: string
message_type:
default: ieu.vehicle
description: The message type
type: string
meta:
additionalProperties:
nullable: true
description: Meta information for the vehicle. Submit null to delete a field.
type: object
model:
description: Vehicle model
example: 3 - Series
nullable: true
type: string
seed_odo:
default: 0
description: Odometer reading to offset GPS-based readings. In meters.
minimum: 0
type: integer
seed_odo_time:
description: Time at which the seed_odo is supplied.
example: '2017-10-11T14:07:02+00:00'
format: date-time
nullable: true
type: string
source_id:
description: The source unique identifier. Entity id in this case.
format: uuid
type: string
source_message_type:
description: The type of message sent by the source
type: string
source_type:
default: IEU
description: The source type of the message received by the service
example: TM8
type: string
specification:
additionalProperties:
nullable: true
description: Detailed information for the vehicle model, obtained from the VIN.
type: object
tenant_id:
description: The tenant/club for this message
type: string
time:
description: Time of the message
example: '2020-05-22T10:30:55+00:00'
format: date-time
type: string
vehicle_id:
description: Unique identifier of the Vehicle
example: 2CB26F5A-9EF2-4530-8B02-A93DFE63F6CC
format: uuid
type: string
vin:
description: Vehicle Identification Number (VIN)
nullable: true
type: string
year:
description: Build year
example: '2017'
format: date-time
nullable: true
type: string
required:
- message_id
- message_type
- source_id
- source_type
- tenant_id
- time
- vehicle_id
title: ieu.vehicle
type: object
Python Code
from __future__ import annotations
from enum import Enum
from typing import Any, Dict, Optional
from uuid import UUID
from pydantic import AwareDatetime, BaseModel, Field, conint, constr
class ConsentStatus(Enum):
approved = 'approved'
suspended = 'suspended'
revoked = 'revoked'
class IeuVehicle(BaseModel):
make: Optional[str] = Field(None, description='Vehicle make', examples=['BMW'])
model: Optional[str] = Field(
None, description='Vehicle model', examples=['3 - Series']
)
year: Optional[AwareDatetime] = Field(
None, description='Build year', examples=['2017']
)
fuel_type: Optional[constr(min_length=1)] = Field(
None, description='Fuel type', examples=['petrol']
)
vin: Optional[str] = Field(None, description='Vehicle Identification Number (VIN)')
seed_odo: Optional[conint(ge=0)] = Field(
0, description='Odometer reading to offset GPS-based readings. In meters.'
)
licence_plate: Optional[str] = Field(
None,
description='Licence/registration plate of the vehicle',
examples=['AB20 ABC'],
)
meta: Optional[Dict[str, Any]] = Field(
None,
description='Meta information for the vehicle. Submit null to delete a field.',
)
specification: Optional[Dict[str, Any]] = Field(
None,
description='Detailed information for the vehicle model, obtained from the VIN.',
)
created: Optional[AwareDatetime] = Field(
None,
description='Time of the creation of this entity / first activity recorded',
examples=['2020-05-22T10:30:55+00:00'],
)
time: AwareDatetime = Field(
..., description='Time of the message', examples=['2020-05-22T10:30:55+00:00']
)
vehicle_id: UUID = Field(
...,
description='Unique identifier of the Vehicle',
examples=['2CB26F5A-9EF2-4530-8B02-A93DFE63F6CC'],
)
seed_odo_time: Optional[AwareDatetime] = Field(
None,
description='Time at which the seed_odo is supplied.',
examples=['2017-10-11T14:07:02+00:00'],
)
consent_status: Optional[ConsentStatus] = None
data_provider_key: Optional[str] = Field(None, description='Data provider key')
allowed: Optional[bool] = Field(None, description='Allowed boolean')
tenant_id: str = Field(..., description='The tenant/club for this message')
source_id: UUID = Field(
..., description='The source unique identifier. Entity id in this case.'
)
source_type: str = Field(
...,
description='The source type of the message received by the service',
examples=['TM8'],
)
message_id: UUID = Field(..., description='The message unique identifier')
message_type: str = Field(..., description='The message type')
source_message_type: Optional[str] = Field(
None, description='The type of message sent by the source'
)
AVRO Schema
{
"type": "record",
"name": "document",
"namespace": "ieu.vehicle",
"fields": [
{
"name": "make",
"type": [
"null",
"string"
],
"doc": "Vehicle make"
},
{
"name": "model",
"type": [
"null",
"string"
],
"doc": "Vehicle model"
},
{
"name": "year",
"type": [
"null",
"int"
],
"doc": "Build year"
},
{
"name": "fuel_type",
"type": [
"null",
"string"
],
"doc": "Fuel type"
},
{
"name": "vin",
"type": [
"null",
"string"
],
"doc": "Vehicle Identification Number (VIN)"
},
{
"name": "seed_odo",
"type": [
"null",
"int"
],
"doc": "Odometer reading to offset GPS-based readings. In meters."
},
{
"name": "licence_plate",
"type": [
"null",
"string"
],
"doc": "Licence/registration plate of the vehicle"
},
{
"name": "meta",
"type": [
"null",
{
"name": "meta",
"doc": "Meta information for the vehicle. Submit null to delete a field.",
"type": "map",
"values": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string",
{
"type": "array",
"items": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string",
{
"type": "array",
"items": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string"
]
},
{
"type": "map",
"values": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string"
]
}
]
},
{
"type": "map",
"values": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string",
{
"type": "array",
"items": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string"
]
},
{
"type": "map",
"values": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string"
]
}
]
}
]
}
],
"doc": "Meta information for the vehicle. Submit null to delete a field."
},
{
"name": "specification",
"type": [
"null",
{
"name": "specification",
"doc": "Detailed information for the vehicle model, obtained from the VIN.",
"type": "map",
"values": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string",
{
"type": "array",
"items": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string",
{
"type": "array",
"items": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string"
]
},
{
"type": "map",
"values": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string"
]
}
]
},
{
"type": "map",
"values": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string",
{
"type": "array",
"items": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string"
]
},
{
"type": "map",
"values": [
"null",
"boolean",
"int",
"long",
"float",
"double",
"bytes",
"string"
]
}
]
}
]
}
],
"doc": "Detailed information for the vehicle model, obtained from the VIN."
},
{
"name": "created",
"type": [
"null",
"int"
],
"doc": "Time of the creation of this entity / first activity recorded"
},
{
"name": "time",
"type": "int",
"doc": "Time of the message"
},
{
"name": "vehicle_id",
"type": "string",
"doc": "Unique identifier of the Vehicle"
},
{
"name": "seed_odo_time",
"type": [
"null",
"int"
],
"doc": "Time at which the seed_odo is supplied."
},
{
"name": "consent_status",
"type": [
"null",
{
"type": "enum",
"name": "consent_status",
"namespace": "ieu.vehicle.document_types",
"symbols": [
"approved",
"revoked",
"suspended"
]
}
]
},
{
"name": "data_provider_key",
"type": [
"null",
"string"
],
"doc": "Data provider key"
},
{
"name": "allowed",
"type": [
"null",
"boolean"
],
"doc": "Allowed boolean"
},
{
"name": "tenant_id",
"type": "string",
"doc": "The tenant/club for this message"
},
{
"name": "source_id",
"type": "string",
"doc": "The source unique identifier. Entity id in this case."
},
{
"name": "source_type",
"type": "string",
"default": "IEU",
"doc": "The source type of the message received by the service"
},
{
"name": "message_id",
"type": "string",
"doc": "The message unique identifier"
},
{
"name": "message_type",
"type": "string",
"default": "ieu.vehicle",
"doc": "The message type"
},
{
"name": "source_message_type",
"type": [
"null",
"string"
],
"doc": "The type of message sent by the source"
}
]
}