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

from . import client_pb2 as apps_dot_anek__service_dot_client__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetRandomJoke = channel.unary_unary(
                '/anek_service.AnekService/GetRandomJoke',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=apps_dot_anek__service_dot_client__pb2.JokeResponse.FromString,
                )
        self.SearchJoke = channel.unary_unary(
                '/anek_service.AnekService/SearchJoke',
                request_serializer=apps_dot_anek__service_dot_client__pb2.SearchRequest.SerializeToString,
                response_deserializer=apps_dot_anek__service_dot_client__pb2.SearchResult.FromString,
                )
        self.SearchCopypasta = channel.unary_unary(
                '/anek_service.AnekService/SearchCopypasta',
                request_serializer=apps_dot_anek__service_dot_client__pb2.SearchRequest.SerializeToString,
                response_deserializer=apps_dot_anek__service_dot_client__pb2.SearchResult.FromString,
                )


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

    def GetRandomJoke(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 SearchJoke(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 SearchCopypasta(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_AnekServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetRandomJoke': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRandomJoke,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=apps_dot_anek__service_dot_client__pb2.JokeResponse.SerializeToString,
            ),
            'SearchJoke': grpc.unary_unary_rpc_method_handler(
                    servicer.SearchJoke,
                    request_deserializer=apps_dot_anek__service_dot_client__pb2.SearchRequest.FromString,
                    response_serializer=apps_dot_anek__service_dot_client__pb2.SearchResult.SerializeToString,
            ),
            'SearchCopypasta': grpc.unary_unary_rpc_method_handler(
                    servicer.SearchCopypasta,
                    request_deserializer=apps_dot_anek__service_dot_client__pb2.SearchRequest.FromString,
                    response_serializer=apps_dot_anek__service_dot_client__pb2.SearchResult.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'anek_service.AnekService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetRandomJoke(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, '/anek_service.AnekService/GetRandomJoke',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            apps_dot_anek__service_dot_client__pb2.JokeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SearchJoke(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, '/anek_service.AnekService/SearchJoke',
            apps_dot_anek__service_dot_client__pb2.SearchRequest.SerializeToString,
            apps_dot_anek__service_dot_client__pb2.SearchResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SearchCopypasta(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, '/anek_service.AnekService/SearchCopypasta',
            apps_dot_anek__service_dot_client__pb2.SearchRequest.SerializeToString,
            apps_dot_anek__service_dot_client__pb2.SearchResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
