Model#
- class shift.GeoLocation(longitude: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Longitude coordinate of the parcel.', metadata=[Ge(ge=-180), Le(le=180)])], latitude: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Latitude coordinate of the parcel.', metadata=[Ge(ge=-90), Le(le=90)])])#
Interface for geo location.
Create new instance of GeoLocation(longitude, latitude)
- longitude: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Longitude coordinate of the parcel.', metadata=[Ge(ge=-180), Le(le=180)])]#
Alias for field number 0
- latitude: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Latitude coordinate of the parcel.', metadata=[Ge(ge=-90), Le(le=90)])]#
Alias for field number 1
- pydantic model shift.ParcelModel#
Interface for parcel model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "ParcelModel", "description": "Interface for parcel model.", "type": "object", "properties": { "name": { "description": "Name of the parcel.", "title": "Name", "type": "string" }, "geometry": { "anyOf": [ { "items": { "$ref": "#/$defs/GeoLocation" }, "type": "array" }, { "$ref": "#/$defs/GeoLocation" } ], "description": "Geo location for the parcel.", "title": "Geometry" } }, "$defs": { "GeoLocation": { "maxItems": 2, "minItems": 2, "prefixItems": [ { "description": "Longitude coordinate of the parcel.", "maximum": 180.0, "minimum": -180.0, "title": "Longitude", "type": "number" }, { "description": "Latitude coordinate of the parcel.", "maximum": 90.0, "minimum": -90.0, "title": "Latitude", "type": "number" } ], "type": "array" } }, "required": [ "name", "geometry" ] }
- Fields:
geometry (list[shift.data_model.GeoLocation] | shift.data_model.GeoLocation)
name (str)
- field geometry: Annotated[list[GeoLocation] | GeoLocation, FieldInfo(annotation=NoneType, required=True, description='Geo location for the parcel.')] [Required]#
Geo location for the parcel.
- field name: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Name of the parcel.')] [Required]#
Name of the parcel.
- pydantic model shift.GroupModel#
Interface for group model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "GroupModel", "description": "Interface for group model.", "type": "object", "properties": { "center": { "$ref": "#/$defs/GeoLocation", "description": "Centre of the cluster." }, "points": { "description": "List of points that belong to this cluster.", "items": { "$ref": "#/$defs/GeoLocation" }, "title": "Points", "type": "array" } }, "$defs": { "GeoLocation": { "maxItems": 2, "minItems": 2, "prefixItems": [ { "description": "Longitude coordinate of the parcel.", "maximum": 180.0, "minimum": -180.0, "title": "Longitude", "type": "number" }, { "description": "Latitude coordinate of the parcel.", "maximum": 90.0, "minimum": -90.0, "title": "Latitude", "type": "number" } ], "type": "array" } }, "required": [ "center", "points" ] }
- Fields:
center (shift.data_model.GeoLocation)
points (list[shift.data_model.GeoLocation])
- field center: Annotated[GeoLocation, FieldInfo(annotation=NoneType, required=True, description='Centre of the cluster.')] [Required]#
Centre of the cluster.
- field points: Annotated[list[GeoLocation], FieldInfo(annotation=NoneType, required=True, description='List of points that belong to this cluster.')] [Required]#
List of points that belong to this cluster.