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

from exchange import injective_portfolio_rpc_pb2 as exchange_dot_injective__portfolio__rpc__pb2


class InjectivePortfolioRPCStub(object):
    """InjectivePortfolioRPC defines gRPC API of Exchange Portfolio provider.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.AccountPortfolio = channel.unary_unary(
                '/injective_portfolio_rpc.InjectivePortfolioRPC/AccountPortfolio',
                request_serializer=exchange_dot_injective__portfolio__rpc__pb2.AccountPortfolioRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__portfolio__rpc__pb2.AccountPortfolioResponse.FromString,
                )
        self.StreamAccountPortfolio = channel.unary_stream(
                '/injective_portfolio_rpc.InjectivePortfolioRPC/StreamAccountPortfolio',
                request_serializer=exchange_dot_injective__portfolio__rpc__pb2.StreamAccountPortfolioRequest.SerializeToString,
                response_deserializer=exchange_dot_injective__portfolio__rpc__pb2.StreamAccountPortfolioResponse.FromString,
                )


class InjectivePortfolioRPCServicer(object):
    """InjectivePortfolioRPC defines gRPC API of Exchange Portfolio provider.
    """

    def AccountPortfolio(self, request, context):
        """Provide the account's portfolio
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamAccountPortfolio(self, request, context):
        """Stream the account's portfolio
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_InjectivePortfolioRPCServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AccountPortfolio': grpc.unary_unary_rpc_method_handler(
                    servicer.AccountPortfolio,
                    request_deserializer=exchange_dot_injective__portfolio__rpc__pb2.AccountPortfolioRequest.FromString,
                    response_serializer=exchange_dot_injective__portfolio__rpc__pb2.AccountPortfolioResponse.SerializeToString,
            ),
            'StreamAccountPortfolio': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamAccountPortfolio,
                    request_deserializer=exchange_dot_injective__portfolio__rpc__pb2.StreamAccountPortfolioRequest.FromString,
                    response_serializer=exchange_dot_injective__portfolio__rpc__pb2.StreamAccountPortfolioResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'injective_portfolio_rpc.InjectivePortfolioRPC', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class InjectivePortfolioRPC(object):
    """InjectivePortfolioRPC defines gRPC API of Exchange Portfolio provider.
    """

    @staticmethod
    def AccountPortfolio(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_portfolio_rpc.InjectivePortfolioRPC/AccountPortfolio',
            exchange_dot_injective__portfolio__rpc__pb2.AccountPortfolioRequest.SerializeToString,
            exchange_dot_injective__portfolio__rpc__pb2.AccountPortfolioResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamAccountPortfolio(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_stream(request, target, '/injective_portfolio_rpc.InjectivePortfolioRPC/StreamAccountPortfolio',
            exchange_dot_injective__portfolio__rpc__pb2.StreamAccountPortfolioRequest.SerializeToString,
            exchange_dot_injective__portfolio__rpc__pb2.StreamAccountPortfolioResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
