# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2

from paperpilot_common.protobuf.project import (
    project_pb2 as paperpilot__common_dot_protobuf_dot_project_dot_project__pb2,
)


class ProjectServiceStub(object):
    """项目接口"""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.CheckUserJoinedProject = channel.unary_unary(
            "/project.ProjectService/CheckUserJoinedProject",
            request_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.CheckUserJoinedProjectRequest.SerializeToString,
            response_deserializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
        )


class ProjectServiceServicer(object):
    """项目接口"""

    def CheckUserJoinedProject(self, request, context):
        """检查用户是否加入项目"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_ProjectServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CheckUserJoinedProject": grpc.unary_unary_rpc_method_handler(
            servicer.CheckUserJoinedProject,
            request_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.CheckUserJoinedProjectRequest.FromString,
            response_serializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("project.ProjectService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class ProjectService(object):
    """项目接口"""

    @staticmethod
    def CheckUserJoinedProject(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/project.ProjectService/CheckUserJoinedProject",
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.CheckUserJoinedProjectRequest.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )


class ProjectPublicServiceStub(object):
    """项目公开接口"""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.ListUserJoinedProjects = channel.unary_unary(
            "/project.ProjectPublicService/ListUserJoinedProjects",
            request_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ListProjectRequest.SerializeToString,
            response_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ListProjectResponse.FromString,
        )
        self.GetProjectInfo = channel.unary_unary(
            "/project.ProjectPublicService/GetProjectInfo",
            request_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectId.SerializeToString,
            response_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.FromString,
        )
        self.CreateProject = channel.unary_unary(
            "/project.ProjectPublicService/CreateProject",
            request_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.CreateProjectRequest.SerializeToString,
            response_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.FromString,
        )
        self.UpdateProjectInfo = channel.unary_unary(
            "/project.ProjectPublicService/UpdateProjectInfo",
            request_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.UpdateProjectRequest.SerializeToString,
            response_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.FromString,
        )
        self.DeleteProject = channel.unary_unary(
            "/project.ProjectPublicService/DeleteProject",
            request_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectId.SerializeToString,
            response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
        self.JoinProject = channel.unary_unary(
            "/project.ProjectPublicService/JoinProject",
            request_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInviteCode.SerializeToString,
            response_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.FromString,
        )
        self.QuitProject = channel.unary_unary(
            "/project.ProjectPublicService/QuitProject",
            request_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectId.SerializeToString,
            response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )


class ProjectPublicServiceServicer(object):
    """项目公开接口"""

    def ListUserJoinedProjects(self, request, context):
        """获取用户参与的项目列表"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetProjectInfo(self, request, context):
        """获取项目信息"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def CreateProject(self, request, context):
        """创建项目"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateProjectInfo(self, request, context):
        """修改项目信息"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def DeleteProject(self, request, context):
        """删除项目"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def JoinProject(self, request, context):
        """加入项目"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def QuitProject(self, request, context):
        """退出项目"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_ProjectPublicServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "ListUserJoinedProjects": grpc.unary_unary_rpc_method_handler(
            servicer.ListUserJoinedProjects,
            request_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ListProjectRequest.FromString,
            response_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ListProjectResponse.SerializeToString,
        ),
        "GetProjectInfo": grpc.unary_unary_rpc_method_handler(
            servicer.GetProjectInfo,
            request_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectId.FromString,
            response_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.SerializeToString,
        ),
        "CreateProject": grpc.unary_unary_rpc_method_handler(
            servicer.CreateProject,
            request_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.CreateProjectRequest.FromString,
            response_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.SerializeToString,
        ),
        "UpdateProjectInfo": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateProjectInfo,
            request_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.UpdateProjectRequest.FromString,
            response_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.SerializeToString,
        ),
        "DeleteProject": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteProject,
            request_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectId.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
        "JoinProject": grpc.unary_unary_rpc_method_handler(
            servicer.JoinProject,
            request_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInviteCode.FromString,
            response_serializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.SerializeToString,
        ),
        "QuitProject": grpc.unary_unary_rpc_method_handler(
            servicer.QuitProject,
            request_deserializer=paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectId.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("project.ProjectPublicService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class ProjectPublicService(object):
    """项目公开接口"""

    @staticmethod
    def ListUserJoinedProjects(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/project.ProjectPublicService/ListUserJoinedProjects",
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ListProjectRequest.SerializeToString,
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ListProjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetProjectInfo(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/project.ProjectPublicService/GetProjectInfo",
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectId.SerializeToString,
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CreateProject(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/project.ProjectPublicService/CreateProject",
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.CreateProjectRequest.SerializeToString,
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdateProjectInfo(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/project.ProjectPublicService/UpdateProjectInfo",
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.UpdateProjectRequest.SerializeToString,
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def DeleteProject(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/project.ProjectPublicService/DeleteProject",
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectId.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def JoinProject(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/project.ProjectPublicService/JoinProject",
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInviteCode.SerializeToString,
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectInfo.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def QuitProject(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/project.ProjectPublicService/QuitProject",
            paperpilot__common_dot_protobuf_dot_project_dot_project__pb2.ProjectId.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
