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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .form_component_category_widget_const import FormComponentCategoryWidgetConst
from .form_widget_g_maps_address_config import FormWidgetGMapsAddressConfig
from .form_widget_type_g_maps_address_const import FormWidgetTypeGMapsAddressConst


class FormWidgetGMapsAddress(UniversalBaseModel):
    id: str
    category: FormComponentCategoryWidgetConst
    type: FormWidgetTypeGMapsAddressConst
    config: FormWidgetGMapsAddressConfig
    label: typing.Optional[str] = None
    hint: typing.Optional[str] = None
    required: typing.Optional[bool] = None
    sensitive: typing.Optional[bool] = None

    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
