# -*- coding: utf-8 -*-
#
# Copyright (c) ZeroC, Inc. All rights reserved.
#
#
# Ice version 3.7.8
#
# <auto-generated>
#
# Generated from file `UserAccountMapper.ice'
#
# Warning: do not edit this file.
#
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module IceGrid
_M_IceGrid = Ice.openModule('IceGrid')
__name__ = 'IceGrid'

if 'UserAccountNotFoundException' not in _M_IceGrid.__dict__:
    _M_IceGrid.UserAccountNotFoundException = Ice.createTempClass()
    class UserAccountNotFoundException(Ice.UserException):
        """
        This exception is raised if a user account for a given session
        identifier can't be found.
        """
        def __init__(self):
            pass

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

        _ice_id = '::IceGrid::UserAccountNotFoundException'

    _M_IceGrid._t_UserAccountNotFoundException = IcePy.defineException('::IceGrid::UserAccountNotFoundException', UserAccountNotFoundException, (), False, None, ())
    UserAccountNotFoundException._ice_type = _M_IceGrid._t_UserAccountNotFoundException

    _M_IceGrid.UserAccountNotFoundException = UserAccountNotFoundException
    del UserAccountNotFoundException

_M_IceGrid._t_UserAccountMapper = IcePy.defineValue('::IceGrid::UserAccountMapper', Ice.Value, -1, (), False, True, None, ())

if 'UserAccountMapperPrx' not in _M_IceGrid.__dict__:
    _M_IceGrid.UserAccountMapperPrx = Ice.createTempClass()
    class UserAccountMapperPrx(Ice.ObjectPrx):

        """
        Get the name of the user account for the given user. This is
        used by IceGrid nodes to figure out the user account to use
        to run servers.
        Arguments:
        user -- The value of the server descriptor's user attribute. If this attribute is not defined, and the server's activation mode is session, the default value of user is the session identifier.
        context -- The request context for the invocation.
        Returns: The user account name.
        Throws:
        UserAccountNotFoundException -- Raised if no user account is found for the given user.
        """
        def getUserAccount(self, user, context=None):
            return _M_IceGrid.UserAccountMapper._op_getUserAccount.invoke(self, ((user, ), context))

        """
        Get the name of the user account for the given user. This is
        used by IceGrid nodes to figure out the user account to use
        to run servers.
        Arguments:
        user -- The value of the server descriptor's user attribute. If this attribute is not defined, and the server's activation mode is session, the default value of user is the session identifier.
        context -- The request context for the invocation.
        Returns: A future object for the invocation.
        """
        def getUserAccountAsync(self, user, context=None):
            return _M_IceGrid.UserAccountMapper._op_getUserAccount.invokeAsync(self, ((user, ), context))

        """
        Get the name of the user account for the given user. This is
        used by IceGrid nodes to figure out the user account to use
        to run servers.
        Arguments:
        user -- The value of the server descriptor's user attribute. If this attribute is not defined, and the server's activation mode is session, the default value of user is the session identifier.
        _response -- The asynchronous response callback.
        _ex -- The asynchronous exception callback.
        _sent -- The asynchronous sent callback.
        context -- The request context for the invocation.
        Returns: An asynchronous result object for the invocation.
        """
        def begin_getUserAccount(self, user, _response=None, _ex=None, _sent=None, context=None):
            return _M_IceGrid.UserAccountMapper._op_getUserAccount.begin(self, ((user, ), _response, _ex, _sent, context))

        """
        Get the name of the user account for the given user. This is
        used by IceGrid nodes to figure out the user account to use
        to run servers.
        Arguments:
        user -- The value of the server descriptor's user attribute. If this attribute is not defined, and the server's activation mode is session, the default value of user is the session identifier.
        Returns: The user account name.
        Throws:
        UserAccountNotFoundException -- Raised if no user account is found for the given user.
        """
        def end_getUserAccount(self, _r):
            return _M_IceGrid.UserAccountMapper._op_getUserAccount.end(self, _r)

        @staticmethod
        def checkedCast(proxy, facetOrContext=None, context=None):
            return _M_IceGrid.UserAccountMapperPrx.ice_checkedCast(proxy, '::IceGrid::UserAccountMapper', facetOrContext, context)

        @staticmethod
        def uncheckedCast(proxy, facet=None):
            return _M_IceGrid.UserAccountMapperPrx.ice_uncheckedCast(proxy, facet)

        @staticmethod
        def ice_staticId():
            return '::IceGrid::UserAccountMapper'
    _M_IceGrid._t_UserAccountMapperPrx = IcePy.defineProxy('::IceGrid::UserAccountMapper', UserAccountMapperPrx)

    _M_IceGrid.UserAccountMapperPrx = UserAccountMapperPrx
    del UserAccountMapperPrx

    _M_IceGrid.UserAccountMapper = Ice.createTempClass()
    class UserAccountMapper(Ice.Object):

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::IceGrid::UserAccountMapper')

        def ice_id(self, current=None):
            return '::IceGrid::UserAccountMapper'

        @staticmethod
        def ice_staticId():
            return '::IceGrid::UserAccountMapper'

        def getUserAccount(self, user, current=None):
            """
            Get the name of the user account for the given user. This is
            used by IceGrid nodes to figure out the user account to use
            to run servers.
            Arguments:
            user -- The value of the server descriptor's user attribute. If this attribute is not defined, and the server's activation mode is session, the default value of user is the session identifier.
            current -- The Current object for the invocation.
            Returns: A future object for the invocation.
            Throws:
            UserAccountNotFoundException -- Raised if no user account is found for the given user.
            """
            raise NotImplementedError("servant method 'getUserAccount' not implemented")

        def __str__(self):
            return IcePy.stringify(self, _M_IceGrid._t_UserAccountMapperDisp)

        __repr__ = __str__

    _M_IceGrid._t_UserAccountMapperDisp = IcePy.defineClass('::IceGrid::UserAccountMapper', UserAccountMapper, (), None, ())
    UserAccountMapper._ice_type = _M_IceGrid._t_UserAccountMapperDisp

    UserAccountMapper._op_getUserAccount = IcePy.Operation('getUserAccount', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), IcePy._t_string, False, 0),), (), ((), IcePy._t_string, False, 0), (_M_IceGrid._t_UserAccountNotFoundException,))

    _M_IceGrid.UserAccountMapper = UserAccountMapper
    del UserAccountMapper

# End of module IceGrid

Ice.sliceChecksums["::IceGrid::UserAccountMapper"] = "779fd561878e199444e04cdebaf9ffd4"
Ice.sliceChecksums["::IceGrid::UserAccountNotFoundException"] = "fe2dc4d87f21b9b2cf6f1339d1666281"
