# generated by datamodel-codegen:
#   filename:  OptionsMarketdata/OptionsChainGreeksRequest.json

from __future__ import annotations
from architect_py.grpc.models.OptionsMarketdata.OptionsChainGreeks import (
    OptionsChainGreeks,
)

from datetime import date
from typing import Optional

from msgspec import Struct


class OptionsChainGreeksRequest(Struct, omit_defaults=True):
    expiration: date
    underlying: str
    wrap: Optional[str] = None

    # Constructor that takes all field titles as arguments for convenience
    @classmethod
    def new(
        cls,
        expiration: date,
        underlying: str,
        wrap: Optional[str] = None,
    ):
        return cls(
            expiration,
            underlying,
            wrap,
        )

    def __str__(self) -> str:
        return f"OptionsChainGreeksRequest(expiration={self.expiration},underlying={self.underlying},wrap={self.wrap})"

    @staticmethod
    def get_response_type():
        return OptionsChainGreeks

    @staticmethod
    def get_unannotated_response_type():
        return OptionsChainGreeks

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

    @staticmethod
    def get_rpc_method():
        return "unary"
