# Generated by ariadne-codegen
# Source: metasrht/graphql/

from datetime import datetime
from typing import Annotated, Optional

from pydantic import BeforeValidator, Field
from srht.graphql import gql_time

from .base_model import BaseModel
from .enums import PaymentStatus, SubscriptionStatus


class GetCancelParameters(BaseModel):
    me: "GetCancelParametersMe"


class GetCancelParametersMe(BaseModel):
    payment_status: PaymentStatus = Field(alias="paymentStatus")
    payment_due: Optional[Annotated[datetime, BeforeValidator(gql_time)]] = Field(
        alias="paymentDue"
    )
    subscription: Optional["GetCancelParametersMeSubscription"]


class GetCancelParametersMeSubscription(BaseModel):
    status: SubscriptionStatus
    updated: Annotated[datetime, BeforeValidator(gql_time)]
    product: "GetCancelParametersMeSubscriptionProduct"


class GetCancelParametersMeSubscriptionProduct(BaseModel):
    retired: bool


GetCancelParameters.model_rebuild()
GetCancelParametersMe.model_rebuild()
GetCancelParametersMeSubscription.model_rebuild()
