from __future__ import annotations
import json
from datetime import datetime
from dataclasses import dataclass, field
from tubeulator.utils.string_conv import to_camel_case
from pydantic import AliasGenerator, BaseModel, ConfigDict, PrivateAttr
from ..utils.paths import DtoEnum

class RoadCorridor(BaseModel):
    """
    Autogenerated from Road::Tfl.Api.Presentation.Entities.RoadCorridor
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Id: str = None
    DisplayName: str = None
    Group: str = None
    StatusSeverity: str = None
    StatusSeverityDescription: str = None
    Bounds: str = None
    Envelope: str = None
    StatusAggregationStartDate: datetime = None
    StatusAggregationEndDate: datetime = None
    Url: str = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Tfl')


RoadCorridorModel = RoadCorridor


class DbGeographyWellKnownValue(BaseModel):
    """
    Autogenerated from Road::System.Data.Spatial.DbGeographyWellKnownValue
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    CoordinateSystemId: int = None
    WellKnownText: str = None
    WellKnownBinary: str = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='System')


DbGeographyWellKnownValueModel = DbGeographyWellKnownValue


class DbGeography(BaseModel):
    """
    Autogenerated from Road::System.Data.Spatial.DbGeography
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Geography: DbGeographyWellKnownValueModel = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='System-2')


DbGeographyModel = DbGeography


class StreetSegment(BaseModel):
    """
    Autogenerated from Road::Tfl.Api.Presentation.Entities.StreetSegment
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Toid: str = None
    LineString: str = None
    SourceSystemId: int = None
    SourceSystemKey: str = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Tfl-2')


StreetSegmentModel = StreetSegment


class Street(BaseModel):
    """
    Autogenerated from Road::Tfl.Api.Presentation.Entities.Street
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Name: str = None
    Closure: str = None
    Directions: str = None
    Segments: list["StreetSegmentModel"]
    SourceSystemId: int = None
    SourceSystemKey: str = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Tfl-3')


StreetModel = Street


class RoadProject(BaseModel):
    """
    Autogenerated from Road::Tfl.Api.Presentation.Entities.RoadProject
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    ProjectId: str = None
    SchemeName: str = None
    ProjectName: str = None
    ProjectDescription: str = None
    ProjectPageUrl: str = None
    ConsultationPageUrl: str = None
    ConsultationStartDate: datetime = None
    ConsultationEndDate: datetime = None
    ConstructionStartDate: datetime = None
    ConstructionEndDate: datetime = None
    BoroughsBenefited: list[str]
    CycleSuperhighwayId: str = None
    Phase: str = None
    ContactName: str = None
    ContactEmail: str = None
    ExternalPageUrl: str = None
    ProjectSummaryPageUrl: str = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Tfl-4')


RoadProjectModel = RoadProject


class RoadDisruptionLine(BaseModel):
    """
    Autogenerated from Road::Tfl.Api.Presentation.Entities.RoadDisruptionLine
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Id: int = None
    RoadDisruptionId: str = None
    IsDiversion: bool = None
    MultiLineString: DbGeographyModel = None
    StartDate: datetime = None
    EndDate: datetime = None
    StartTime: str = None
    EndTime: str = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Tfl-5')


RoadDisruptionLineModel = RoadDisruptionLine


class RoadDisruptionImpactArea(BaseModel):
    """
    Autogenerated from Road::Tfl.Api.Presentation.Entities.RoadDisruptionImpactArea
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Id: int = None
    RoadDisruptionId: str = None
    Polygon: DbGeographyModel = None
    StartDate: datetime = None
    EndDate: datetime = None
    StartTime: str = None
    EndTime: str = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Tfl-6')


RoadDisruptionImpactAreaModel = RoadDisruptionImpactArea


