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

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

from msgspec import Struct

from .. import definitions


class ModifyAlgoOrderRequestForTwapAlgo(Struct, omit_defaults=True):
    algo_order_id: definitions.OrderId
    params: definitions.TwapParams

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

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

    @staticmethod
    def get_response_type():
        return AlgoOrderForTwapAlgo

    @staticmethod
    def get_unannotated_response_type():
        return AlgoOrderForTwapAlgo

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

    @staticmethod
    def get_rpc_method():
        return "unary"
