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

from __future__ import annotations

from typing import List, Optional

from pydantic import Field
from typing_extensions import Literal

from wandb._pydantic import GQLResult, Typename

from .fragments import FileFragment, PageInfoFragment


class GetArtifactMembershipFiles(GQLResult):
    project: Optional[GetArtifactMembershipFilesProject]


class GetArtifactMembershipFilesProject(GQLResult):
    artifact_collection: Optional[
        GetArtifactMembershipFilesProjectArtifactCollection
    ] = Field(alias="artifactCollection")


class GetArtifactMembershipFilesProjectArtifactCollection(GQLResult):
    typename__: Typename[
        Literal["ArtifactCollection", "ArtifactPortfolio", "ArtifactSequence"]
    ]
    artifact_membership: Optional[
        GetArtifactMembershipFilesProjectArtifactCollectionArtifactMembership
    ] = Field(alias="artifactMembership")


class GetArtifactMembershipFilesProjectArtifactCollectionArtifactMembership(GQLResult):
    files: Optional[
        GetArtifactMembershipFilesProjectArtifactCollectionArtifactMembershipFiles
    ]


class GetArtifactMembershipFilesProjectArtifactCollectionArtifactMembershipFiles(
    GQLResult
):
    total_count: Optional[int] = Field(alias="totalCount", default=None)
    page_info: PageInfoFragment = Field(alias="pageInfo")
    edges: List[
        GetArtifactMembershipFilesProjectArtifactCollectionArtifactMembershipFilesEdges
    ]


class GetArtifactMembershipFilesProjectArtifactCollectionArtifactMembershipFilesEdges(
    GQLResult
):
    node: Optional[FileFragment]


GetArtifactMembershipFiles.model_rebuild()
GetArtifactMembershipFilesProject.model_rebuild()
GetArtifactMembershipFilesProjectArtifactCollection.model_rebuild()
GetArtifactMembershipFilesProjectArtifactCollectionArtifactMembership.model_rebuild()
GetArtifactMembershipFilesProjectArtifactCollectionArtifactMembershipFiles.model_rebuild()
GetArtifactMembershipFilesProjectArtifactCollectionArtifactMembershipFilesEdges.model_rebuild()