class RoadDisruptionSchedule(BaseModel):
    """
    Autogenerated from Road::Tfl.Api.Presentation.Entities.RoadDisruptionSchedule
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    StartTime: datetime = None
    EndTime: datetime = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Tfl-7')


RoadDisruptionScheduleModel = RoadDisruptionSchedule


class RoadDisruption(BaseModel):
    """
    Autogenerated from Road::Tfl.Api.Presentation.Entities.RoadDisruption
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    Id: str = None
    Url: str = None
    Point: str = None
    Severity: str = None
    Ordinal: int = None
    Category: str = None
    SubCategory: str = None
    Comments: str = None
    CurrentUpdate: str = None
    CurrentUpdateDateTime: datetime = None
    CorridorIds: list[str]
    StartDateTime: datetime = None
    EndDateTime: datetime = None
    LastModifiedTime: datetime = None
    LevelOfInterest: str = None
    Location: str = None
    Status: str = None
    Geography: DbGeographyModel = None
    Geometry: DbGeographyModel = None
    Streets: list["StreetModel"]
    IsProvisional: bool = None
    HasClosures: bool = None
    LinkText: str = None
    LinkUrl: str = None
    RoadProject: RoadProjectModel = None
    PublishStartDate: datetime = None
    PublishEndDate: datetime = None
    TimeFrame: str = None
    RoadDisruptionLines: list["RoadDisruptionLineModel"]
    RoadDisruptionImpactAreas: list["RoadDisruptionImpactAreaModel"]
    RecurringSchedules: list["RoadDisruptionScheduleModel"]
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Tfl-8')


RoadDisruptionModel = RoadDisruption


class Object(BaseModel):
    """
    Autogenerated from Road::System.Object
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='System-3')


ObjectModel = Object


class StatusSeverity(BaseModel):
    """
    Autogenerated from Road::Tfl.Api.Presentation.Entities.StatusSeverity
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    ModeName: str = None
    SeverityLevel: int = None
    Description: str = None
    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Tfl-9')


StatusSeverityModel = StatusSeverity


class Get200ApplicationJsonResponse(BaseModel):
    """
    Autogenerated from Road::Get200ApplicationJsonResponse
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='Get200ApplicationJsonResponse')


Get200ApplicationJsonResponseModel = Get200ApplicationJsonResponse


class idsGet200ApplicationJsonResponse(BaseModel):
    """
    Autogenerated from Road::ids-Get200ApplicationJsonResponse
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='ids-Get200ApplicationJsonResponse')


idsGet200ApplicationJsonResponseModel = idsGet200ApplicationJsonResponse


class idsStatusGet200ApplicationJsonResponse(BaseModel):
    """
    Autogenerated from Road::ids-StatusGet200ApplicationJsonResponse
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='ids-StatusGet200ApplicationJsonResponse')


idsStatusGet200ApplicationJsonResponseModel = idsStatusGet200ApplicationJsonResponse


class idsDisruptionGet200ApplicationJsonResponse(BaseModel):
    """
    Autogenerated from Road::ids-DisruptionGet200ApplicationJsonResponse
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='ids-DisruptionGet200ApplicationJsonResponse')


idsDisruptionGet200ApplicationJsonResponseModel = idsDisruptionGet200ApplicationJsonResponse


class MetaCategories(BaseModel):
    """
    Autogenerated from Road::MetaCategoriesGet200ApplicationJsonResponse
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='MetaCategoriesGet200ApplicationJsonResponse')


MetaCategoriesModel = MetaCategories


class MetaSeveritiesGet200ApplicationJsonResponse(BaseModel):
    """
    Autogenerated from Road::MetaSeveritiesGet200ApplicationJsonResponse
    """

    model_config = ConfigDict(
        alias_generator=AliasGenerator(validation_alias=to_camel_case),
    )

    _source_schema_name: str = PrivateAttr(default='Road')
    _component_schema_name: str = PrivateAttr(default='MetaSeveritiesGet200ApplicationJsonResponse')


MetaSeveritiesGet200ApplicationJsonResponseModel = MetaSeveritiesGet200ApplicationJsonResponse


class Deserialisers(DtoEnum):
    Tfl = RoadCorridor
    System = DbGeographyWellKnownValue
    System_2 = DbGeography
    Tfl_2 = StreetSegment
    Tfl_3 = Street
    Tfl_4 = RoadProject
    Tfl_5 = RoadDisruptionLine
    Tfl_6 = RoadDisruptionImpactArea
    Tfl_7 = RoadDisruptionSchedule
    Tfl_8 = RoadDisruption
    System_3 = Object
    Tfl_9 = StatusSeverity
    Get200ApplicationJsonResponse = Get200ApplicationJsonResponse
    ids_Get200ApplicationJsonResponse = idsGet200ApplicationJsonResponse
    ids_StatusGet200ApplicationJsonResponse = idsStatusGet200ApplicationJsonResponse
    ids_DisruptionGet200ApplicationJsonResponse = idsDisruptionGet200ApplicationJsonResponse
    MetaCategoriesGet200ApplicationJsonResponse = MetaCategories
    MetaSeveritiesGet200ApplicationJsonResponse = MetaSeveritiesGet200ApplicationJsonResponse