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

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

from typing import Dict, Optional

from msgspec import Struct

from .. import definitions


class UploadSymbologyRequest(Struct, omit_defaults=True):
    execution_info: Optional[Dict[str, Dict[str, definitions.ExecutionInfo]]] = None
    options_series: Optional[Dict[str, definitions.OptionsSeriesInfo]] = None
    product_aliases: Optional[Dict[str, Dict[str, str]]] = None
    products: Optional[Dict[str, definitions.ProductInfo]] = None

    # Constructor that takes all field titles as arguments for convenience
    @classmethod
    def new(
        cls,
        execution_info: Optional[
            Dict[str, Dict[str, definitions.ExecutionInfo]]
        ] = None,
        options_series: Optional[Dict[str, definitions.OptionsSeriesInfo]] = None,
        product_aliases: Optional[Dict[str, Dict[str, str]]] = None,
        products: Optional[Dict[str, definitions.ProductInfo]] = None,
    ):
        return cls(
            execution_info,
            options_series,
            product_aliases,
            products,
        )

    def __str__(self) -> str:
        return f"UploadSymbologyRequest(execution_info={self.execution_info},options_series={self.options_series},product_aliases={self.product_aliases},products={self.products})"

    @staticmethod
    def get_response_type():
        return UploadSymbologyResponse

    @staticmethod
    def get_unannotated_response_type():
        return UploadSymbologyResponse

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

    @staticmethod
    def get_rpc_method():
        return "unary"
