# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .ticket import Ticket


class ListTicketResponseBody(object):
    _types = {
        "total": int,
        "tickets": List[Ticket],
    }

    def __init__(self, d=None):
        self.total: Optional[int] = None
        self.tickets: Optional[List[Ticket]] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "ListTicketResponseBodyBuilder":
        return ListTicketResponseBodyBuilder()


class ListTicketResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._list_ticket_response_body = ListTicketResponseBody()

    def total(self, total: int) -> "ListTicketResponseBodyBuilder":
        self._list_ticket_response_body.total = total
        return self

    def tickets(self, tickets: List[Ticket]) -> "ListTicketResponseBodyBuilder":
        self._list_ticket_response_body.tickets = tickets
        return self

    def build(self) -> "ListTicketResponseBody":
        return self._list_ticket_response_body
