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

from ...core.pydantic_utilities import UniversalBaseModel
from .ontology_hs_codes_filters import OntologyHsCodesFilters
import typing
from .ontology_hs_code import OntologyHsCode
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class GetOntologyHsCodesResponse(UniversalBaseModel):
    """
    Examples
    --------
    from sayari.ontology import (
        GetOntologyHsCodesResponse,
        OntologyHsCode,
        OntologyHsCodesFilters,
    )

    GetOntologyHsCodesResponse(
        filters=OntologyHsCodesFilters(
            code=["1503"],
        ),
        data=[
            OntologyHsCode(
                code="1503",
                short_description="Lard & tallow products",
                long_description="Lard stearin, lard oil, oleostearin, oleo-oil and tallow oil; not emulsified or mixed or otherwise prepared",
            )
        ],
        total_count=1234,
    )
    """

    filters: OntologyHsCodesFilters
    data: typing.List[OntologyHsCode]
    total_count: int

    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
