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

from fsai_grpc_api.protos import feature_api_pb2 as fsai__grpc__api_dot_protos_dot_feature__api__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.FindOrCreateFeature = channel.unary_unary(
                '/FeatureApi/FindOrCreateFeature',
                request_serializer=fsai__grpc__api_dot_protos_dot_feature__api__pb2.FeatureRequest.SerializeToString,
                response_deserializer=fsai__grpc__api_dot_protos_dot_feature__api__pb2.FeatureResponse.FromString,
                )
        self.FindFeatureById = channel.unary_unary(
                '/FeatureApi/FindFeatureById',
                request_serializer=fsai__grpc__api_dot_protos_dot_feature__api__pb2.FindFeatureByIdRequest.SerializeToString,
                response_deserializer=fsai__grpc__api_dot_protos_dot_feature__api__pb2.FindFeatureByIdResponse.FromString,
                )


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

    def FindOrCreateFeature(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 FindFeatureById(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_FeatureApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'FindOrCreateFeature': grpc.unary_unary_rpc_method_handler(
                    servicer.FindOrCreateFeature,
                    request_deserializer=fsai__grpc__api_dot_protos_dot_feature__api__pb2.FeatureRequest.FromString,
                    response_serializer=fsai__grpc__api_dot_protos_dot_feature__api__pb2.FeatureResponse.SerializeToString,
            ),
            'FindFeatureById': grpc.unary_unary_rpc_method_handler(
                    servicer.FindFeatureById,
                    request_deserializer=fsai__grpc__api_dot_protos_dot_feature__api__pb2.FindFeatureByIdRequest.FromString,
                    response_serializer=fsai__grpc__api_dot_protos_dot_feature__api__pb2.FindFeatureByIdResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'FeatureApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def FindOrCreateFeature(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, '/FeatureApi/FindOrCreateFeature',
            fsai__grpc__api_dot_protos_dot_feature__api__pb2.FeatureRequest.SerializeToString,
            fsai__grpc__api_dot_protos_dot_feature__api__pb2.FeatureResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FindFeatureById(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, '/FeatureApi/FindFeatureById',
            fsai__grpc__api_dot_protos_dot_feature__api__pb2.FindFeatureByIdRequest.SerializeToString,
            fsai__grpc__api_dot_protos_dot_feature__api__pb2.FindFeatureByIdResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
