# Generated by ariadne-codegen
# Source: tools/graphql_codegen/artifacts/

from __future__ import annotations

from typing import List, Literal, Optional

from pydantic import Field

from wandb._pydantic import GQLBase, Typename


class FetchLinkedArtifacts(GQLBase):
    artifact: Optional[FetchLinkedArtifactsArtifact]


class FetchLinkedArtifactsArtifact(GQLBase):
    artifact_memberships: FetchLinkedArtifactsArtifactArtifactMemberships = Field(
        alias="artifactMemberships"
    )


class FetchLinkedArtifactsArtifactArtifactMemberships(GQLBase):
    edges: List[FetchLinkedArtifactsArtifactArtifactMembershipsEdges]


class FetchLinkedArtifactsArtifactArtifactMembershipsEdges(GQLBase):
    node: Optional[FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNode]


class FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNode(GQLBase):
    aliases: List[FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNodeAliases]
    version_index: Optional[int] = Field(alias="versionIndex")
    artifact_collection: Optional[
        FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNodeArtifactCollection
    ] = Field(alias="artifactCollection")


class FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNodeAliases(GQLBase):
    alias: str


class FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNodeArtifactCollection(
    GQLBase
):
    project: Optional[
        FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNodeArtifactCollectionProject
    ]
    name: str
    typename__: Typename[
        Literal["ArtifactCollection", "ArtifactPortfolio", "ArtifactSequence"]
    ]


class FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNodeArtifactCollectionProject(
    GQLBase
):
    entity_name: str = Field(alias="entityName")
    name: str


FetchLinkedArtifacts.model_rebuild()
FetchLinkedArtifactsArtifact.model_rebuild()
FetchLinkedArtifactsArtifactArtifactMemberships.model_rebuild()
FetchLinkedArtifactsArtifactArtifactMembershipsEdges.model_rebuild()
FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNode.model_rebuild()
FetchLinkedArtifactsArtifactArtifactMembershipsEdgesNodeArtifactCollection.model_rebuild()
