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

from oracle.v1 import query_pb2 as oracle_dot_v1_dot_query__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Counts = channel.unary_unary(
                '/oracle.v1.Query/Counts',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryCountsRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryCountsResponse.FromString,
                )
        self.Data = channel.unary_unary(
                '/oracle.v1.Query/Data',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryDataRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryDataResponse.FromString,
                )
        self.DataSource = channel.unary_unary(
                '/oracle.v1.Query/DataSource',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryDataSourceRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryDataSourceResponse.FromString,
                )
        self.OracleScript = channel.unary_unary(
                '/oracle.v1.Query/OracleScript',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryOracleScriptRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryOracleScriptResponse.FromString,
                )
        self.Request = channel.unary_unary(
                '/oracle.v1.Query/Request',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestResponse.FromString,
                )
        self.PendingRequests = channel.unary_unary(
                '/oracle.v1.Query/PendingRequests',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryPendingRequestsRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryPendingRequestsResponse.FromString,
                )
        self.Validator = channel.unary_unary(
                '/oracle.v1.Query/Validator',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryValidatorRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryValidatorResponse.FromString,
                )
        self.Reporters = channel.unary_unary(
                '/oracle.v1.Query/Reporters',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryReportersRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryReportersResponse.FromString,
                )
        self.ActiveValidators = channel.unary_unary(
                '/oracle.v1.Query/ActiveValidators',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryActiveValidatorsRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryActiveValidatorsResponse.FromString,
                )
        self.Params = channel.unary_unary(
                '/oracle.v1.Query/Params',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryParamsRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryParamsResponse.FromString,
                )
        self.RequestSearch = channel.unary_unary(
                '/oracle.v1.Query/RequestSearch',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestSearchRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestSearchResponse.FromString,
                )
        self.RequestPrice = channel.unary_unary(
                '/oracle.v1.Query/RequestPrice',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestPriceRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestPriceResponse.FromString,
                )
        self.RequestVerification = channel.unary_unary(
                '/oracle.v1.Query/RequestVerification',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestVerificationRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestVerificationResponse.FromString,
                )
        self.RequestPool = channel.unary_unary(
                '/oracle.v1.Query/RequestPool',
                request_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestPoolRequest.SerializeToString,
                response_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestPoolResponse.FromString,
                )


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

    def Counts(self, request, context):
        """Counts queries the number of existing data sources, oracle scripts, and
        requests.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Data(self, request, context):
        """Data queries content of the data source or oracle script for given SHA256
        file hash.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DataSource(self, request, context):
        """DataSource queries data source summary info for given data source id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def OracleScript(self, request, context):
        """OracleScript queries oracle script summary info for given oracle script id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Request(self, request, context):
        """Request queries request info for given request id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PendingRequests(self, request, context):
        """PendingRequests queries list of pending request IDs assigned to given
        validator.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Validator(self, request, context):
        """Validator queries properties of given validator address.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Reporters(self, request, context):
        """Reporters queries all reporters associated with given validator address.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ActiveValidators(self, request, context):
        """ActiveValidators queries all active oracle validators.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Params(self, request, context):
        """Params queries parameters used for runnning bandchain network.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RequestSearch(self, request, context):
        """RequestSearch queries the latest request that match search criteria.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RequestPrice(self, request, context):
        """RequestPrice queries the latest price on standard price reference oracle
        script.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RequestVerification(self, request, context):
        """RequestVerification verifies a request to make sure that
        all information that will be used to report the data is valid
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RequestPool(self, request, context):
        """RequestPool queries the request pool information corresponding to the given
        port, channel, and request key.
        """
        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 = {
            'Counts': grpc.unary_unary_rpc_method_handler(
                    servicer.Counts,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryCountsRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryCountsResponse.SerializeToString,
            ),
            'Data': grpc.unary_unary_rpc_method_handler(
                    servicer.Data,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryDataRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryDataResponse.SerializeToString,
            ),
            'DataSource': grpc.unary_unary_rpc_method_handler(
                    servicer.DataSource,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryDataSourceRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryDataSourceResponse.SerializeToString,
            ),
            'OracleScript': grpc.unary_unary_rpc_method_handler(
                    servicer.OracleScript,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryOracleScriptRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryOracleScriptResponse.SerializeToString,
            ),
            'Request': grpc.unary_unary_rpc_method_handler(
                    servicer.Request,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestResponse.SerializeToString,
            ),
            'PendingRequests': grpc.unary_unary_rpc_method_handler(
                    servicer.PendingRequests,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryPendingRequestsRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryPendingRequestsResponse.SerializeToString,
            ),
            'Validator': grpc.unary_unary_rpc_method_handler(
                    servicer.Validator,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryValidatorRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryValidatorResponse.SerializeToString,
            ),
            'Reporters': grpc.unary_unary_rpc_method_handler(
                    servicer.Reporters,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryReportersRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryReportersResponse.SerializeToString,
            ),
            'ActiveValidators': grpc.unary_unary_rpc_method_handler(
                    servicer.ActiveValidators,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryActiveValidatorsRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryActiveValidatorsResponse.SerializeToString,
            ),
            'Params': grpc.unary_unary_rpc_method_handler(
                    servicer.Params,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryParamsRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryParamsResponse.SerializeToString,
            ),
            'RequestSearch': grpc.unary_unary_rpc_method_handler(
                    servicer.RequestSearch,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestSearchRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestSearchResponse.SerializeToString,
            ),
            'RequestPrice': grpc.unary_unary_rpc_method_handler(
                    servicer.RequestPrice,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestPriceRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestPriceResponse.SerializeToString,
            ),
            'RequestVerification': grpc.unary_unary_rpc_method_handler(
                    servicer.RequestVerification,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestVerificationRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestVerificationResponse.SerializeToString,
            ),
            'RequestPool': grpc.unary_unary_rpc_method_handler(
                    servicer.RequestPool,
                    request_deserializer=oracle_dot_v1_dot_query__pb2.QueryRequestPoolRequest.FromString,
                    response_serializer=oracle_dot_v1_dot_query__pb2.QueryRequestPoolResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'oracle.v1.Query', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Counts(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, '/oracle.v1.Query/Counts',
            oracle_dot_v1_dot_query__pb2.QueryCountsRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryCountsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Data(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, '/oracle.v1.Query/Data',
            oracle_dot_v1_dot_query__pb2.QueryDataRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryDataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DataSource(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, '/oracle.v1.Query/DataSource',
            oracle_dot_v1_dot_query__pb2.QueryDataSourceRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryDataSourceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OracleScript(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, '/oracle.v1.Query/OracleScript',
            oracle_dot_v1_dot_query__pb2.QueryOracleScriptRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryOracleScriptResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Request(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, '/oracle.v1.Query/Request',
            oracle_dot_v1_dot_query__pb2.QueryRequestRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryRequestResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PendingRequests(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, '/oracle.v1.Query/PendingRequests',
            oracle_dot_v1_dot_query__pb2.QueryPendingRequestsRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryPendingRequestsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Validator(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, '/oracle.v1.Query/Validator',
            oracle_dot_v1_dot_query__pb2.QueryValidatorRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryValidatorResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Reporters(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, '/oracle.v1.Query/Reporters',
            oracle_dot_v1_dot_query__pb2.QueryReportersRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryReportersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ActiveValidators(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, '/oracle.v1.Query/ActiveValidators',
            oracle_dot_v1_dot_query__pb2.QueryActiveValidatorsRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryActiveValidatorsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/oracle.v1.Query/Params',
            oracle_dot_v1_dot_query__pb2.QueryParamsRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryParamsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RequestSearch(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, '/oracle.v1.Query/RequestSearch',
            oracle_dot_v1_dot_query__pb2.QueryRequestSearchRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryRequestSearchResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RequestPrice(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, '/oracle.v1.Query/RequestPrice',
            oracle_dot_v1_dot_query__pb2.QueryRequestPriceRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryRequestPriceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RequestVerification(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, '/oracle.v1.Query/RequestVerification',
            oracle_dot_v1_dot_query__pb2.QueryRequestVerificationRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryRequestVerificationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RequestPool(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, '/oracle.v1.Query/RequestPool',
            oracle_dot_v1_dot_query__pb2.QueryRequestPoolRequest.SerializeToString,
            oracle_dot_v1_dot_query__pb2.QueryRequestPoolResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
