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

from terrascope_api.models import aoi_export_pb2 as aoi__export__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.export_aois = channel.unary_unary(
                '/oi.papi.AOIExportApi/export_aois',
                request_serializer=aoi__export__pb2.AOIExportRequest.SerializeToString,
                response_deserializer=aoi__export__pb2.AOIExportResponse.FromString,
                )
        self.export_collection = channel.unary_unary(
                '/oi.papi.AOIExportApi/export_collection',
                request_serializer=aoi__export__pb2.AOICollectionExportRequest.SerializeToString,
                response_deserializer=aoi__export__pb2.AOICollectionExportResponse.FromString,
                )


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

    def export_aois(self, request, context):
        """
        Exports supplied aoi_ids to a file format specified.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def export_collection(self, request, context):
        """
        Exports supplied aoi_collection into the file format specified
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AOIExportApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'export_aois': grpc.unary_unary_rpc_method_handler(
                    servicer.export_aois,
                    request_deserializer=aoi__export__pb2.AOIExportRequest.FromString,
                    response_serializer=aoi__export__pb2.AOIExportResponse.SerializeToString,
            ),
            'export_collection': grpc.unary_unary_rpc_method_handler(
                    servicer.export_collection,
                    request_deserializer=aoi__export__pb2.AOICollectionExportRequest.FromString,
                    response_serializer=aoi__export__pb2.AOICollectionExportResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'oi.papi.AOIExportApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def export_aois(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, '/oi.papi.AOIExportApi/export_aois',
            aoi__export__pb2.AOIExportRequest.SerializeToString,
            aoi__export__pb2.AOIExportResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def export_collection(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, '/oi.papi.AOIExportApi/export_collection',
            aoi__export__pb2.AOICollectionExportRequest.SerializeToString,
            aoi__export__pb2.AOICollectionExportResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
