# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from datetime import datetime
from typing_extensions import Literal

from pydantic import Field as FieldInfo

from ....._models import BaseModel
from ..carts.currency_object import CurrencyObject

__all__ = ["TicketInfo"]


class TicketInfo(BaseModel):
    api_type: Literal["RegularTicketsInfo", "RushTicketsInfo", "LotteryTicketsInfo"] = FieldInfo(alias="_type")

    available_until: Optional[datetime] = FieldInfo(alias="availableUntil", default=None)
    """
    Datetime when tickets are no longer available. Lottery -> the lottery stops
    accepting entry. Rush -> the rush stops allowing to hold/buy Regular -> sales
    are closed for this showtime
    """

    available_until_epoch: Optional[int] = FieldInfo(alias="availableUntilEpoch", default=None)
    """The epoch time representation of a date-time."""

    low_price: Optional[CurrencyObject] = FieldInfo(alias="lowPrice", default=None)

    max_tickets: Optional[int] = FieldInfo(alias="maxTickets", default=None)
    """Maximum number of tickets user could buy (enter lottery) for this showtime."""

    min_tickets: Optional[int] = FieldInfo(alias="minTickets", default=None)
    """Minimum number of tickets user could buy (enter lottery) for this showtime."""
