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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from ..core.unchecked_base_model import UncheckedBaseModel
from .error import Error


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

    image: typing.Optional["CatalogObject"] = pydantic.Field(default=None)
    """
    The newly created `CatalogImage` including a Square-generated
    URL for the encapsulated image file.
    """

    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


from .catalog_category import CatalogCategory  # noqa: E402, F401, I001
from .catalog_item import CatalogItem  # noqa: E402, F401, I001
from .catalog_item_option import CatalogItemOption  # noqa: E402, F401, I001
from .catalog_modifier_list import CatalogModifierList  # noqa: E402, F401, I001
from .catalog_object_category import CatalogObjectCategory  # noqa: E402, F401, I001
from .catalog_object_item import CatalogObjectItem  # noqa: E402, F401, I001
from .catalog_object_item_option import CatalogObjectItemOption  # noqa: E402, F401, I001
from .catalog_object_modifier_list import CatalogObjectModifierList  # noqa: E402, F401, I001
from .catalog_object_subscription_plan import CatalogObjectSubscriptionPlan  # noqa: E402, F401, I001
from .catalog_subscription_plan import CatalogSubscriptionPlan  # noqa: E402, F401, I001
from .catalog_object import CatalogObject  # noqa: E402, F401, I001

update_forward_refs(CreateCatalogImageResponse)
