<gh_stars>0
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: green.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import Dict, List

import betterproto
from betterproto.grpc.grpclib_server import ServiceBase
import grpclib


class GreenColors(betterproto.Enum):
    MOLDY = 0
    MODERN = 1
    PASTEL = 2


@dataclass(eq=False, repr=False)
class GreenHexadecimal(betterproto.Message):
    hexdict: Dict[int, str] = betterproto.map_field(
        1, betterproto.TYPE_INT32, betterproto.TYPE_STRING
    )

    def __post_init__(self) -> None:
        super().__post_init__()


@dataclass(eq=False, repr=False)
class GreenRequest(betterproto.Message):
    """Green request"""

    pass

    def __post_init__(self) -> None:
        super().__post_init__()


@dataclass(eq=False, repr=False)
class GreenResponse(betterproto.Message):
    """Green response"""

    hexadecimal: List["GreenHexadecimal"] = betterproto.message_field(1)

    def __post_init__(self) -> None:
        super().__post_init__()


class GreenStub(betterproto.ServiceStub):
    """Book recommendation call"""

    async def green(self) -> "GreenResponse":

        request = GreenRequest()

        return await self._unary_unary("/green.Green/Green", request, GreenResponse)


class GreenBase(ServiceBase):
    """Book recommendation call"""

    async def green(self) -> "GreenResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def __rpc_green(self, stream: grpclib.server.Stream) -> None:
        request = await stream.recv_message()

        request_kwargs = {}

        response = await self.green(**request_kwargs)
        await stream.send_message(response)

    def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
        return {
            "/green.Green/Green": grpclib.const.Handler(
                self.__rpc_green,
                grpclib.const.Cardinality.UNARY_UNARY,
                GreenRequest,
                GreenResponse,
            ),
        }

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: green.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import Dict, List

import betterproto
from betterproto.grpc.grpclib_server import ServiceBase
import grpclib


class GreenColors(betterproto.Enum):
    MOLDY = 0
    MODERN = 1
    PASTEL = 2


@dataclass(eq=False, repr=False)
class GreenHexadecimal(betterproto.Message):
    hexdict: Dict[int, str] = betterproto.map_field(
        1, betterproto.TYPE_INT32, betterproto.TYPE_STRING
    )

    def __post_init__(self) -> None:
        super().__post_init__()


@dataclass(eq=False, repr=False)
class GreenRequest(betterproto.Message):
    """Green request"""

    pass

    def __post_init__(self) -> None:
        super().__post_init__()


@dataclass(eq=False, repr=False)
class GreenResponse(betterproto.Message):
    """Green response"""

    hexadecimal: List["GreenHexadecimal"] = betterproto.message_field(1)

    def __post_init__(self) -> None:
        super().__post_init__()


class GreenStub(betterproto.ServiceStub):
    """Book recommendation call"""

    async def green(self) -> "GreenResponse":

        request = GreenRequest()

        return await self._unary_unary("/green.Green/Green", request, GreenResponse)


class GreenBase(ServiceBase):
    """Book recommendation call"""

    async def green(self) -> "GreenResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def __rpc_green(self, stream: grpclib.server.Stream) -> None:
        request = await stream.recv_message()

        request_kwargs = {}

        response = await self.green(**request_kwargs)
        await stream.send_message(response)

    def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
        return {
            "/green.Green/Green": grpclib.const.Handler(
                self.__rpc_green,
                grpclib.const.Cardinality.UNARY_UNARY,
                GreenRequest,
                GreenResponse,
            ),
        }
# Generated by the protocol buffer compiler.  DO NOT EDIT! # sources: green.proto # plugin: python-betterproto Green request Green response Book recommendation call Book recommendation call