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

from neurion.sanctum import query_pb2 as neurion_dot_sanctum_dot_query__pb2

GRPC_GENERATED_VERSION = '1.70.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in neurion/sanctum/query_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class QueryStub(object):
    """Query defines the gRPC querier service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Params = channel.unary_unary(
                '/neurion.sanctum.Query/Params',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryParamsRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryParamsResponse.FromString,
                _registered_method=True)
        self.GetAvailableDatasets = channel.unary_unary(
                '/neurion.sanctum.Query/GetAvailableDatasets',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetAvailableDatasetsRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetAvailableDatasetsResponse.FromString,
                _registered_method=True)
        self.GetApprovedUsageRequests = channel.unary_unary(
                '/neurion.sanctum.Query/GetApprovedUsageRequests',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetApprovedUsageRequestsRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetApprovedUsageRequestsResponse.FromString,
                _registered_method=True)
        self.GetReward = channel.unary_unary(
                '/neurion.sanctum.Query/GetReward',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetRewardRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetRewardResponse.FromString,
                _registered_method=True)
        self.GetStake = channel.unary_unary(
                '/neurion.sanctum.Query/GetStake',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetStakeRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetStakeResponse.FromString,
                _registered_method=True)
        self.GetPendingDatasets = channel.unary_unary(
                '/neurion.sanctum.Query/GetPendingDatasets',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetPendingDatasetsRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetPendingDatasetsResponse.FromString,
                _registered_method=True)
        self.GetPendingUsageRequests = channel.unary_unary(
                '/neurion.sanctum.Query/GetPendingUsageRequests',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetPendingUsageRequestsRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetPendingUsageRequestsResponse.FromString,
                _registered_method=True)
        self.GetDataset = channel.unary_unary(
                '/neurion.sanctum.Query/GetDataset',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetResponse.FromString,
                _registered_method=True)
        self.GetUsageRequest = channel.unary_unary(
                '/neurion.sanctum.Query/GetUsageRequest',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestResponse.FromString,
                _registered_method=True)
        self.GetUsageRequestsForDataset = channel.unary_unary(
                '/neurion.sanctum.Query/GetUsageRequestsForDataset',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForDatasetRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForDatasetResponse.FromString,
                _registered_method=True)
        self.GetUsageRequestsForUser = channel.unary_unary(
                '/neurion.sanctum.Query/GetUsageRequestsForUser',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForUserRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForUserResponse.FromString,
                _registered_method=True)
        self.GetDatasetsForUser = channel.unary_unary(
                '/neurion.sanctum.Query/GetDatasetsForUser',
                request_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetsForUserRequest.SerializeToString,
                response_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetsForUserResponse.FromString,
                _registered_method=True)


class QueryServicer(object):
    """Query defines the gRPC querier service.
    """

    def Params(self, request, context):
        """Parameters queries the parameters of the module.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAvailableDatasets(self, request, context):
        """Queries a list of GetAvailableDatasets items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetApprovedUsageRequests(self, request, context):
        """Queries a list of GetApprovedUsageRequests items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetReward(self, request, context):
        """Queries a list of GetReward items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetStake(self, request, context):
        """Queries a list of GetStake items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetPendingDatasets(self, request, context):
        """Queries a list of GetPendingDatasets items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetPendingUsageRequests(self, request, context):
        """Queries a list of GetPendingUsageRequests items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDataset(self, request, context):
        """Queries a list of GetDataset items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUsageRequest(self, request, context):
        """Queries a list of GetUsageRequest items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUsageRequestsForDataset(self, request, context):
        """Queries a list of GetUsageRequestsForDataset items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUsageRequestsForUser(self, request, context):
        """Queries a list of GetUsageRequestsForUser items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDatasetsForUser(self, request, context):
        """Queries a list of GetDatasetsForUser items.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QueryServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Params': grpc.unary_unary_rpc_method_handler(
                    servicer.Params,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryParamsRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryParamsResponse.SerializeToString,
            ),
            'GetAvailableDatasets': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAvailableDatasets,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetAvailableDatasetsRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetAvailableDatasetsResponse.SerializeToString,
            ),
            'GetApprovedUsageRequests': grpc.unary_unary_rpc_method_handler(
                    servicer.GetApprovedUsageRequests,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetApprovedUsageRequestsRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetApprovedUsageRequestsResponse.SerializeToString,
            ),
            'GetReward': grpc.unary_unary_rpc_method_handler(
                    servicer.GetReward,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetRewardRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetRewardResponse.SerializeToString,
            ),
            'GetStake': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStake,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetStakeRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetStakeResponse.SerializeToString,
            ),
            'GetPendingDatasets': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPendingDatasets,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetPendingDatasetsRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetPendingDatasetsResponse.SerializeToString,
            ),
            'GetPendingUsageRequests': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPendingUsageRequests,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetPendingUsageRequestsRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetPendingUsageRequestsResponse.SerializeToString,
            ),
            'GetDataset': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDataset,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetResponse.SerializeToString,
            ),
            'GetUsageRequest': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUsageRequest,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestResponse.SerializeToString,
            ),
            'GetUsageRequestsForDataset': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUsageRequestsForDataset,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForDatasetRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForDatasetResponse.SerializeToString,
            ),
            'GetUsageRequestsForUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUsageRequestsForUser,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForUserRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForUserResponse.SerializeToString,
            ),
            'GetDatasetsForUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDatasetsForUser,
                    request_deserializer=neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetsForUserRequest.FromString,
                    response_serializer=neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetsForUserResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'neurion.sanctum.Query', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('neurion.sanctum.Query', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class Query(object):
    """Query defines the gRPC querier service.
    """

    @staticmethod
    def Params(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,
            '/neurion.sanctum.Query/Params',
            neurion_dot_sanctum_dot_query__pb2.QueryParamsRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryParamsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAvailableDatasets(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,
            '/neurion.sanctum.Query/GetAvailableDatasets',
            neurion_dot_sanctum_dot_query__pb2.QueryGetAvailableDatasetsRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetAvailableDatasetsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetApprovedUsageRequests(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,
            '/neurion.sanctum.Query/GetApprovedUsageRequests',
            neurion_dot_sanctum_dot_query__pb2.QueryGetApprovedUsageRequestsRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetApprovedUsageRequestsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetReward(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,
            '/neurion.sanctum.Query/GetReward',
            neurion_dot_sanctum_dot_query__pb2.QueryGetRewardRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetRewardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetStake(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,
            '/neurion.sanctum.Query/GetStake',
            neurion_dot_sanctum_dot_query__pb2.QueryGetStakeRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetStakeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetPendingDatasets(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,
            '/neurion.sanctum.Query/GetPendingDatasets',
            neurion_dot_sanctum_dot_query__pb2.QueryGetPendingDatasetsRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetPendingDatasetsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetPendingUsageRequests(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,
            '/neurion.sanctum.Query/GetPendingUsageRequests',
            neurion_dot_sanctum_dot_query__pb2.QueryGetPendingUsageRequestsRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetPendingUsageRequestsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetDataset(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,
            '/neurion.sanctum.Query/GetDataset',
            neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUsageRequest(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,
            '/neurion.sanctum.Query/GetUsageRequest',
            neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUsageRequestsForDataset(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,
            '/neurion.sanctum.Query/GetUsageRequestsForDataset',
            neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForDatasetRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForDatasetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUsageRequestsForUser(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,
            '/neurion.sanctum.Query/GetUsageRequestsForUser',
            neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForUserRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetUsageRequestsForUserResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetDatasetsForUser(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,
            '/neurion.sanctum.Query/GetDatasetsForUser',
            neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetsForUserRequest.SerializeToString,
            neurion_dot_sanctum_dot_query__pb2.QueryGetDatasetsForUserResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
