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" }, "building_type": { "description": "Type of building.", "title": "Building Type", "type": "string" }, "city": { "description": "City the parcel is locatied in.", "title": "City", "type": "string" }, "state": { "description": "State the parcel is locatied in.", "title": "State", "type": "string" }, "postal_address": { "description": "Postal code the parcel is locatied in.", "title": "Postal Address", "type": "string" } }, "$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", "building_type", "city", "state", "postal_address" ] }
- Fields:
building_type (str)
city (str)
geometry (list[shift.data_model.GeoLocation] | shift.data_model.GeoLocation)
name (str)
postal_address (str)
state (str)
- field building_type: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Type of building.')] [Required]#
Type of building.
- field city: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='City the parcel is locatied in.')] [Required]#
City the parcel is locatied in.
- 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.
- field postal_address: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Postal code the parcel is locatied in.')] [Required]#
Postal code the parcel is locatied in.
- field state: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='State the parcel is locatied in.')] [Required]#
State the parcel is locatied in.
- 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.