# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .column_response_body_data_type import ColumnResponseBodyDataType
from .column_response_body_unit import ColumnResponseBodyUnit


class ColumnResponseBody(UniversalBaseModel):
    data_type: typing_extensions.Annotated[
        ColumnResponseBodyDataType,
        FieldMetadata(alias="dataType"),
        pydantic.Field(
            alias="dataType",
            description="Data type of the column.  Valid values: `string`, `integer`, `float`, `timestamp`, `unknown`",
        ),
    ]
    name: str = pydantic.Field()
    """
    Name of the column
    """

    unit: typing.Optional[ColumnResponseBodyUnit] = pydantic.Field(default=None)
    """
    Unit of the field.  Valid values: `amperes`, `bars`, `cad`, `chf`, `days`, `decimalDegrees`, `degreesCelsius`, `degreesFahrenheit`, `eur`, `feet`, `gForces`, `gallons`, `gallonsPerHour`, `gallonsPerKilogram`, `gallonsPerMile`, `gbp`, `gramsPerLiter`, `gramsPerMeter`, `hertz`, `hours`, `imperialGallons`, `imperialGallonsPerHour`, `imperialGallonsPerKilogram`, `imperialGallonsPerMile`, `inches`, `kelvins`, `kilograms`, `kilogramsGaseousFuel`, `kilogramsPer100KilometerGaseousFuel`, `kilogramsPerGallon`, `kilogramsPerKilometer`, `kilogramsPerLiter`, `kilogramsPerMile`, `kilometers`, `kilometersPerHour`, `kilometersPerLiter`, `kilometersPerLiterGaseousFuel`, `kilopascals`, `kilowattHours`, `liters`, `litersGaseousFuel`, `litersPer100Kilometers`, `litersPer100KilometersGaseousFuel`, `litersPerHour`, `litersPerKilogram`, `litersPerKilometer`, `litersPerMeter`, `litersPerTonne`, `meters`, `metersPerSecond`, `miles`, `milesPerGallon`, `milesPerHour`, `milesPerImperialGallon`, `milesPerKilogramGaseousFuel`, `milesPerUSGallonGaseousFuel`, `milliknots`, `milliseconds`, `millivolts`, `minutes`, `months`, `mxn`, `percents`, `pounds`, `poundsPerGallon`, `poundsPerLiter`, `poundsPerMile`, `poundsPerSquareInch`, `revolutionsPerMinute`, `seconds`, `unknown`, `usGallonsGaseousFuel`, `usd`, `voltAmperes`, `voltAmperesReactive`, `volts`, `wattHours`, `watts`, `weeks`
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
