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

from meshtrade.wallet.account.v1 import account_pb2 as meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2
from meshtrade.wallet.account.v1 import service_pb2 as meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2


class AccountServiceStub(object):
    """
    AccountService provides access to and management of wallet accounts.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateAccount = channel.unary_unary(
                '/meshtrade.wallet.account.v1.AccountService/CreateAccount',
                request_serializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.CreateAccountRequest.SerializeToString,
                response_deserializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2.Account.FromString,
                _registered_method=True)
        self.GetAccount = channel.unary_unary(
                '/meshtrade.wallet.account.v1.AccountService/GetAccount',
                request_serializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.GetAccountRequest.SerializeToString,
                response_deserializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2.Account.FromString,
                _registered_method=True)
        self.ListAccounts = channel.unary_unary(
                '/meshtrade.wallet.account.v1.AccountService/ListAccounts',
                request_serializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.ListAccountsRequest.SerializeToString,
                response_deserializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.ListAccountsResponse.FromString,
                _registered_method=True)
        self.SearchAccounts = channel.unary_unary(
                '/meshtrade.wallet.account.v1.AccountService/SearchAccounts',
                request_serializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.SearchAccountsRequest.SerializeToString,
                response_deserializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.SearchAccountsResponse.FromString,
                _registered_method=True)


class AccountServiceServicer(object):
    """
    AccountService provides access to and management of wallet accounts.
    """

    def CreateAccount(self, request, context):
        """
        Creates a new wallet account.
        This is a write operation restricted to administrative roles.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAccount(self, request, context):
        """
        Retrieves a single wallet account by its unique number.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListAccounts(self, request, context):
        """
        Retrieves a list of all accounts for the authenticated principal.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SearchAccounts(self, request, context):
        """
        Searches for accounts based on a partial label match.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AccountServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateAccount,
                    request_deserializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.CreateAccountRequest.FromString,
                    response_serializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2.Account.SerializeToString,
            ),
            'GetAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccount,
                    request_deserializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.GetAccountRequest.FromString,
                    response_serializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2.Account.SerializeToString,
            ),
            'ListAccounts': grpc.unary_unary_rpc_method_handler(
                    servicer.ListAccounts,
                    request_deserializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.ListAccountsRequest.FromString,
                    response_serializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.ListAccountsResponse.SerializeToString,
            ),
            'SearchAccounts': grpc.unary_unary_rpc_method_handler(
                    servicer.SearchAccounts,
                    request_deserializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.SearchAccountsRequest.FromString,
                    response_serializer=meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.SearchAccountsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'meshtrade.wallet.account.v1.AccountService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('meshtrade.wallet.account.v1.AccountService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class AccountService(object):
    """
    AccountService provides access to and management of wallet accounts.
    """

    @staticmethod
    def CreateAccount(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,
            '/meshtrade.wallet.account.v1.AccountService/CreateAccount',
            meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.CreateAccountRequest.SerializeToString,
            meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2.Account.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAccount(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,
            '/meshtrade.wallet.account.v1.AccountService/GetAccount',
            meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.GetAccountRequest.SerializeToString,
            meshtrade_dot_wallet_dot_account_dot_v1_dot_account__pb2.Account.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListAccounts(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,
            '/meshtrade.wallet.account.v1.AccountService/ListAccounts',
            meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.ListAccountsRequest.SerializeToString,
            meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.ListAccountsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SearchAccounts(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,
            '/meshtrade.wallet.account.v1.AccountService/SearchAccounts',
            meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.SearchAccountsRequest.SerializeToString,
            meshtrade_dot_wallet_dot_account_dot_v1_dot_service__pb2.SearchAccountsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
