# 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 Literal

from pydantic import BaseModel, Field, RootModel, confloat


class MapState1(BaseModel):
    map_view_mode: Literal["MODE_2D"] = Field(..., alias="mapViewMode")


class MapState2(BaseModel):
    latitude: Latitude
    longitude: Longitude
    zoom: Zoom | None = Field(0, validate_default=True)
    bearing: Bearing | None = None
    pitch: Pitch
    drag_rotate: DragRotate | None = Field(None, alias="dragRotate")
    map_split_mode: Literal["SWIPE_COMPARE"] = Field(..., alias="mapSplitMode")
    is_split: Literal[True] = Field(True, alias="isSplit")


class MapState3(BaseModel):
    pass


class MapState4(MapState1, MapState3):
    pass


class MapState5(MapState2, MapState3):
    pass


class MapState6(MapState4):
    pass


class MapState7(MapState5):
    pass


class MapState(RootModel[MapState4 | MapState5 | MapState6 | MapState7]):
    root: MapState4 | MapState5 | MapState6 | MapState7 = Field(..., title="MapState")


class Bearing(RootModel[float]):
    root: float


class DragRotate(RootModel[bool]):
    root: bool


class Latitude(RootModel[confloat(ge=-90.0, le=90.0)]):
    root: confloat(ge=-90.0, le=90.0)


class Longitude(RootModel[confloat(ge=-180.0, le=180.0)]):
    root: confloat(ge=-180.0, le=180.0)


class Pitch(RootModel[confloat(ge=0.0, lt=90.0)]):
    root: confloat(ge=0.0, lt=90.0)


class Zoom(RootModel[confloat(ge=0.0, le=25.0)]):
    root: confloat(ge=0.0, le=25.0) = 0
