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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .business_purpose_standard import BusinessPurposeStandard
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class BusinessPurposeProperties(UniversalBaseModel):
    code: typing.Optional[str] = pydantic.Field(default=None)
    """
    A code
    """

    date: typing.Optional[str] = pydantic.Field(default=None)
    """
    as-of date
    """

    from_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    start date
    """

    standard: typing.Optional[BusinessPurposeStandard] = pydantic.Field(default=None)
    """
    The type of code (e.g., "ISIC4", "NACE1")
    """

    to_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    end date
    """

    value: typing.Optional[str] = pydantic.Field(default=None)
    """
    A text description
    """

    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
