# generated by datamodel-codegen:
#   filename:  Marketdata/TickersRequest.json

from __future__ import annotations
from architect_py.grpc.models.Marketdata.TickersResponse import TickersResponse

from typing import List, Optional

from msgspec import Struct

from .. import definitions


class TickersRequest(Struct, omit_defaults=True):
    i: Optional[int] = None
    k: Optional[definitions.SortTickersBy] = None
    n: Optional[int] = None
    symbols: Optional[List[str]] = None
    venue: Optional[str] = None

    # Constructor that takes all field titles as arguments for convenience
    @classmethod
    def new(
        cls,
        i: Optional[int] = None,
        k: Optional[definitions.SortTickersBy] = None,
        n: Optional[int] = None,
        symbols: Optional[List[str]] = None,
        venue: Optional[str] = None,
    ):
        return cls(
            i,
            k,
            n,
            symbols,
            venue,
        )

    def __str__(self) -> str:
        return f"TickersRequest(i={self.i},k={self.k},n={self.n},symbols={self.symbols},venue={self.venue})"

    @staticmethod
    def get_response_type():
        return TickersResponse

    @staticmethod
    def get_unannotated_response_type():
        return TickersResponse

    @staticmethod
    def get_route() -> str:
        return "/json.architect.Marketdata/Tickers"

    @staticmethod
    def get_rpc_method():
        return "unary"
