# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: aioshadowsocks.proto
# plugin: grpclib.plugin.main
import abc
import typing

import grpclib.client
import grpclib.const

if typing.TYPE_CHECKING:
    import grpclib.server

from . import aioshadowsocks_pb2


class ssBase(abc.ABC):
    @abc.abstractmethod
    async def CreateUser(
        self,
        stream: "grpclib.server.Stream[aioshadowsocks_pb2.UserReq, aioshadowsocks_pb2.User]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def UpdateUser(
        self,
        stream: "grpclib.server.Stream[aioshadowsocks_pb2.UserReq, aioshadowsocks_pb2.User]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def GetUser(
        self,
        stream: "grpclib.server.Stream[aioshadowsocks_pb2.UserIdReq, aioshadowsocks_pb2.User]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def DeleteUser(
        self,
        stream: "grpclib.server.Stream[aioshadowsocks_pb2.UserIdReq, aioshadowsocks_pb2.Empty]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def ListUser(
        self,
        stream: "grpclib.server.Stream[aioshadowsocks_pb2.UserReq, aioshadowsocks_pb2.UserList]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def HealthCheck(
        self,
        stream: "grpclib.server.Stream[aioshadowsocks_pb2.HealthCheckReq, aioshadowsocks_pb2.HealthCheckRes]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def FindAccessUser(
        self,
        stream: "grpclib.server.Stream[aioshadowsocks_pb2.FindAccessUserReq, aioshadowsocks_pb2.User]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def DecryptData(
        self,
        stream: "grpclib.server.Stream[aioshadowsocks_pb2.DecryptDataReq, aioshadowsocks_pb2.DecryptDataRes]",
    ) -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            "/aioshadowsocks.ss/CreateUser": grpclib.const.Handler(
                self.CreateUser,
                grpclib.const.Cardinality.UNARY_UNARY,
                aioshadowsocks_pb2.UserReq,
                aioshadowsocks_pb2.User,
            ),
            "/aioshadowsocks.ss/UpdateUser": grpclib.const.Handler(
                self.UpdateUser,
                grpclib.const.Cardinality.UNARY_UNARY,
                aioshadowsocks_pb2.UserReq,
                aioshadowsocks_pb2.User,
            ),
            "/aioshadowsocks.ss/GetUser": grpclib.const.Handler(
                self.GetUser,
                grpclib.const.Cardinality.UNARY_UNARY,
                aioshadowsocks_pb2.UserIdReq,
                aioshadowsocks_pb2.User,
            ),
            "/aioshadowsocks.ss/DeleteUser": grpclib.const.Handler(
                self.DeleteUser,
                grpclib.const.Cardinality.UNARY_UNARY,
                aioshadowsocks_pb2.UserIdReq,
                aioshadowsocks_pb2.Empty,
            ),
            "/aioshadowsocks.ss/ListUser": grpclib.const.Handler(
                self.ListUser,
                grpclib.const.Cardinality.UNARY_UNARY,
                aioshadowsocks_pb2.UserReq,
                aioshadowsocks_pb2.UserList,
            ),
            "/aioshadowsocks.ss/HealthCheck": grpclib.const.Handler(
                self.HealthCheck,
                grpclib.const.Cardinality.UNARY_STREAM,
                aioshadowsocks_pb2.HealthCheckReq,
                aioshadowsocks_pb2.HealthCheckRes,
            ),
            "/aioshadowsocks.ss/FindAccessUser": grpclib.const.Handler(
                self.FindAccessUser,
                grpclib.const.Cardinality.UNARY_UNARY,
                aioshadowsocks_pb2.FindAccessUserReq,
                aioshadowsocks_pb2.User,
            ),
            "/aioshadowsocks.ss/DecryptData": grpclib.const.Handler(
                self.DecryptData,
                grpclib.const.Cardinality.UNARY_UNARY,
                aioshadowsocks_pb2.DecryptDataReq,
                aioshadowsocks_pb2.DecryptDataRes,
            ),
        }


class ssStub:
    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.CreateUser = grpclib.client.UnaryUnaryMethod(
            channel,
            "/aioshadowsocks.ss/CreateUser",
            aioshadowsocks_pb2.UserReq,
            aioshadowsocks_pb2.User,
        )
        self.UpdateUser = grpclib.client.UnaryUnaryMethod(
            channel,
            "/aioshadowsocks.ss/UpdateUser",
            aioshadowsocks_pb2.UserReq,
            aioshadowsocks_pb2.User,
        )
        self.GetUser = grpclib.client.UnaryUnaryMethod(
            channel,
            "/aioshadowsocks.ss/GetUser",
            aioshadowsocks_pb2.UserIdReq,
            aioshadowsocks_pb2.User,
        )
        self.DeleteUser = grpclib.client.UnaryUnaryMethod(
            channel,
            "/aioshadowsocks.ss/DeleteUser",
            aioshadowsocks_pb2.UserIdReq,
            aioshadowsocks_pb2.Empty,
        )
        self.ListUser = grpclib.client.UnaryUnaryMethod(
            channel,
            "/aioshadowsocks.ss/ListUser",
            aioshadowsocks_pb2.UserReq,
            aioshadowsocks_pb2.UserList,
        )
        self.HealthCheck = grpclib.client.UnaryStreamMethod(
            channel,
            "/aioshadowsocks.ss/HealthCheck",
            aioshadowsocks_pb2.HealthCheckReq,
            aioshadowsocks_pb2.HealthCheckRes,
        )
        self.FindAccessUser = grpclib.client.UnaryUnaryMethod(
            channel,
            "/aioshadowsocks.ss/FindAccessUser",
            aioshadowsocks_pb2.FindAccessUserReq,
            aioshadowsocks_pb2.User,
        )
        self.DecryptData = grpclib.client.UnaryUnaryMethod(
            channel,
            "/aioshadowsocks.ss/DecryptData",
            aioshadowsocks_pb2.DecryptDataReq,
            aioshadowsocks_pb2.DecryptDataRes,
        )
