# generated by datamodel-codegen:
#   filename:  all_of_any_of_base_class_ref.json
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from typing import Optional, Union

from pydantic import BaseModel, Field, confloat


class MapState1(BaseModel):
    map_view_mode: str = Field("MODE_2D", alias="mapViewMode", const=True)


class MapState2(BaseModel):
    latitude: Latitude
    longitude: Longitude
    zoom: Optional[Zoom] = Field(default_factory=lambda: Zoom.parse_obj(0))
    bearing: Optional[Bearing] = None
    pitch: Pitch
    drag_rotate: Optional[DragRotate] = Field(None, alias="dragRotate")
    map_split_mode: str = Field("SWIPE_COMPARE", alias="mapSplitMode", const=True)
    is_split: bool = Field(True, alias="isSplit", const=True)


class MapState3(BaseModel):
    pass


class MapState4(MapState1, MapState3):
    pass


class MapState5(MapState2, MapState3):
    pass


class MapState6(MapState4):
    pass


class MapState7(MapState5):
    pass


class MapState(BaseModel):
    __root__: Union[MapState4, MapState5, MapState6, MapState7] = Field(
        ..., title="MapState"
    )


class Bearing(BaseModel):
    __root__: float


class DragRotate(BaseModel):
    __root__: bool


class Latitude(BaseModel):
    __root__: confloat(ge=-90.0, le=90.0)


class Longitude(BaseModel):
    __root__: confloat(ge=-180.0, le=180.0)


class Pitch(BaseModel):
    __root__: confloat(ge=0.0, lt=90.0)


class Zoom(BaseModel):
    __root__: confloat(ge=0.0, le=25.0)
