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

from geospatial_toolkit_grpc_service.protos import function_api_pb2 as geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CalculateAMSL = channel.unary_unary(
                '/FunctionApi/CalculateAMSL',
                request_serializer=geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.CalculateAMSLRequest.SerializeToString,
                response_deserializer=geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.CalculateAMSLResponse.FromString,
                )
        self.ExtractShapesFromFilesAsWKT = channel.stream_unary(
                '/FunctionApi/ExtractShapesFromFilesAsWKT',
                request_serializer=geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.ExtractShapesFromFilesAsWKTRequest.SerializeToString,
                response_deserializer=geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.ExtractShapesFromFilesAsWKTResponse.FromString,
                )


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

    def CalculateAMSL(self, request, context):
        """Calculate the altitude above mean sea level (AMSL) and the elevation of a point on the Earth's surface.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ExtractShapesFromFilesAsWKT(self, request_iterator, context):
        """Extract geospatial shapes from files and return them as WKT strings.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_FunctionApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CalculateAMSL': grpc.unary_unary_rpc_method_handler(
                    servicer.CalculateAMSL,
                    request_deserializer=geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.CalculateAMSLRequest.FromString,
                    response_serializer=geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.CalculateAMSLResponse.SerializeToString,
            ),
            'ExtractShapesFromFilesAsWKT': grpc.stream_unary_rpc_method_handler(
                    servicer.ExtractShapesFromFilesAsWKT,
                    request_deserializer=geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.ExtractShapesFromFilesAsWKTRequest.FromString,
                    response_serializer=geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.ExtractShapesFromFilesAsWKTResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'FunctionApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CalculateAMSL(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, '/FunctionApi/CalculateAMSL',
            geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.CalculateAMSLRequest.SerializeToString,
            geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.CalculateAMSLResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ExtractShapesFromFilesAsWKT(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/FunctionApi/ExtractShapesFromFilesAsWKT',
            geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.ExtractShapesFromFilesAsWKTRequest.SerializeToString,
            geospatial__toolkit__grpc__service_dot_protos_dot_function__api__pb2.ExtractShapesFromFilesAsWKTResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
