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

from injective.insurance.v1beta1 import tx_pb2 as injective_dot_insurance_dot_v1beta1_dot_tx__pb2


class MsgStub(object):
    """Msg defines the insurance Msg service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateInsuranceFund = channel.unary_unary(
                '/injective.insurance.v1beta1.Msg/CreateInsuranceFund',
                request_serializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgCreateInsuranceFund.SerializeToString,
                response_deserializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgCreateInsuranceFundResponse.FromString,
                )
        self.Underwrite = channel.unary_unary(
                '/injective.insurance.v1beta1.Msg/Underwrite',
                request_serializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgUnderwrite.SerializeToString,
                response_deserializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgUnderwriteResponse.FromString,
                )
        self.RequestRedemption = channel.unary_unary(
                '/injective.insurance.v1beta1.Msg/RequestRedemption',
                request_serializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgRequestRedemption.SerializeToString,
                response_deserializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgRequestRedemptionResponse.FromString,
                )


class MsgServicer(object):
    """Msg defines the insurance Msg service.
    """

    def CreateInsuranceFund(self, request, context):
        """CreateInsuranceFund defines a method for creating an insurance fund
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Underwrite(self, request, context):
        """Underwrite defines a method for depositing tokens to underwrite an insurance fund
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RequestRedemption(self, request, context):
        """RequestRedemption defines a method for requesting a redemption of the sender's insurance fund tokens
        """
        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 = {
            'CreateInsuranceFund': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateInsuranceFund,
                    request_deserializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgCreateInsuranceFund.FromString,
                    response_serializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgCreateInsuranceFundResponse.SerializeToString,
            ),
            'Underwrite': grpc.unary_unary_rpc_method_handler(
                    servicer.Underwrite,
                    request_deserializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgUnderwrite.FromString,
                    response_serializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgUnderwriteResponse.SerializeToString,
            ),
            'RequestRedemption': grpc.unary_unary_rpc_method_handler(
                    servicer.RequestRedemption,
                    request_deserializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgRequestRedemption.FromString,
                    response_serializer=injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgRequestRedemptionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'injective.insurance.v1beta1.Msg', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Msg(object):
    """Msg defines the insurance Msg service.
    """

    @staticmethod
    def CreateInsuranceFund(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, '/injective.insurance.v1beta1.Msg/CreateInsuranceFund',
            injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgCreateInsuranceFund.SerializeToString,
            injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgCreateInsuranceFundResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Underwrite(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, '/injective.insurance.v1beta1.Msg/Underwrite',
            injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgUnderwrite.SerializeToString,
            injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgUnderwriteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RequestRedemption(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, '/injective.insurance.v1beta1.Msg/RequestRedemption',
            injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgRequestRedemption.SerializeToString,
            injective_dot_insurance_dot_v1beta1_dot_tx__pb2.MsgRequestRedemptionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
