# 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 protos.rome.services import portfolio_manager_pb2 as protos_dot_rome_dot_services_dot_portfolio__manager__pb2

GRPC_GENERATED_VERSION = '1.65.5'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.66.0'
SCHEDULED_RELEASE_DATE = 'August 6, 2024'
_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:
    warnings.warn(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in protos/rome/services/portfolio_manager_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}.'
        + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
        + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
        RuntimeWarning
    )


class PortfolioMangerServiceStub(object):
    """The portfolio manager service definition.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.HealthCheck = channel.unary_unary(
                '/rome.services.portfolio_manager.PortfolioMangerService/HealthCheck',
                request_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.HealthCheckRequest.SerializeToString,
                response_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.HealthCheckResponse.FromString,
                _registered_method=True)
        self.CreatePortfolio = channel.unary_unary(
                '/rome.services.portfolio_manager.PortfolioMangerService/CreatePortfolio',
                request_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.CreatePortfolioRequest.SerializeToString,
                response_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.CreatePortfolioResponse.FromString,
                _registered_method=True)
        self.DepositAsset = channel.unary_unary(
                '/rome.services.portfolio_manager.PortfolioMangerService/DepositAsset',
                request_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.DepositAssetRequest.SerializeToString,
                response_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.DepositAssetResponse.FromString,
                _registered_method=True)
        self.WithdrawAsset = channel.unary_unary(
                '/rome.services.portfolio_manager.PortfolioMangerService/WithdrawAsset',
                request_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.WithdrawAssetRequest.SerializeToString,
                response_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.WithdrawAssetResponse.FromString,
                _registered_method=True)
        self.Transact = channel.unary_unary(
                '/rome.services.portfolio_manager.PortfolioMangerService/Transact',
                request_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.TransactRequest.SerializeToString,
                response_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.TransactResponse.FromString,
                _registered_method=True)
        self.PlaceHold = channel.unary_unary(
                '/rome.services.portfolio_manager.PortfolioMangerService/PlaceHold',
                request_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.PlaceHoldRequest.SerializeToString,
                response_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.PlaceHoldResponse.FromString,
                _registered_method=True)
        self.ReleaseHold = channel.unary_unary(
                '/rome.services.portfolio_manager.PortfolioMangerService/ReleaseHold',
                request_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.ReleaseHoldRequest.SerializeToString,
                response_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.ReleaseHoldResponse.FromString,
                _registered_method=True)
        self.GetPortfolio = channel.unary_unary(
                '/rome.services.portfolio_manager.PortfolioMangerService/GetPortfolio',
                request_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetPortfolioRequest.SerializeToString,
                response_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetPortfolioResponse.FromString,
                _registered_method=True)
        self.GetAsset = channel.unary_unary(
                '/rome.services.portfolio_manager.PortfolioMangerService/GetAsset',
                request_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetAssetRequest.SerializeToString,
                response_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetAssetResponse.FromString,
                _registered_method=True)


class PortfolioMangerServiceServicer(object):
    """The portfolio manager service definition.
    """

    def HealthCheck(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 CreatePortfolio(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 DepositAsset(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 WithdrawAsset(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 Transact(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 PlaceHold(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 ReleaseHold(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 GetPortfolio(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 GetAsset(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_PortfolioMangerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'HealthCheck': grpc.unary_unary_rpc_method_handler(
                    servicer.HealthCheck,
                    request_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.HealthCheckRequest.FromString,
                    response_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.HealthCheckResponse.SerializeToString,
            ),
            'CreatePortfolio': grpc.unary_unary_rpc_method_handler(
                    servicer.CreatePortfolio,
                    request_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.CreatePortfolioRequest.FromString,
                    response_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.CreatePortfolioResponse.SerializeToString,
            ),
            'DepositAsset': grpc.unary_unary_rpc_method_handler(
                    servicer.DepositAsset,
                    request_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.DepositAssetRequest.FromString,
                    response_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.DepositAssetResponse.SerializeToString,
            ),
            'WithdrawAsset': grpc.unary_unary_rpc_method_handler(
                    servicer.WithdrawAsset,
                    request_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.WithdrawAssetRequest.FromString,
                    response_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.WithdrawAssetResponse.SerializeToString,
            ),
            'Transact': grpc.unary_unary_rpc_method_handler(
                    servicer.Transact,
                    request_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.TransactRequest.FromString,
                    response_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.TransactResponse.SerializeToString,
            ),
            'PlaceHold': grpc.unary_unary_rpc_method_handler(
                    servicer.PlaceHold,
                    request_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.PlaceHoldRequest.FromString,
                    response_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.PlaceHoldResponse.SerializeToString,
            ),
            'ReleaseHold': grpc.unary_unary_rpc_method_handler(
                    servicer.ReleaseHold,
                    request_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.ReleaseHoldRequest.FromString,
                    response_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.ReleaseHoldResponse.SerializeToString,
            ),
            'GetPortfolio': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPortfolio,
                    request_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetPortfolioRequest.FromString,
                    response_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetPortfolioResponse.SerializeToString,
            ),
            'GetAsset': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAsset,
                    request_deserializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetAssetRequest.FromString,
                    response_serializer=protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetAssetResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'rome.services.portfolio_manager.PortfolioMangerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('rome.services.portfolio_manager.PortfolioMangerService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class PortfolioMangerService(object):
    """The portfolio manager service definition.
    """

    @staticmethod
    def HealthCheck(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,
            '/rome.services.portfolio_manager.PortfolioMangerService/HealthCheck',
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.HealthCheckRequest.SerializeToString,
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.HealthCheckResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreatePortfolio(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,
            '/rome.services.portfolio_manager.PortfolioMangerService/CreatePortfolio',
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.CreatePortfolioRequest.SerializeToString,
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.CreatePortfolioResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DepositAsset(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,
            '/rome.services.portfolio_manager.PortfolioMangerService/DepositAsset',
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.DepositAssetRequest.SerializeToString,
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.DepositAssetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WithdrawAsset(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,
            '/rome.services.portfolio_manager.PortfolioMangerService/WithdrawAsset',
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.WithdrawAssetRequest.SerializeToString,
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.WithdrawAssetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Transact(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,
            '/rome.services.portfolio_manager.PortfolioMangerService/Transact',
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.TransactRequest.SerializeToString,
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.TransactResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PlaceHold(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,
            '/rome.services.portfolio_manager.PortfolioMangerService/PlaceHold',
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.PlaceHoldRequest.SerializeToString,
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.PlaceHoldResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ReleaseHold(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,
            '/rome.services.portfolio_manager.PortfolioMangerService/ReleaseHold',
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.ReleaseHoldRequest.SerializeToString,
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.ReleaseHoldResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetPortfolio(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,
            '/rome.services.portfolio_manager.PortfolioMangerService/GetPortfolio',
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetPortfolioRequest.SerializeToString,
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetPortfolioResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAsset(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,
            '/rome.services.portfolio_manager.PortfolioMangerService/GetAsset',
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetAssetRequest.SerializeToString,
            protos_dot_rome_dot_services_dot_portfolio__manager__pb2.GetAssetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
