# Generated by ariadne-codegen
# Source: queries.graphql

from typing import Any, List, Literal, Optional, Union

from pydantic import Field

from .base_model import BaseModel
from .enums import MediaStatus


class EnrichProductData(BaseModel):
    product: Optional["EnrichProductDataProduct"]


class EnrichProductDataProduct(BaseModel):
    collections: "EnrichProductDataProductCollections"
    images: "EnrichProductDataProductImages"
    media: "EnrichProductDataProductMedia"
    variants: "EnrichProductDataProductVariants"


class EnrichProductDataProductCollections(BaseModel):
    edges: List["EnrichProductDataProductCollectionsEdges"]
    pageInfo: "EnrichProductDataProductCollectionsPageInfo"


class EnrichProductDataProductCollectionsEdges(BaseModel):
    node: "EnrichProductDataProductCollectionsEdgesNode"


class EnrichProductDataProductCollectionsEdgesNode(BaseModel):
    id: str
    handle: str


class EnrichProductDataProductCollectionsPageInfo(BaseModel):
    hasNextPage: bool
    endCursor: Optional[str]


class EnrichProductDataProductImages(BaseModel):
    edges: List["EnrichProductDataProductImagesEdges"]


class EnrichProductDataProductImagesEdges(BaseModel):
    node: "EnrichProductDataProductImagesEdgesNode"


class EnrichProductDataProductImagesEdgesNode(BaseModel):
    id: Optional[str]
    url: Any
    altText: Optional[str]
    height: Optional[int]
    width: Optional[int]


class EnrichProductDataProductMedia(BaseModel):
    edges: List["EnrichProductDataProductMediaEdges"]


class EnrichProductDataProductMediaEdges(BaseModel):
    node: Union[
        "EnrichProductDataProductMediaEdgesNodeMedia",
        "EnrichProductDataProductMediaEdgesNodeMediaImage",
    ] = Field(discriminator="typename__")


class EnrichProductDataProductMediaEdgesNodeMedia(BaseModel):
    typename__: Literal["ExternalVideo", "Media", "Model3d", "Video"] = Field(
        alias="__typename"
    )
    id: str


class EnrichProductDataProductMediaEdgesNodeMediaImage(BaseModel):
    typename__: Literal["MediaImage"] = Field(alias="__typename")
    id: str
    alt: Optional[str]
    status: MediaStatus
    image: Optional["EnrichProductDataProductMediaEdgesNodeMediaImageImage"]
    originalSource: Optional[
        "EnrichProductDataProductMediaEdgesNodeMediaImageOriginalSource"
    ]


class EnrichProductDataProductMediaEdgesNodeMediaImageImage(BaseModel):
    url: Any
    width: Optional[int]
    height: Optional[int]


class EnrichProductDataProductMediaEdgesNodeMediaImageOriginalSource(BaseModel):
    url: Optional[Any]


class EnrichProductDataProductVariants(BaseModel):
    edges: List["EnrichProductDataProductVariantsEdges"]


class EnrichProductDataProductVariantsEdges(BaseModel):
    node: "EnrichProductDataProductVariantsEdgesNode"


class EnrichProductDataProductVariantsEdgesNode(BaseModel):
    id: str
    image: Optional["EnrichProductDataProductVariantsEdgesNodeImage"]


class EnrichProductDataProductVariantsEdgesNodeImage(BaseModel):
    id: Optional[str]
    url: Any
    altText: Optional[str]
    height: Optional[int]
    width: Optional[int]


EnrichProductData.model_rebuild()
EnrichProductDataProduct.model_rebuild()
EnrichProductDataProductCollections.model_rebuild()
EnrichProductDataProductCollectionsEdges.model_rebuild()
EnrichProductDataProductImages.model_rebuild()
EnrichProductDataProductImagesEdges.model_rebuild()
EnrichProductDataProductMedia.model_rebuild()
EnrichProductDataProductMediaEdges.model_rebuild()
EnrichProductDataProductMediaEdgesNodeMediaImage.model_rebuild()
EnrichProductDataProductVariants.model_rebuild()
EnrichProductDataProductVariantsEdges.model_rebuild()
EnrichProductDataProductVariantsEdgesNode.model_rebuild()
