"""
Meteostat Parameter Definitions
"""

from meteostat.enumerations import Granularity, Parameter, Unit
from meteostat.typing import ParameterSpec
from meteostat.utils.validators import maximum, minimum


DEFAULT_PARAMETERS = [
    ParameterSpec(
        id=Parameter.TEMP,
        name="Air Temperature",
        granularity=Granularity.HOURLY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TEMP,
        name="Mean Air Temperature",
        granularity=Granularity.DAILY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TEMP,
        name="Mean Air Temperature",
        granularity=Granularity.MONTHLY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TEMP,
        name="Mean Air Temperature",
        granularity=Granularity.NORMALS,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TMIN,
        name="Minimum Air Temperature",
        granularity=Granularity.DAILY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TMIN,
        name="Mean Daily Minimum Air Temperature",
        granularity=Granularity.MONTHLY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TMIN,
        name="Mean Daily Minimum Air Temperature",
        granularity=Granularity.NORMALS,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TMAX,
        name="Maximum Air Temperature",
        granularity=Granularity.DAILY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TMAX,
        name="Mean Daily Maximum Air Temperature",
        granularity=Granularity.MONTHLY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TMAX,
        name="Mean Daily Maximum Air Temperature",
        granularity=Granularity.NORMALS,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TXMN,
        name="Absolute Minimum Air Temperature",
        granularity=Granularity.MONTHLY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TXMN,
        name="Absolute Minimum Air Temperature",
        granularity=Granularity.NORMALS,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TXMX,
        name="Absolute Maximum Air Temperature",
        granularity=Granularity.MONTHLY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.TXMX,
        name="Absolute Maximum Air Temperature",
        granularity=Granularity.NORMALS,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.DWPT,
        name="Dew Point",
        granularity=Granularity.HOURLY,
        unit=Unit.CELSIUS,
        dtype="Float64",
        validators=[minimum(-100), maximum(65)],
    ),
    ParameterSpec(
        id=Parameter.RHUM,
        name="Relative Humidity",
        granularity=Granularity.HOURLY,
        unit=Unit.PERCENTAGE,
        dtype="UInt8",
        validators=[minimum(0), maximum(100)],
    ),
    ParameterSpec(
        id=Parameter.RHUM,
        name="Relative Humidity",
        granularity=Granularity.DAILY,
        unit=Unit.PERCENTAGE,
        dtype="UInt8",
        validators=[minimum(0), maximum(100)],
    ),
    ParameterSpec(
        id=Parameter.RHUM,
        name="Relative Humidity",
        granularity=Granularity.MONTHLY,
        unit=Unit.PERCENTAGE,
        dtype="UInt8",
        validators=[minimum(0), maximum(100)],
    ),
    ParameterSpec(
        id=Parameter.RHUM,
        name="Relative Humidity",
        granularity=Granularity.NORMALS,
        unit=Unit.PERCENTAGE,
        dtype="UInt8",
        validators=[minimum(0), maximum(100)],
    ),
    ParameterSpec(
        id=Parameter.PRCP,
        name="Total Precipitation",
        granularity=Granularity.HOURLY,
        unit=Unit.MILLIMETERS,
        dtype="Float64",
        validators=[minimum(0), maximum(350)],
    ),
    ParameterSpec(
        id=Parameter.PRCP,
        name="Total Precipitation",
        granularity=Granularity.DAILY,
        unit=Unit.MILLIMETERS,
        dtype="Float64",
        validators=[minimum(0), maximum(2000)],
    ),
    ParameterSpec(
        id=Parameter.PRCP,
        name="Total Precipitation",
        granularity=Granularity.MONTHLY,
        unit=Unit.MILLIMETERS,
        dtype="Float64",
        validators=[minimum(0), maximum(10000)],
    ),
    ParameterSpec(
        id=Parameter.PRCP,
        name="Total Precipitation",
        granularity=Granularity.NORMALS,
        unit=Unit.MILLIMETERS,
        dtype="Float64",
        validators=[minimum(0), maximum(10000)],
    ),
    ParameterSpec(
        id=Parameter.SNOW,
        name="Snowfall",
        granularity=Granularity.HOURLY,
        unit=Unit.CENTIMETERS,
        dtype="UInt8",
        validators=[minimum(0), maximum(10000)],
    ),
    ParameterSpec(
        id=Parameter.SNWD,
        name="Snow Depth",
        granularity=Granularity.HOURLY,
        unit=Unit.CENTIMETERS,
        dtype="UInt16",
        validators=[minimum(0), maximum(1200)],
    ),
    ParameterSpec(
        id=Parameter.SNWD,
        name="Snow Depth",
        granularity=Granularity.DAILY,
        unit=Unit.CENTIMETERS,
        dtype="UInt16",
        validators=[minimum(0), maximum(1200)],
    ),
    ParameterSpec(
        id=Parameter.WDIR,
        name="Wind Direction",
        granularity=Granularity.HOURLY,
        unit=Unit.DEGREES,
        dtype="UInt16",
        validators=[minimum(0), maximum(360)],
    ),
    ParameterSpec(
        id=Parameter.WSPD,
        name="Wind Speed",
        granularity=Granularity.HOURLY,
        unit=Unit.KMH,
        dtype="Float64",
        validators=[minimum(0), maximum(250)],
    ),
    ParameterSpec(
        id=Parameter.WSPD,
        name="Average Wind Speed",
        granularity=Granularity.DAILY,
        unit=Unit.KMH,
        dtype="Float64",
        validators=[minimum(0), maximum(150)],
    ),
    ParameterSpec(
        id=Parameter.WPGT,
        name="Peak Wind Gust",
        granularity=Granularity.HOURLY,
        unit=Unit.KMH,
        dtype="Float64",
        validators=[minimum(0), maximum(500)],
    ),
    ParameterSpec(
        id=Parameter.WPGT,
        name="Peak Wind Gust",
        granularity=Granularity.DAILY,
        unit=Unit.KMH,
        dtype="Float64",
        validators=[minimum(0), maximum(500)],
    ),
    ParameterSpec(
        id=Parameter.PRES,
        name="Air Pressure (MSL)",
        granularity=Granularity.HOURLY,
        unit=Unit.HPA,
        dtype="Float64",
        validators=[minimum(850), maximum(1090)],
    ),
    ParameterSpec(
        id=Parameter.PRES,
        name="Average Air Pressure (MSL)",
        granularity=Granularity.DAILY,
        unit=Unit.HPA,
        dtype="Float64",
        validators=[minimum(850), maximum(1090)],
    ),
    ParameterSpec(
        id=Parameter.PRES,
        name="Average Air Pressure (MSL)",
        granularity=Granularity.MONTHLY,
        unit=Unit.HPA,
        dtype="Float64",
        validators=[minimum(850), maximum(1090)],
    ),
    ParameterSpec(
        id=Parameter.PRES,
        name="Average Air Pressure (MSL)",
        granularity=Granularity.NORMALS,
        unit=Unit.HPA,
        dtype="Float64",
        validators=[minimum(850), maximum(1090)],
    ),
    ParameterSpec(
        id=Parameter.TSUN,
        name="Sunshine Duration",
        granularity=Granularity.HOURLY,
        unit=Unit.MINUTES,
        dtype="UInt8",
        validators=[minimum(0), maximum(60)],
    ),
    ParameterSpec(
        id=Parameter.TSUN,
        name="Sunshine Duration",
        granularity=Granularity.DAILY,
        unit=Unit.MINUTES,
        dtype="UInt16",
        validators=[minimum(0), maximum(1440)],
    ),
    ParameterSpec(
        id=Parameter.TSUN,
        name="Sunshine Duration",
        granularity=Granularity.MONTHLY,
        unit=Unit.MINUTES,
        dtype="UInt16",
        validators=[minimum(0), maximum(44640)],
    ),
    ParameterSpec(
        id=Parameter.TSUN,
        name="Sunshine Duration",
        granularity=Granularity.NORMALS,
        unit=Unit.MINUTES,
        dtype="UInt16",
        validators=[minimum(0), maximum(44640)],
    ),
    ParameterSpec(
        id=Parameter.CLDC,
        name="Cloud Cover",
        granularity=Granularity.HOURLY,
        unit=Unit.OKTAS,
        dtype="UInt8",
        validators=[minimum(0), maximum(8)],
    ),
    ParameterSpec(
        id=Parameter.CLDC,
        name="Average Cloud Cover",
        granularity=Granularity.DAILY,
        unit=Unit.OKTAS,
        dtype="UInt8",
        validators=[minimum(0), maximum(8)],
    ),
    ParameterSpec(
        id=Parameter.VSBY,
        name="Visibility",
        granularity=Granularity.HOURLY,
        unit=Unit.METERS,
        dtype="UInt16",
        validators=[minimum(0)],
    ),
    ParameterSpec(
        id=Parameter.COCO,
        name="Weather Condition Code",
        granularity=Granularity.HOURLY,
        dtype="UInt8",
        validators=[minimum(0), maximum(27)],
    ),
]
