# generated by datamodel-codegen:
#   filename:  Symbology/PruneExpiredSymbolsRequest.json

from __future__ import annotations
from architect_py.grpc.models.Symbology.PruneExpiredSymbolsResponse import (
    PruneExpiredSymbolsResponse,
)

from typing import Annotated, Optional

from msgspec import Meta, Struct


class PruneExpiredSymbolsRequest(Struct, omit_defaults=True):
    cutoff: Optional[
        Annotated[
            Optional[int],
            Meta(
                description="If None then it will just use server current time; otherwise, specify a unix timestamp in seconds"
            ),
        ]
    ] = None
    """
    If None then it will just use server current time; otherwise, specify a unix timestamp in seconds
    """

    # Constructor that takes all field titles as arguments for convenience
    @classmethod
    def new(
        cls,
        cutoff: Optional[int] = None,
    ):
        return cls(
            cutoff,
        )

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

    @staticmethod
    def get_response_type():
        return PruneExpiredSymbolsResponse

    @staticmethod
    def get_unannotated_response_type():
        return PruneExpiredSymbolsResponse

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

    @staticmethod
    def get_rpc_method():
        return "unary"
