# 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.history import history_pb2 as services_dot_history_dot_history__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ping = channel.unary_unary(
                '/social.history.HistoryService/Ping',
                request_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Pong.FromString,
                )
        self.GetActivities = channel.unary_unary(
                '/social.history.HistoryService/GetActivities',
                request_serializer=services_dot_history_dot_history__pb2.GetActivitiesRequest.SerializeToString,
                response_deserializer=services_dot_history_dot_history__pb2.ActListResponse.FromString,
                )
        self.Log = channel.unary_unary(
                '/social.history.HistoryService/Log',
                request_serializer=services_dot_history_dot_history__pb2.Act.SerializeToString,
                response_deserializer=services_dot_common_dot_common__pb2.Empty.FromString,
                )


class HistoryServiceServicer(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 GetActivities(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 Log(self, request, context):
        """root
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_HistoryServiceServicer_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,
            ),
            'GetActivities': grpc.unary_unary_rpc_method_handler(
                    servicer.GetActivities,
                    request_deserializer=services_dot_history_dot_history__pb2.GetActivitiesRequest.FromString,
                    response_serializer=services_dot_history_dot_history__pb2.ActListResponse.SerializeToString,
            ),
            'Log': grpc.unary_unary_rpc_method_handler(
                    servicer.Log,
                    request_deserializer=services_dot_history_dot_history__pb2.Act.FromString,
                    response_serializer=services_dot_common_dot_common__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'social.history.HistoryService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class HistoryService(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.history.HistoryService/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 GetActivities(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.history.HistoryService/GetActivities',
            services_dot_history_dot_history__pb2.GetActivitiesRequest.SerializeToString,
            services_dot_history_dot_history__pb2.ActListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Log(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.history.HistoryService/Log',
            services_dot_history_dot_history__pb2.Act.SerializeToString,
            services_dot_common_dot_common__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
