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

from ..core.unchecked_base_model import UncheckedBaseModel
from .catalog_category import CatalogCategory
from .catalog_item import CatalogItem
from .catalog_item_option import CatalogItemOption
from .catalog_modifier_list import CatalogModifierList
from .catalog_object_category import CatalogObjectCategory
from .catalog_object_item import CatalogObjectItem
from .catalog_object_item_option import CatalogObjectItemOption
from .catalog_object_modifier_list import CatalogObjectModifierList
from .catalog_object_subscription_plan import CatalogObjectSubscriptionPlan
from .catalog_subscription_plan import CatalogSubscriptionPlan
import typing
from .error import Error
import pydantic
from .catalog_object import CatalogObject
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ListCatalogResponse(UncheckedBaseModel):
    errors: typing.Optional[typing.List[Error]] = pydantic.Field(default=None)
    """
    Any errors that occurred during the request.
    """

    cursor: typing.Optional[str] = pydantic.Field(default=None)
    """
    The pagination cursor to be used in a subsequent request. If unset, this is the final response.
    See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
    """

    objects: typing.Optional[typing.List[CatalogObject]] = pydantic.Field(default=None)
    """
    The CatalogObjects returned.
    """

    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
