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

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

from typing import List

from msgspec import Struct

from .. import definitions


class UploadProductCatalogRequest(Struct, omit_defaults=True):
    exchange: str
    product_catalog: List[definitions.ProductCatalogInfo]

    # Constructor that takes all field titles as arguments for convenience
    @classmethod
    def new(
        cls,
        exchange: str,
        product_catalog: List[definitions.ProductCatalogInfo],
    ):
        return cls(
            exchange,
            product_catalog,
        )

    def __str__(self) -> str:
        return f"UploadProductCatalogRequest(exchange={self.exchange},product_catalog={self.product_catalog})"

    @staticmethod
    def get_response_type():
        return UploadProductCatalogResponse

    @staticmethod
    def get_unannotated_response_type():
        return UploadProductCatalogResponse

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

    @staticmethod
    def get_rpc_method():
        return "unary"
