# -*- coding: utf-8 -*-
# **********************************************************************
#
# Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************
#
# Ice version 3.6.4
#
# <auto-generated>
#
# Generated from file `Admin.ice'
#
# Warning: do not edit this file.
#
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import omero_Collections_ice
import omero_System_ice
import omero_cmd_API_ice

# Included module omero
_M_omero = Ice.openModule('omero')

# Included module omero.model
_M_omero.model = Ice.openModule('omero.model')

# Included module Ice
_M_Ice = Ice.openModule('Ice')

# Included module omero.sys
_M_omero.sys = Ice.openModule('omero.sys')

# Included module omero.api
_M_omero.api = Ice.openModule('omero.api')

# Included module Glacier2
_M_Glacier2 = Ice.openModule('Glacier2')

# Included module omero.cmd
_M_omero.cmd = Ice.openModule('omero.cmd')

# Start of module omero
__name__ = 'omero'

# Start of module omero.cmd
__name__ = 'omero.cmd'

if 'ResetPasswordRequest' not in _M_omero.cmd.__dict__:
    _M_omero.cmd.ResetPasswordRequest = Ice.createTempClass()
    class ResetPasswordRequest(_M_omero.cmd.Request):
        """
        Requests a reset password for the given user.
        The user must not be an administrator.
        examples:
        - omero.cmd.ResetPasswordRequest(omename, email)
        sends new password to the given user
        """
        def __init__(self, omename='', email=''):
            _M_omero.cmd.Request.__init__(self)
            self.omename = omename
            self.email = email

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::omero::cmd::Request', '::omero::cmd::ResetPasswordRequest')

        def ice_id(self, current=None):
            return '::omero::cmd::ResetPasswordRequest'

        def ice_staticId():
            return '::omero::cmd::ResetPasswordRequest'
        ice_staticId = staticmethod(ice_staticId)

        def __str__(self):
            return IcePy.stringify(self, _M_omero.cmd._t_ResetPasswordRequest)

        __repr__ = __str__

    _M_omero.cmd.ResetPasswordRequestPrx = Ice.createTempClass()
    class ResetPasswordRequestPrx(_M_omero.cmd.RequestPrx):

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_omero.cmd.ResetPasswordRequestPrx.ice_checkedCast(proxy, '::omero::cmd::ResetPasswordRequest', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_omero.cmd.ResetPasswordRequestPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

        def ice_staticId():
            return '::omero::cmd::ResetPasswordRequest'
        ice_staticId = staticmethod(ice_staticId)

    _M_omero.cmd._t_ResetPasswordRequestPrx = IcePy.defineProxy('::omero::cmd::ResetPasswordRequest', ResetPasswordRequestPrx)

    _M_omero.cmd._t_ResetPasswordRequest = IcePy.defineClass('::omero::cmd::ResetPasswordRequest', ResetPasswordRequest, -1, (), False, False, _M_omero.cmd._t_Request, (), (
        ('omename', (), IcePy._t_string, False, 0),
        ('email', (), IcePy._t_string, False, 0)
    ))
    ResetPasswordRequest._ice_type = _M_omero.cmd._t_ResetPasswordRequest

    _M_omero.cmd.ResetPasswordRequest = ResetPasswordRequest
    del ResetPasswordRequest

    _M_omero.cmd.ResetPasswordRequestPrx = ResetPasswordRequestPrx
    del ResetPasswordRequestPrx

if 'ResetPasswordResponse' not in _M_omero.cmd.__dict__:
    _M_omero.cmd.ResetPasswordResponse = Ice.createTempClass()
    class ResetPasswordResponse(_M_omero.cmd.OK):
        """
        Successful response for ResetPasswordRequest.
        If no valid user with matching email is found,
        an ERR will be returned.
        """
        def __init__(self):
            _M_omero.cmd.OK.__init__(self)

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::omero::cmd::OK', '::omero::cmd::ResetPasswordResponse', '::omero::cmd::Response')

        def ice_id(self, current=None):
            return '::omero::cmd::ResetPasswordResponse'

        def ice_staticId():
            return '::omero::cmd::ResetPasswordResponse'
        ice_staticId = staticmethod(ice_staticId)

        def __str__(self):
            return IcePy.stringify(self, _M_omero.cmd._t_ResetPasswordResponse)

        __repr__ = __str__

    _M_omero.cmd.ResetPasswordResponsePrx = Ice.createTempClass()
    class ResetPasswordResponsePrx(_M_omero.cmd.OKPrx):

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_omero.cmd.ResetPasswordResponsePrx.ice_checkedCast(proxy, '::omero::cmd::ResetPasswordResponse', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_omero.cmd.ResetPasswordResponsePrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

        def ice_staticId():
            return '::omero::cmd::ResetPasswordResponse'
        ice_staticId = staticmethod(ice_staticId)

    _M_omero.cmd._t_ResetPasswordResponsePrx = IcePy.defineProxy('::omero::cmd::ResetPasswordResponse', ResetPasswordResponsePrx)

    _M_omero.cmd._t_ResetPasswordResponse = IcePy.defineClass('::omero::cmd::ResetPasswordResponse', ResetPasswordResponse, -1, (), False, False, _M_omero.cmd._t_OK, (), ())
    ResetPasswordResponse._ice_type = _M_omero.cmd._t_ResetPasswordResponse

    _M_omero.cmd.ResetPasswordResponse = ResetPasswordResponse
    del ResetPasswordResponse

    _M_omero.cmd.ResetPasswordResponsePrx = ResetPasswordResponsePrx
    del ResetPasswordResponsePrx

if 'UpdateSessionTimeoutRequest' not in _M_omero.cmd.__dict__:
    _M_omero.cmd.UpdateSessionTimeoutRequest = Ice.createTempClass()
    class UpdateSessionTimeoutRequest(_M_omero.cmd.Request):
        """
        Proposes a change to one or both of the timeToLive
        and timeToIdle properties of a live session. The session
        uuid cannot be null. If either other argument is null,
        it will be ignored. Otherwise, the long value will be
        interpreted as the the millisecond value which should
        be set. Non-administrators will not be able to reduce
        current values. No special response is returned, but
        an omero.cmd.OK counts as success.
        """
        def __init__(self, session='', timeToLive=None, timeToIdle=None):
            _M_omero.cmd.Request.__init__(self)
            self.session = session
            self.timeToLive = timeToLive
            self.timeToIdle = timeToIdle

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::omero::cmd::Request', '::omero::cmd::UpdateSessionTimeoutRequest')

        def ice_id(self, current=None):
            return '::omero::cmd::UpdateSessionTimeoutRequest'

        def ice_staticId():
            return '::omero::cmd::UpdateSessionTimeoutRequest'
        ice_staticId = staticmethod(ice_staticId)

        def __str__(self):
            return IcePy.stringify(self, _M_omero.cmd._t_UpdateSessionTimeoutRequest)

        __repr__ = __str__

    _M_omero.cmd.UpdateSessionTimeoutRequestPrx = Ice.createTempClass()
    class UpdateSessionTimeoutRequestPrx(_M_omero.cmd.RequestPrx):

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_omero.cmd.UpdateSessionTimeoutRequestPrx.ice_checkedCast(proxy, '::omero::cmd::UpdateSessionTimeoutRequest', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_omero.cmd.UpdateSessionTimeoutRequestPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

        def ice_staticId():
            return '::omero::cmd::UpdateSessionTimeoutRequest'
        ice_staticId = staticmethod(ice_staticId)

    _M_omero.cmd._t_UpdateSessionTimeoutRequestPrx = IcePy.defineProxy('::omero::cmd::UpdateSessionTimeoutRequest', UpdateSessionTimeoutRequestPrx)

    _M_omero.cmd._t_UpdateSessionTimeoutRequest = IcePy.declareClass('::omero::cmd::UpdateSessionTimeoutRequest')

    _M_omero.cmd._t_UpdateSessionTimeoutRequest = IcePy.defineClass('::omero::cmd::UpdateSessionTimeoutRequest', UpdateSessionTimeoutRequest, -1, (), False, False, _M_omero.cmd._t_Request, (), (
        ('session', (), IcePy._t_string, False, 0),
        ('timeToLive', (), _M_omero._t_RLong, False, 0),
        ('timeToIdle', (), _M_omero._t_RLong, False, 0)
    ))
    UpdateSessionTimeoutRequest._ice_type = _M_omero.cmd._t_UpdateSessionTimeoutRequest

    _M_omero.cmd.UpdateSessionTimeoutRequest = UpdateSessionTimeoutRequest
    del UpdateSessionTimeoutRequest

    _M_omero.cmd.UpdateSessionTimeoutRequestPrx = UpdateSessionTimeoutRequestPrx
    del UpdateSessionTimeoutRequestPrx

if 'CurrentSessionsRequest' not in _M_omero.cmd.__dict__:
    _M_omero.cmd.CurrentSessionsRequest = Ice.createTempClass()
    class CurrentSessionsRequest(_M_omero.cmd.Request):
        """
        Argument-less request that will produce a
        CurrentSessionsResponse if no omero.cmd.ERR occurs.
        """
        def __init__(self):
            _M_omero.cmd.Request.__init__(self)

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::omero::cmd::CurrentSessionsRequest', '::omero::cmd::Request')

        def ice_id(self, current=None):
            return '::omero::cmd::CurrentSessionsRequest'

        def ice_staticId():
            return '::omero::cmd::CurrentSessionsRequest'
        ice_staticId = staticmethod(ice_staticId)

        def __str__(self):
            return IcePy.stringify(self, _M_omero.cmd._t_CurrentSessionsRequest)

        __repr__ = __str__

    _M_omero.cmd.CurrentSessionsRequestPrx = Ice.createTempClass()
    class CurrentSessionsRequestPrx(_M_omero.cmd.RequestPrx):

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_omero.cmd.CurrentSessionsRequestPrx.ice_checkedCast(proxy, '::omero::cmd::CurrentSessionsRequest', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_omero.cmd.CurrentSessionsRequestPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

        def ice_staticId():
            return '::omero::cmd::CurrentSessionsRequest'
        ice_staticId = staticmethod(ice_staticId)

    _M_omero.cmd._t_CurrentSessionsRequestPrx = IcePy.defineProxy('::omero::cmd::CurrentSessionsRequest', CurrentSessionsRequestPrx)

    _M_omero.cmd._t_CurrentSessionsRequest = IcePy.defineClass('::omero::cmd::CurrentSessionsRequest', CurrentSessionsRequest, -1, (), False, False, _M_omero.cmd._t_Request, (), ())
    CurrentSessionsRequest._ice_type = _M_omero.cmd._t_CurrentSessionsRequest

    _M_omero.cmd.CurrentSessionsRequest = CurrentSessionsRequest
    del CurrentSessionsRequest

    _M_omero.cmd.CurrentSessionsRequestPrx = CurrentSessionsRequestPrx
    del CurrentSessionsRequestPrx

if 'CurrentSessionsResponse' not in _M_omero.cmd.__dict__:
    _M_omero.cmd.CurrentSessionsResponse = Ice.createTempClass()
    class CurrentSessionsResponse(_M_omero.cmd.OK):
        """
        Return value from omero.cmd.CurrentSessionsRequest
        consisting of two ordered lists of matching length. The sessions
        field contains a list of the OMERO omero.model.Session
        objects that are currently active *after* all timeouts have been
        applied.
        This is the value that would be returned by
        {@code omero.api.ISession.getSession} when joined to that session.
        Similarly, the contexts field contains the value that would be
        returned by a call to {@code omero.api.IAdmin.getEventContext}.
        For non-administrators, most values for all sessions other than
        those belonging to that user will be null.
        Members:
        sessions -- omero.model.Session objects loaded from
        the database.
        contexts -- omero.sys.EventContext objects stored in
        memory by the server.
        data -- Other session state which may vary based on
        usage. This may include "hitCount", "lastAccess",
        and similar metrics.
        """
        def __init__(self, sessions=None, contexts=None, data=None):
            _M_omero.cmd.OK.__init__(self)
            self.sessions = sessions
            self.contexts = contexts
            self.data = data

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::omero::cmd::CurrentSessionsResponse', '::omero::cmd::OK', '::omero::cmd::Response')

        def ice_id(self, current=None):
            return '::omero::cmd::CurrentSessionsResponse'

        def ice_staticId():
            return '::omero::cmd::CurrentSessionsResponse'
        ice_staticId = staticmethod(ice_staticId)

        def __str__(self):
            return IcePy.stringify(self, _M_omero.cmd._t_CurrentSessionsResponse)

        __repr__ = __str__

    _M_omero.cmd.CurrentSessionsResponsePrx = Ice.createTempClass()
    class CurrentSessionsResponsePrx(_M_omero.cmd.OKPrx):

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_omero.cmd.CurrentSessionsResponsePrx.ice_checkedCast(proxy, '::omero::cmd::CurrentSessionsResponse', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_omero.cmd.CurrentSessionsResponsePrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

        def ice_staticId():
            return '::omero::cmd::CurrentSessionsResponse'
        ice_staticId = staticmethod(ice_staticId)

    _M_omero.cmd._t_CurrentSessionsResponsePrx = IcePy.defineProxy('::omero::cmd::CurrentSessionsResponse', CurrentSessionsResponsePrx)

    _M_omero.cmd._t_CurrentSessionsResponse = IcePy.declareClass('::omero::cmd::CurrentSessionsResponse')

    _M_omero.cmd._t_CurrentSessionsResponse = IcePy.defineClass('::omero::cmd::CurrentSessionsResponse', CurrentSessionsResponse, -1, (), False, False, _M_omero.cmd._t_OK, (), (
        ('sessions', (), _M_omero.api._t_SessionList, False, 0),
        ('contexts', (), _M_omero.api._t_EventContextList, False, 0),
        ('data', (), _M_omero.api._t_RTypeDictArray, False, 0)
    ))
    CurrentSessionsResponse._ice_type = _M_omero.cmd._t_CurrentSessionsResponse

    _M_omero.cmd.CurrentSessionsResponse = CurrentSessionsResponse
    del CurrentSessionsResponse

    _M_omero.cmd.CurrentSessionsResponsePrx = CurrentSessionsResponsePrx
    del CurrentSessionsResponsePrx

# End of module omero.cmd

__name__ = 'omero'

# End of module omero
