# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from common.api.services.common import common_pb2 as services_dot_common_dot_common__pb2
from common.api.services.discussion import discussion_pb2 as services_dot_discussion_dot_discussion__pb2


class DiscussionServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ping = channel.unary_unary(
                '/social.DiscussionService/Ping',
                request_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Pong.FromString,
                )
        self.Publish = channel.unary_unary(
                '/social.DiscussionService/Publish',
                request_serializer=services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
                response_deserializer=services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
                )
        self.Update = channel.unary_unary(
                '/social.DiscussionService/Update',
                request_serializer=services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                )
        self.Delete = channel.unary_unary(
                '/social.DiscussionService/Delete',
                request_serializer=services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                )
        self.GetDiscussions = channel.unary_unary(
                '/social.DiscussionService/GetDiscussions',
                request_serializer=services_dot_discussion_dot_discussion__pb2.GetDiscussionsRequest.SerializeToString,
                response_deserializer=services_dot_discussion_dot_discussion__pb2.DiscussionListResponse.FromString,
                )
        self.Like = channel.unary_unary(
                '/social.DiscussionService/Like',
                request_serializer=services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                )
        self.Dislike = channel.unary_unary(
                '/social.DiscussionService/Dislike',
                request_serializer=services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                )
        self.Pin = channel.unary_unary(
                '/social.DiscussionService/Pin',
                request_serializer=services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                )
        self.UnPin = channel.unary_unary(
                '/social.DiscussionService/UnPin',
                request_serializer=services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                )
        self.AdminDiscussionDelete = channel.unary_unary(
                '/social.DiscussionService/AdminDiscussionDelete',
                request_serializer=services_dot_discussion_dot_discussion__pb2.ToggleDiscussion.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                )
        self.AdminDiscussionUpdate = channel.unary_unary(
                '/social.DiscussionService/AdminDiscussionUpdate',
                request_serializer=services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                )


class DiscussionServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def Ping(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Publish(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDiscussions(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Like(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Dislike(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Pin(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UnPin(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AdminDiscussionDelete(self, request, context):
        """Admin Section. All admin services starts with `AdminSERVICE_NAME`
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AdminDiscussionUpdate(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DiscussionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Ping': grpc.unary_unary_rpc_method_handler(
                    servicer.Ping,
                    request_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Pong.SerializeToString,
            ),
            'Publish': grpc.unary_unary_rpc_method_handler(
                    servicer.Publish,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
                    response_serializer=services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
            ),
            'GetDiscussions': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDiscussions,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.GetDiscussionsRequest.FromString,
                    response_serializer=services_dot_discussion_dot_discussion__pb2.DiscussionListResponse.SerializeToString,
            ),
            'Like': grpc.unary_unary_rpc_method_handler(
                    servicer.Like,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
            ),
            'Dislike': grpc.unary_unary_rpc_method_handler(
                    servicer.Dislike,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
            ),
            'Pin': grpc.unary_unary_rpc_method_handler(
                    servicer.Pin,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
            ),
            'UnPin': grpc.unary_unary_rpc_method_handler(
                    servicer.UnPin,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
            ),
            'AdminDiscussionDelete': grpc.unary_unary_rpc_method_handler(
                    servicer.AdminDiscussionDelete,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.ToggleDiscussion.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
            ),
            'AdminDiscussionUpdate': grpc.unary_unary_rpc_method_handler(
                    servicer.AdminDiscussionUpdate,
                    request_deserializer=services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'social.DiscussionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class DiscussionService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def Ping(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, '/social.DiscussionService/Ping',
            services_dot_common_dot_common__pb2.Empty.SerializeToString,
            services_dot_common_dot_common__pb2.Pong.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Publish(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, '/social.DiscussionService/Publish',
            services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
            services_dot_discussion_dot_discussion__pb2.Discussion.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Update(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, '/social.DiscussionService/Update',
            services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
            services_dot_common_dot_common__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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, '/social.DiscussionService/Delete',
            services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
            services_dot_common_dot_common__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDiscussions(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, '/social.DiscussionService/GetDiscussions',
            services_dot_discussion_dot_discussion__pb2.GetDiscussionsRequest.SerializeToString,
            services_dot_discussion_dot_discussion__pb2.DiscussionListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Like(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, '/social.DiscussionService/Like',
            services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
            services_dot_common_dot_common__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Dislike(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, '/social.DiscussionService/Dislike',
            services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
            services_dot_common_dot_common__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Pin(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, '/social.DiscussionService/Pin',
            services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
            services_dot_common_dot_common__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UnPin(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, '/social.DiscussionService/UnPin',
            services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
            services_dot_common_dot_common__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AdminDiscussionDelete(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, '/social.DiscussionService/AdminDiscussionDelete',
            services_dot_discussion_dot_discussion__pb2.ToggleDiscussion.SerializeToString,
            services_dot_common_dot_common__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AdminDiscussionUpdate(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, '/social.DiscussionService/AdminDiscussionUpdate',
            services_dot_discussion_dot_discussion__pb2.Discussion.SerializeToString,
            services_dot_common_dot_common__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
