import logging
from typing import Optional, List
from pydantic_xml import BaseXmlModel, attr, element
import py_rejseplan.dataclasses.constants as constants

class Stop(BaseXmlModel, tag='Stop', nsmap=constants.NSMAP, search_mode='unordered'):
    # Elements
    Notes: Optional[str] = element(default=None)
    altId: Optional[List[str]] = element(default=None)
    mainMastAltId: Optional[List[str]] = element(default=None)
    Occupancy: Optional[List[str]] = element(default=None)
    arrPlatform: Optional[str] = element(default=None)
    rtArrPlatform: Optional[str] = element(default=None)
    depPlatform: Optional[str] = element(default=None)
    rtDepPlatform: Optional[str] = element(default=None)
    weatherInformation: Optional[List[str]] = element(default=None)
    mainMast: Optional[str] = element(default=None)

    # Attributes
    name: str = attr()
    description: Optional[str] = attr(default=None)
    id: str = attr()
    extId: str = attr()
    routeIdx: Optional[int] = attr(default=None)
    lon: Optional[float] = attr(default=None)
    lat: Optional[float] = attr(default=None)
    alt: Optional[int] = attr(default=None)
    arrPrognosisType: Optional[str] = attr(default=None)
    depPrognosisType: Optional[str] = attr(default=None)
    depTime: Optional[str] = attr(default=None)
    depDate: Optional[str] = attr(default=None)
    depTz: Optional[int] = attr(default=0)
    scheduledDepTimeChanged: Optional[bool] = attr(default=False)
    arrTime: Optional[str] = attr(default=None)
    arrDate: Optional[str] = attr(default=None)
    arrTz: Optional[int] = attr(default=0)
    scheduledArrTimeChanged: Optional[bool] = attr(default=False)
    passingTime: Optional[str] = attr(default=None)
    passingDate: Optional[str] = attr(default=None)
    passingTz: Optional[int] = attr(default=0)
    arrTrack: Optional[str] = attr(default=None)
    arrTrackHidden: Optional[bool] = attr(default=False)
    depTrack: Optional[str] = attr(default=None)
    depTrackHidden: Optional[bool] = attr(default=False)
    rtDepTime: Optional[str] = attr(default=None)
    rtDepDate: Optional[str] = attr(default=None)
    rtDepTz: Optional[int] = attr(default=0)
    rtArrTime: Optional[str] = attr(default=None)
    rtArrDate: Optional[str] = attr(default=None)
    rtArrTz: Optional[int] = attr(default=0)
    rtArrTrack: Optional[str] = attr(default=None)
    rtArrTrackHidden: Optional[bool] = attr(default=False)
    rtDepTrack: Optional[str] = attr(default=None)
    rtDepTrackHidden: Optional[bool] = attr(default=False)
    rtPassingTime: Optional[str] = attr(default=None)
    rtPassingDate: Optional[str] = attr(default=None)
    rtPassingTz: Optional[int] = attr(default=0)
    cancelled: Optional[bool] = attr(default=False)
    cancelledDeparture: Optional[bool] = attr(default=False)
    cancelledArrival: Optional[bool] = attr(default=False)
    isMainMast: Optional[bool] = attr(default=None)
    hasMainMast: Optional[bool] = attr(default=None)
    mainMastId: Optional[str] = attr(default=None)
    mainMastExtId: Optional[str] = attr(default=None)
    mainMastLon: Optional[float] = attr(default=None)
    mainMastLat: Optional[float] = attr(default=None)
    mainMastAlt: Optional[int] = attr(default=None)
    alighting: Optional[bool] = attr(default=True)
    boarding: Optional[bool] = attr(default=True)
    rtAlighting: Optional[bool] = attr(default=None)
    rtBoarding: Optional[bool] = attr(default=None)
    additional: Optional[bool] = attr(default=False)
    isBorderStop: Optional[bool] = attr(default=False)
    isTurningPoint: Optional[bool] = attr(default=False)
    arrHide: Optional[bool] = attr(default=False)
    depHide: Optional[bool] = attr(default=False)
    depDir: Optional[str] = attr(default=None)
    entry: Optional[bool] = attr(default=None)
    rtCnclDataSourceType: Optional[str] = attr(default=None)
    arrUncertainDelay: Optional[bool] = attr(default=False)
    depUncertainDelay: Optional[bool] = attr(default=False)
    minimumChangeDuration: Optional[str] = attr(default=None)
