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

from fxsdk.x.marginx.oracle.v1 import tx_pb2 as marginx_dot_oracle_dot_v1_dot_tx__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.BatchSubmitOracleAnswers = channel.unary_unary(
                '/marginx.oracle.v1.Msg/BatchSubmitOracleAnswers',
                request_serializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgBatchSubmitOracleAnswers.SerializeToString,
                response_deserializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgBatchSubmitOracleAnswersResponse.FromString,
                )
        self.UpdateAggregator = channel.unary_unary(
                '/marginx.oracle.v1.Msg/UpdateAggregator',
                request_serializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgUpdateAggregator.SerializeToString,
                response_deserializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgUpdateAggregatorResponse.FromString,
                )
        self.PresetOracle = channel.unary_unary(
                '/marginx.oracle.v1.Msg/PresetOracle',
                request_serializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgPresetOracle.SerializeToString,
                response_deserializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgPresetOracleResponse.FromString,
                )


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

    def BatchSubmitOracleAnswers(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 UpdateAggregator(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 PresetOracle(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_MsgServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'BatchSubmitOracleAnswers': grpc.unary_unary_rpc_method_handler(
                    servicer.BatchSubmitOracleAnswers,
                    request_deserializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgBatchSubmitOracleAnswers.FromString,
                    response_serializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgBatchSubmitOracleAnswersResponse.SerializeToString,
            ),
            'UpdateAggregator': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateAggregator,
                    request_deserializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgUpdateAggregator.FromString,
                    response_serializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgUpdateAggregatorResponse.SerializeToString,
            ),
            'PresetOracle': grpc.unary_unary_rpc_method_handler(
                    servicer.PresetOracle,
                    request_deserializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgPresetOracle.FromString,
                    response_serializer=marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgPresetOracleResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'marginx.oracle.v1.Msg', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def BatchSubmitOracleAnswers(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, '/marginx.oracle.v1.Msg/BatchSubmitOracleAnswers',
            marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgBatchSubmitOracleAnswers.SerializeToString,
            marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgBatchSubmitOracleAnswersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateAggregator(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, '/marginx.oracle.v1.Msg/UpdateAggregator',
            marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgUpdateAggregator.SerializeToString,
            marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgUpdateAggregatorResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PresetOracle(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, '/marginx.oracle.v1.Msg/PresetOracle',
            marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgPresetOracle.SerializeToString,
            marginx_dot_oracle_dot_v1_dot_tx__pb2.MsgPresetOracleResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
