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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class EventStreamCloudEventContextRequestGeo(UniversalBaseModel):
    """
    Geographic information about the request origin.
    """

    continent_code: typing.Optional[str] = pydantic.Field(default=None)
    """
    Continent code.
    """

    country_code: typing.Optional[str] = pydantic.Field(default=None)
    """
    Country code.
    """

    country_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Country name.
    """

    latitude: typing.Optional[float] = pydantic.Field(default=None)
    """
    Latitude coordinate.
    """

    longitude: typing.Optional[float] = pydantic.Field(default=None)
    """
    Longitude coordinate.
    """

    subdivision_code: typing.Optional[str] = pydantic.Field(default=None)
    """
    Subdivision (state/province) code.
    """

    subdivision_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Subdivision (state/province) name.
    """

    city_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    City name.
    """

    time_zone: typing.Optional[str] = pydantic.Field(default=None)
    """
    Time zone.
    """

    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
