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

from typing import Literal, Union

from pydantic import Field

from .base_model import BaseModel
from .fragments import CreditEntitlementFragment, FeatureEntitlementFragment


class GetEntitlementV2(BaseModel):
    entitlement_v_2: Union[
        "GetEntitlementV2EntitlementV2CreditEntitlement",
        "GetEntitlementV2EntitlementV2FeatureEntitlement",
    ] = Field(alias="entitlementV2", discriminator="typename__")


class GetEntitlementV2EntitlementV2CreditEntitlement(CreditEntitlementFragment):
    typename__: Literal["CreditEntitlement"] = Field(alias="__typename")


class GetEntitlementV2EntitlementV2FeatureEntitlement(FeatureEntitlementFragment):
    typename__: Literal["FeatureEntitlement"] = Field(alias="__typename")


GetEntitlementV2.model_rebuild()
