← All schemas
ieu.raw.entity
Canonical URL: http://schematalog.com/api/schemas/ieu.raw.entity/versions/1.0
Published: 05 June 2023 21:57
Properties
| Parameter | Description | Type | Required | Nullable | Default | Example |
|---|---|---|---|---|---|---|
lat |
Last known location latitude | Number | Optional | Yes | null |
|
lon |
Last known location longitude | Number | Optional | Yes | null |
|
message_id |
The message unique identifier | UUID | Required | |||
message_type |
The message type | String | Required | "ieu.raw.entity" |
||
source_id |
The source unique identifier. Entity id in this case. | String | 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 | |||
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 |
The vehicle unique identifier | UUID | Required |
JSON
{
"type": "object",
"properties": {
"source_id": {
"type": "string",
"description": "The source unique identifier. Entity id in this case."
},
"source_type": {
"type": "string",
"description": "The source type of the message received by the service"
},
"message_id": {
"type": "string",
"format": "uuid",
"description": "The message unique identifier"
},
"message_type": {
"type": "string",
"default": "ieu.raw.entity",
"description": "The message type"
},
"time": {
"type": "string",
"format": "date-time",
"description": "Time of the message",
"example": "2020-05-22T10:30:55+00:00"
},
"source_message_type": {
"type": "string",
"description": "The type of message sent by the source"
},
"tenant_id": {
"type": "string",
"description": "The tenant/club for this message"
},
"vehicle_id": {
"type": "string",
"format": "uuid",
"description": "The vehicle unique identifier"
},
"lat": {
"type": "number",
"default": null,
"nullable": true,
"description": "Last known location latitude"
},
"lon": {
"type": "number",
"default": null,
"nullable": true,
"description": "Last known location longitude"
}
},
"required": [
"message_id",
"message_type",
"source_id",
"source_type",
"tenant_id",
"time",
"vehicle_id"
],
"$id": "http://schematalog.com/api/schemas/ieu.raw.entity/versions/1.0",
"title": "ieu.raw.entity"
}
YAML
$id: http://schematalog.com/api/schemas/ieu.raw.entity/versions/1.0
properties:
lat:
default: null
description: Last known location latitude
nullable: true
type: number
lon:
default: null
description: Last known location longitude
nullable: true
type: number
message_id:
description: The message unique identifier
format: uuid
type: string
message_type:
default: ieu.raw.entity
description: The message type
type: string
source_id:
description: The source unique identifier. Entity id in this case.
type: string
source_message_type:
description: The type of message sent by the source
type: string
source_type:
description: The source type of the message received by the service
type: string
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: The vehicle unique identifier
format: uuid
type: string
required:
- message_id
- message_type
- source_id
- source_type
- tenant_id
- time
- vehicle_id
title: ieu.raw.entity
type: object
Python Code
from __future__ import annotations
from typing import Optional
from uuid import UUID
from pydantic import AwareDatetime, BaseModel, Field
class IeuRawEntity(BaseModel):
source_id: str = 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'
)
message_id: UUID = Field(..., description='The message unique identifier')
message_type: str = Field(..., description='The message type')
time: AwareDatetime = Field(
..., description='Time of the message', examples=['2020-05-22T10:30:55+00:00']
)
source_message_type: Optional[str] = Field(
None, description='The type of message sent by the source'
)
tenant_id: str = Field(..., description='The tenant/club for this message')
vehicle_id: UUID = Field(..., description='The vehicle unique identifier')
lat: Optional[float] = Field(None, description='Last known location latitude')
lon: Optional[float] = Field(None, description='Last known location longitude')
AVRO Schema
{
"type": "record",
"name": "document",
"namespace": "ieu.raw.entity",
"fields": [
{
"name": "source_id",
"type": "string",
"doc": "The source unique identifier. Entity id in this case."
},
{
"name": "source_type",
"type": "string",
"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.raw.entity",
"doc": "The message type"
},
{
"name": "time",
"type": "int",
"doc": "Time of the message"
},
{
"name": "source_message_type",
"type": [
"null",
"string"
],
"doc": "The type of message sent by the source"
},
{
"name": "tenant_id",
"type": "string",
"doc": "The tenant/club for this message"
},
{
"name": "vehicle_id",
"type": "string",
"doc": "The vehicle unique identifier"
},
{
"name": "lat",
"type": [
"null",
"float"
],
"doc": "Last known location latitude"
},
{
"name": "lon",
"type": [
"null",
"float"
],
"doc": "Last known location longitude"
}
]
}