# generated by datamodel-codegen:
#   filename:  Algo/StartAlgoRequest.json

from __future__ import annotations
from architect_py.grpc.models.Algo.StartAlgoResponse import StartAlgoResponse

from msgspec import Struct

from .. import definitions


class StartAlgoRequest(Struct, omit_defaults=True):
    algo_order_id: definitions.OrderId

    # Constructor that takes all field titles as arguments for convenience
    @classmethod
    def new(
        cls,
        algo_order_id: definitions.OrderId,
    ):
        return cls(
            algo_order_id,
        )

    def __str__(self) -> str:
        return f"StartAlgoRequest(algo_order_id={self.algo_order_id})"

    @staticmethod
    def get_response_type():
        return StartAlgoResponse

    @staticmethod
    def get_unannotated_response_type():
        return StartAlgoResponse

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

    @staticmethod
    def get_rpc_method():
        return "unary"
