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

from typing import Literal, Union

from pydantic import Field

from .base_model import BaseModel
from .fragments import BucketConfigSelection


class BucketUpdate(BaseModel):
    bucket_update: Union[
        "BucketUpdateBucketUpdateBucketUpdateSuccess",
        "BucketUpdateBucketUpdateBucketFileExtensionsToIndexInvalid",
        "BucketUpdateBucketUpdateBucketIndexContentBytesInvalid",
        "BucketUpdateBucketUpdateBucketNotFound",
        "BucketUpdateBucketUpdateInsufficientPermissions",
        "BucketUpdateBucketUpdateNotificationConfigurationError",
        "BucketUpdateBucketUpdateNotificationTopicNotFound",
        "BucketUpdateBucketUpdateSnsInvalid",
    ] = Field(alias="bucketUpdate", discriminator="typename__")


class BucketUpdateBucketUpdateBucketUpdateSuccess(BaseModel):
    typename__: Literal["BucketUpdateSuccess"] = Field(alias="__typename")
    bucket_config: "BucketUpdateBucketUpdateBucketUpdateSuccessBucketConfig" = Field(alias="bucketConfig")


class BucketUpdateBucketUpdateBucketUpdateSuccessBucketConfig(BucketConfigSelection):
    pass


class BucketUpdateBucketUpdateBucketFileExtensionsToIndexInvalid(BaseModel):
    typename__: Literal["BucketFileExtensionsToIndexInvalid"] = Field(alias="__typename")


class BucketUpdateBucketUpdateBucketIndexContentBytesInvalid(BaseModel):
    typename__: Literal["BucketIndexContentBytesInvalid"] = Field(alias="__typename")


class BucketUpdateBucketUpdateBucketNotFound(BaseModel):
    typename__: Literal["BucketNotFound"] = Field(alias="__typename")


class BucketUpdateBucketUpdateInsufficientPermissions(BaseModel):
    typename__: Literal["InsufficientPermissions"] = Field(alias="__typename")
    message: str


class BucketUpdateBucketUpdateNotificationConfigurationError(BaseModel):
    typename__: Literal["NotificationConfigurationError"] = Field(alias="__typename")


class BucketUpdateBucketUpdateNotificationTopicNotFound(BaseModel):
    typename__: Literal["NotificationTopicNotFound"] = Field(alias="__typename")


class BucketUpdateBucketUpdateSnsInvalid(BaseModel):
    typename__: Literal["SnsInvalid"] = Field(alias="__typename")


BucketUpdate.model_rebuild()
BucketUpdateBucketUpdateBucketUpdateSuccess.model_rebuild()
