# 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 apexnova.identity.account import account_service_pb2 as apexnova_dot_identity_dot_account_dot_account__service__pb2

GRPC_GENERATED_VERSION = '1.72.1'
GRPC_VERSION = grpc.__version__
_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:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in apexnova/identity/account/account_service_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}.'
    )


class AccountServiceStub(object):
    """Service for managing accounts, including creation, updates, and deletion.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateAccount = channel.unary_unary(
                '/identity.AccountService/CreateAccount',
                request_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.CreateAccountRequest.SerializeToString,
                response_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.CreateAccountResponse.FromString,
                _registered_method=True)
        self.UpdateAccount = channel.unary_unary(
                '/identity.AccountService/UpdateAccount',
                request_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.UpdateAccountRequest.SerializeToString,
                response_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.UpdateAccountResponse.FromString,
                _registered_method=True)
        self.ReadAccount = channel.unary_unary(
                '/identity.AccountService/ReadAccount',
                request_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.ReadAccountRequest.SerializeToString,
                response_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.ReadAccountResponse.FromString,
                _registered_method=True)
        self.DeleteAccount = channel.unary_unary(
                '/identity.AccountService/DeleteAccount',
                request_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.DeleteAccountRequest.SerializeToString,
                response_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.DeleteAccountResponse.FromString,
                _registered_method=True)
        self.Login = channel.unary_unary(
                '/identity.AccountService/Login',
                request_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.LoginRequest.SerializeToString,
                response_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.LoginResponse.FromString,
                _registered_method=True)
        self.Logout = channel.unary_unary(
                '/identity.AccountService/Logout',
                request_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.LogoutRequest.SerializeToString,
                response_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.LogoutResponse.FromString,
                _registered_method=True)
        self.RefreshToken = channel.unary_unary(
                '/identity.AccountService/RefreshToken',
                request_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.RefreshTokenRequest.SerializeToString,
                response_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.RefreshTokenResponse.FromString,
                _registered_method=True)
        self.ChangePassword = channel.unary_unary(
                '/identity.AccountService/ChangePassword',
                request_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.ChangePasswordRequest.SerializeToString,
                response_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.ChangePasswordResponse.FromString,
                _registered_method=True)


class AccountServiceServicer(object):
    """Service for managing accounts, including creation, updates, and deletion.
    """

    def CreateAccount(self, request, context):
        """Creates a new account.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateAccount(self, request, context):
        """Updates an existing account.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReadAccount(self, request, context):
        """Reads account details by ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteAccount(self, request, context):
        """Deletes an account by ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Login(self, request, context):
        """Logs in a user with their credentials.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Logout(self, request, context):
        """Logs out a user by invalidating their session.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RefreshToken(self, request, context):
        """Refreshes an expired token for a user.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ChangePassword(self, request, context):
        """Changes the password for an account.
        """
        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=apexnova_dot_identity_dot_account_dot_account__service__pb2.CreateAccountRequest.FromString,
                    response_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.CreateAccountResponse.SerializeToString,
            ),
            'UpdateAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateAccount,
                    request_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.UpdateAccountRequest.FromString,
                    response_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.UpdateAccountResponse.SerializeToString,
            ),
            'ReadAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.ReadAccount,
                    request_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.ReadAccountRequest.FromString,
                    response_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.ReadAccountResponse.SerializeToString,
            ),
            'DeleteAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteAccount,
                    request_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.DeleteAccountRequest.FromString,
                    response_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.DeleteAccountResponse.SerializeToString,
            ),
            'Login': grpc.unary_unary_rpc_method_handler(
                    servicer.Login,
                    request_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.LoginRequest.FromString,
                    response_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.LoginResponse.SerializeToString,
            ),
            'Logout': grpc.unary_unary_rpc_method_handler(
                    servicer.Logout,
                    request_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.LogoutRequest.FromString,
                    response_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.LogoutResponse.SerializeToString,
            ),
            'RefreshToken': grpc.unary_unary_rpc_method_handler(
                    servicer.RefreshToken,
                    request_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.RefreshTokenRequest.FromString,
                    response_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.RefreshTokenResponse.SerializeToString,
            ),
            'ChangePassword': grpc.unary_unary_rpc_method_handler(
                    servicer.ChangePassword,
                    request_deserializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.ChangePasswordRequest.FromString,
                    response_serializer=apexnova_dot_identity_dot_account_dot_account__service__pb2.ChangePasswordResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'identity.AccountService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('identity.AccountService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class AccountService(object):
    """Service for managing accounts, including creation, updates, and deletion.
    """

    @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,
            '/identity.AccountService/CreateAccount',
            apexnova_dot_identity_dot_account_dot_account__service__pb2.CreateAccountRequest.SerializeToString,
            apexnova_dot_identity_dot_account_dot_account__service__pb2.CreateAccountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateAccount(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,
            '/identity.AccountService/UpdateAccount',
            apexnova_dot_identity_dot_account_dot_account__service__pb2.UpdateAccountRequest.SerializeToString,
            apexnova_dot_identity_dot_account_dot_account__service__pb2.UpdateAccountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ReadAccount(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,
            '/identity.AccountService/ReadAccount',
            apexnova_dot_identity_dot_account_dot_account__service__pb2.ReadAccountRequest.SerializeToString,
            apexnova_dot_identity_dot_account_dot_account__service__pb2.ReadAccountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteAccount(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,
            '/identity.AccountService/DeleteAccount',
            apexnova_dot_identity_dot_account_dot_account__service__pb2.DeleteAccountRequest.SerializeToString,
            apexnova_dot_identity_dot_account_dot_account__service__pb2.DeleteAccountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Login(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,
            '/identity.AccountService/Login',
            apexnova_dot_identity_dot_account_dot_account__service__pb2.LoginRequest.SerializeToString,
            apexnova_dot_identity_dot_account_dot_account__service__pb2.LoginResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Logout(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,
            '/identity.AccountService/Logout',
            apexnova_dot_identity_dot_account_dot_account__service__pb2.LogoutRequest.SerializeToString,
            apexnova_dot_identity_dot_account_dot_account__service__pb2.LogoutResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RefreshToken(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,
            '/identity.AccountService/RefreshToken',
            apexnova_dot_identity_dot_account_dot_account__service__pb2.RefreshTokenRequest.SerializeToString,
            apexnova_dot_identity_dot_account_dot_account__service__pb2.RefreshTokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ChangePassword(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,
            '/identity.AccountService/ChangePassword',
            apexnova_dot_identity_dot_account_dot_account__service__pb2.ChangePasswordRequest.SerializeToString,
            apexnova_dot_identity_dot_account_dot_account__service__pb2.ChangePasswordResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
