# 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 .post_dimensions_root_response_ottimate_type import PostDimensionsRootResponseOttimateType


class PostDimensionsRootResponse(UniversalBaseModel):
    version: typing.Optional[str] = None
    id: typing.Optional[str] = None
    name: typing.Optional[str] = None
    erp_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    The dimension category label in client's ERP system
    """

    code: typing.Optional[str] = None
    reference_id: typing.Optional[str] = None
    ottimate_type: typing.Optional[PostDimensionsRootResponseOttimateType] = pydantic.Field(default=None)
    """
    Ottimate's standardized dimension type code
    """

    erp_dimension_id: typing.Optional[str] = None
    ottimate_company_id: typing.Optional[int] = 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
