# Copyright (C) 2008-2010 Oracle Corporation
#
# This file is part of a free software library; you can redistribute
# it and/or modify it under the terms of the GNU Lesser General
# Public License version 2.1 as published by the Free Software
# Foundation and shipped in the "COPYING.LIB" file with this library.
# The library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY of any kind.
#
# Oracle LGPL Disclaimer: For the avoidance of doubt, except that if
# any license choice other than GPL or LGPL is available it will
# apply instead, Oracle elects to use only the Lesser General Public
# License version 2.1 (LGPLv2) at this time for any software where
# a choice of LGPL license versions is made available with the
# language indicating that LGPLv2 or any later version may be used,
# or where a choice of which version of the LGPL is applied is
# otherwise unspecified.
#
# This file is autogenerated from VirtualBox.xidl, DO NOT EDIT!
#
from VirtualBox_services import *

class ManagedManager:
  def __init__(self):
     self.map = {}

  def register(self,handle):
     if handle == None:
        return
     c = self.map.get(handle,0)
     c = c + 1
     self.map[handle]=c

  def unregister(self,handle):
     if handle == None:
        return
     c = self.map.get(handle,-1)
     if c == -1:
        raise Error, 'wrong refcount'
     c = c - 1
     if c == 0:
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass
        self.map[handle] = -1
     else:
        self.map[handle] = c

class String:
  def __init__(self, mgr, handle, isarray = False):
      self.handle = handle
      self.mgr = mgr
      self.isarray = isarray

  def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

  def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

  def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

  def __getitem__(self, index):
      if self.isarray:
          return String(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

  def __str__(self):
      return str(self.handle)

  def __eq__(self,other):
      if self.isarray:
         return isinstance(other,String) and self.handle == other.handle
      if isinstance(other,String):
         return self.handle == other.handle
      if isinstance(other,basestring):
         return self.handle == other
      return False

  def __ne__(self,other):
      if self.isarray:
         return not isinstance(other,String) or self.handle != other.handle
      if isinstance(other,String):
         return self.handle != other.handle
      if isinstance(other,basestring):
         return self.handle != other
      return True

  def __add__(self,other):
      return str(self.handle)+str(other)


class Boolean:
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       if self.handle == "false":
          self.handle = None
       self.mgr = mgr
       self.isarray = isarray

  def __str__(self):
       if self.handle:
         return "true"
       else:
         return "false"

  def __eq__(self,other):
      if isinstance(other,Bool):
         return self.handle == other.value
      if isinstance(other,bool):
         return self.handle == other
      return False

  def __ne__(self,other):
      if isinstance(other,Bool):
         return self.handle != other.handle
      if isinstance(other,bool):
         return self.handle != other
      return True

  def __int__(self):
      if self.handle:
        return 1
      else:
        return 0

  def __long__(self):
      if self.handle:
        return 1
      else:
        return 0

  def __nonzero__(self):
      if self.handle:
        return True
      else:
        return False

  def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

  def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

  def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

  def __getitem__(self, index):
      if self.isarray:
          return Boolean(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

class Number:
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

  def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

  def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

  def __str__(self):
       return str(self.handle)

  def __int__(self):
       return int(self.handle)

  def __long__(self):
       return long(self.handle)

  def __float__(self):
       return float(self.handle)

  def __lt__(self, other):
       if self.isarray:
            return NotImplemented
       else:
            return self.handle < other

  def __le__(self, other):
       if self.isarray:
            return NotImplemented
       else:
            return self.handle <= other

  def __eq__(self, other):
       return self.handle == other

  def __ne__(self, other):
       return self.handle != other

  def __gt__(self, other):
       if self.isarray:
            return NotImplemented
       else:
            return self.handle > other

  def __ge__(self, other):
       if self.isarray:
            return NotImplemented
       else:
            return self.handle >= other

import struct

class Octet(Number):
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __getitem__(self, index):
      if self.isarray:
          return Octet(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

  def __str__(self):
       if self.isarray:
           # array of octets is binary data
           list = map (None, self.handle)
           return struct.pack("%dB" % (len(list)), *list)
       else:
           return str(self.handle)

class UnsignedInt(Number):
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __getitem__(self, index):
      if self.isarray:
          return UnsignedInt(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"


class Int(Number):
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __getitem__(self, index):
      if self.isarray:
          return Int(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

class UnsignedShort(Number):
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __getitem__(self, index):
      if self.isarray:
          return UnsignedShort(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

class Short(Number):
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __getitem__(self, index):
      if self.isarray:
          return Short(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

class UnsignedLong(Number):
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __getitem__(self, index):
      if self.isarray:
          return UnsignedLong(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

class Long(Number):
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __getitem__(self, index):
      if self.isarray:
          return Long(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

class Double(Number):
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __getitem__(self, index):
      if self.isarray:
          return Double(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

class Float(Number):
  def __init__(self, mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __getitem__(self, index):
      if self.isarray:
          return Float(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

class IUnknown:
  def __init__(self,  mgr, handle, isarray = False):
       self.handle = handle
       self.mgr = mgr
       self.isarray = isarray

  def __nonzero__(self):
      if self.handle != "":
           return True
      else:
           return False

  def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

  def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

  def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

  def __getitem__(self, index):
      if self.isarray:
          return IUnknown(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

  def __str__(self):
       return str(self.handle)

  def __eq__(self, other):
       return self.handle == other

  def __ne__(self, other):
       return self.handle != other

  def __getattr__(self,attr):
       if self.__class__.__dict__.get(attr) != None:
           return self.__class__.__dict__.get(attr)
       if self.__dict__.get(attr) != None:
           return self.__dict__.get(attr)
       raise AttributeError



class IVirtualBoxErrorInfo(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IVirtualBoxErrorInfo(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IVirtualBoxErrorInfo._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IVirtualBoxErrorInfo._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getResultCode(self):
       req=IVirtualBoxErrorInfo_getResultCodeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBoxErrorInfo_getResultCode(req)
       return  Int(self.mgr,val._returnval)
   def getInterfaceID(self):
       req=IVirtualBoxErrorInfo_getInterfaceIDRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBoxErrorInfo_getInterfaceID(req)
       return  String(self.mgr,val._returnval)
   def getComponent(self):
       req=IVirtualBoxErrorInfo_getComponentRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBoxErrorInfo_getComponent(req)
       return  String(self.mgr,val._returnval)
   def getText(self):
       req=IVirtualBoxErrorInfo_getTextRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBoxErrorInfo_getText(req)
       return  String(self.mgr,val._returnval)
   def getNext(self):
       req=IVirtualBoxErrorInfo_getNextRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBoxErrorInfo_getNext(req)
       return  IVirtualBoxErrorInfo(self.mgr,val._returnval)


   _Attrs_={         'resultCode':[getResultCode,None],
         'interfaceID':[getInterfaceID,None],
         'component':[getComponent,None],
         'text':[getText,None],
         'next':[getNext,None]}

class IDHCPServer(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IDHCPServer(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IDHCPServer._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IDHCPServer._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def setConfiguration(self, _arg_IPAddress, _arg_networkMask, _arg_FromIPAddress, _arg_ToIPAddress):
       req=IDHCPServer_setConfigurationRequestMsg()
       req._this=self.handle
       
       req._IPAddress=_arg_IPAddress
       req._networkMask=_arg_networkMask
       req._FromIPAddress=_arg_FromIPAddress
       req._ToIPAddress=_arg_ToIPAddress
       val=self.mgr.getPort().IDHCPServer_setConfiguration(req)
       
       return 


   def start(self, _arg_networkName, _arg_trunkName, _arg_trunkType):
       req=IDHCPServer_startRequestMsg()
       req._this=self.handle
       
       req._networkName=_arg_networkName
       req._trunkName=_arg_trunkName
       req._trunkType=_arg_trunkType
       val=self.mgr.getPort().IDHCPServer_start(req)
       
       return 


   def stop(self):
       req=IDHCPServer_stopRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IDHCPServer_stop(req)
       
       return 


   def getEnabled(self):
       req=IDHCPServer_getEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IDHCPServer_getEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setEnabled(self, value):
       req=IDHCPServer_setEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._enabled = value
       else:
            req._enabled = value.handle
       self.mgr.getPort().IDHCPServer_setEnabled(req)

   def getIPAddress(self):
       req=IDHCPServer_getIPAddressRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IDHCPServer_getIPAddress(req)
       return  String(self.mgr,val._returnval)
   def getNetworkMask(self):
       req=IDHCPServer_getNetworkMaskRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IDHCPServer_getNetworkMask(req)
       return  String(self.mgr,val._returnval)
   def getNetworkName(self):
       req=IDHCPServer_getNetworkNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IDHCPServer_getNetworkName(req)
       return  String(self.mgr,val._returnval)
   def getLowerIP(self):
       req=IDHCPServer_getLowerIPRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IDHCPServer_getLowerIP(req)
       return  String(self.mgr,val._returnval)
   def getUpperIP(self):
       req=IDHCPServer_getUpperIPRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IDHCPServer_getUpperIP(req)
       return  String(self.mgr,val._returnval)


   _Attrs_={         'enabled':[getEnabled,setEnabled,
        ],
         'IPAddress':[getIPAddress,None],
         'networkMask':[getNetworkMask,None],
         'networkName':[getNetworkName,None],
         'lowerIP':[getLowerIP,None],
         'upperIP':[getUpperIP,None]}

class IVirtualBox(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IVirtualBox(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IVirtualBox._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IVirtualBox._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def createMachine(self, _arg_name, _arg_osTypeId, _arg_baseFolder, _arg_id, _arg_override):
       req=IVirtualBox_createMachineRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._osTypeId=_arg_osTypeId
       req._baseFolder=_arg_baseFolder
       req._id=_arg_id
       req._override=_arg_override
       val=self.mgr.getPort().IVirtualBox_createMachine(req)
       
       return IMachine(self.mgr,val._returnval)


   def createLegacyMachine(self, _arg_name, _arg_osTypeId, _arg_settingsFile, _arg_id):
       req=IVirtualBox_createLegacyMachineRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._osTypeId=_arg_osTypeId
       req._settingsFile=_arg_settingsFile
       req._id=_arg_id
       val=self.mgr.getPort().IVirtualBox_createLegacyMachine(req)
       
       return IMachine(self.mgr,val._returnval)


   def openMachine(self, _arg_settingsFile):
       req=IVirtualBox_openMachineRequestMsg()
       req._this=self.handle
       
       req._settingsFile=_arg_settingsFile
       val=self.mgr.getPort().IVirtualBox_openMachine(req)
       
       return IMachine(self.mgr,val._returnval)


   def registerMachine(self, _arg_machine):
       req=IVirtualBox_registerMachineRequestMsg()
       req._this=self.handle
       
       req._machine=_arg_machine
       val=self.mgr.getPort().IVirtualBox_registerMachine(req)
       
       return 


   def getMachine(self, _arg_id):
       req=IVirtualBox_getMachineRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IVirtualBox_getMachine(req)
       
       return IMachine(self.mgr,val._returnval)


   def findMachine(self, _arg_name):
       req=IVirtualBox_findMachineRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IVirtualBox_findMachine(req)
       
       return IMachine(self.mgr,val._returnval)


   def unregisterMachine(self, _arg_id):
       req=IVirtualBox_unregisterMachineRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IVirtualBox_unregisterMachine(req)
       
       return IMachine(self.mgr,val._returnval)


   def createAppliance(self):
       req=IVirtualBox_createApplianceRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IVirtualBox_createAppliance(req)
       
       return IAppliance(self.mgr,val._returnval)


   def createHardDisk(self, _arg_format, _arg_location):
       req=IVirtualBox_createHardDiskRequestMsg()
       req._this=self.handle
       
       req._format=_arg_format
       req._location=_arg_location
       val=self.mgr.getPort().IVirtualBox_createHardDisk(req)
       
       return IMedium(self.mgr,val._returnval)


   def openHardDisk(self, _arg_location, _arg_accessMode, _arg_setImageId, _arg_imageId, _arg_setParentId, _arg_parentId):
       req=IVirtualBox_openHardDiskRequestMsg()
       req._this=self.handle
       
       req._location=_arg_location
       req._accessMode=_arg_accessMode
       req._setImageId=_arg_setImageId
       req._imageId=_arg_imageId
       req._setParentId=_arg_setParentId
       req._parentId=_arg_parentId
       val=self.mgr.getPort().IVirtualBox_openHardDisk(req)
       
       return IMedium(self.mgr,val._returnval)


   def getHardDisk(self, _arg_id):
       req=IVirtualBox_getHardDiskRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IVirtualBox_getHardDisk(req)
       
       return IMedium(self.mgr,val._returnval)


   def findHardDisk(self, _arg_location):
       req=IVirtualBox_findHardDiskRequestMsg()
       req._this=self.handle
       
       req._location=_arg_location
       val=self.mgr.getPort().IVirtualBox_findHardDisk(req)
       
       return IMedium(self.mgr,val._returnval)


   def openDVDImage(self, _arg_location, _arg_id):
       req=IVirtualBox_openDVDImageRequestMsg()
       req._this=self.handle
       
       req._location=_arg_location
       req._id=_arg_id
       val=self.mgr.getPort().IVirtualBox_openDVDImage(req)
       
       return IMedium(self.mgr,val._returnval)


   def getDVDImage(self, _arg_id):
       req=IVirtualBox_getDVDImageRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IVirtualBox_getDVDImage(req)
       
       return IMedium(self.mgr,val._returnval)


   def findDVDImage(self, _arg_location):
       req=IVirtualBox_findDVDImageRequestMsg()
       req._this=self.handle
       
       req._location=_arg_location
       val=self.mgr.getPort().IVirtualBox_findDVDImage(req)
       
       return IMedium(self.mgr,val._returnval)


   def openFloppyImage(self, _arg_location, _arg_id):
       req=IVirtualBox_openFloppyImageRequestMsg()
       req._this=self.handle
       
       req._location=_arg_location
       req._id=_arg_id
       val=self.mgr.getPort().IVirtualBox_openFloppyImage(req)
       
       return IMedium(self.mgr,val._returnval)


   def getFloppyImage(self, _arg_id):
       req=IVirtualBox_getFloppyImageRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IVirtualBox_getFloppyImage(req)
       
       return IMedium(self.mgr,val._returnval)


   def findFloppyImage(self, _arg_location):
       req=IVirtualBox_findFloppyImageRequestMsg()
       req._this=self.handle
       
       req._location=_arg_location
       val=self.mgr.getPort().IVirtualBox_findFloppyImage(req)
       
       return IMedium(self.mgr,val._returnval)


   def getGuestOSType(self, _arg_id):
       req=IVirtualBox_getGuestOSTypeRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IVirtualBox_getGuestOSType(req)
       
       return IGuestOSType(self.mgr,val._returnval)


   def createSharedFolder(self, _arg_name, _arg_hostPath, _arg_writable):
       req=IVirtualBox_createSharedFolderRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._hostPath=_arg_hostPath
       req._writable=_arg_writable
       val=self.mgr.getPort().IVirtualBox_createSharedFolder(req)
       
       return 


   def removeSharedFolder(self, _arg_name):
       req=IVirtualBox_removeSharedFolderRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IVirtualBox_removeSharedFolder(req)
       
       return 


   def getExtraDataKeys(self):
       req=IVirtualBox_getExtraDataKeysRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IVirtualBox_getExtraDataKeys(req)
       
       return String(self.mgr,val._returnval, True)


   def getExtraData(self, _arg_key):
       req=IVirtualBox_getExtraDataRequestMsg()
       req._this=self.handle
       
       req._key=_arg_key
       val=self.mgr.getPort().IVirtualBox_getExtraData(req)
       
       return String(self.mgr,val._returnval)


   def setExtraData(self, _arg_key, _arg_value):
       req=IVirtualBox_setExtraDataRequestMsg()
       req._this=self.handle
       
       req._key=_arg_key
       req._value=_arg_value
       val=self.mgr.getPort().IVirtualBox_setExtraData(req)
       
       return 


   def openSession(self, _arg_session, _arg_machineId):
       req=IVirtualBox_openSessionRequestMsg()
       req._this=self.handle
       
       req._session=_arg_session
       req._machineId=_arg_machineId
       val=self.mgr.getPort().IVirtualBox_openSession(req)
       
       return 


   def openRemoteSession(self, _arg_session, _arg_machineId, _arg_type, _arg_environment):
       req=IVirtualBox_openRemoteSessionRequestMsg()
       req._this=self.handle
       
       req._session=_arg_session
       req._machineId=_arg_machineId
       req._type=_arg_type
       req._environment=_arg_environment
       val=self.mgr.getPort().IVirtualBox_openRemoteSession(req)
       
       return IProgress(self.mgr,val._returnval)


   def openExistingSession(self, _arg_session, _arg_machineId):
       req=IVirtualBox_openExistingSessionRequestMsg()
       req._this=self.handle
       
       req._session=_arg_session
       req._machineId=_arg_machineId
       val=self.mgr.getPort().IVirtualBox_openExistingSession(req)
       
       return 


   def registerCallback(self, _arg_callback):
       req=IVirtualBox_registerCallbackRequestMsg()
       req._this=self.handle
       
       req._callback=_arg_callback
       val=self.mgr.getPort().IVirtualBox_registerCallback(req)
       
       return 


   def unregisterCallback(self, _arg_callback):
       req=IVirtualBox_unregisterCallbackRequestMsg()
       req._this=self.handle
       
       req._callback=_arg_callback
       val=self.mgr.getPort().IVirtualBox_unregisterCallback(req)
       
       return 


   def waitForPropertyChange(self, _arg_what, _arg_timeout):
       req=IVirtualBox_waitForPropertyChangeRequestMsg()
       req._this=self.handle
       
       req._what=_arg_what
       req._timeout=_arg_timeout
       val=self.mgr.getPort().IVirtualBox_waitForPropertyChange(req)
       
       return String(self.mgr,val._changed), String(self.mgr,val._values)


   def createDHCPServer(self, _arg_name):
       req=IVirtualBox_createDHCPServerRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IVirtualBox_createDHCPServer(req)
       
       return IDHCPServer(self.mgr,val._returnval)


   def findDHCPServerByNetworkName(self, _arg_name):
       req=IVirtualBox_findDHCPServerByNetworkNameRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IVirtualBox_findDHCPServerByNetworkName(req)
       
       return IDHCPServer(self.mgr,val._returnval)


   def removeDHCPServer(self, _arg_server):
       req=IVirtualBox_removeDHCPServerRequestMsg()
       req._this=self.handle
       
       req._server=_arg_server
       val=self.mgr.getPort().IVirtualBox_removeDHCPServer(req)
       
       return 


   def checkFirmwarePresent(self, _arg_firmwareType, _arg_version):
       req=IVirtualBox_checkFirmwarePresentRequestMsg()
       req._this=self.handle
       
       req._firmwareType=_arg_firmwareType
       req._version=_arg_version
       val=self.mgr.getPort().IVirtualBox_checkFirmwarePresent(req)
       
       return Boolean(self.mgr,val._returnval), String(self.mgr,val._url), String(self.mgr,val._file)


   def getVersion(self):
       req=IVirtualBox_getVersionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getVersion(req)
       return  String(self.mgr,val._returnval)
   def getRevision(self):
       req=IVirtualBox_getRevisionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getRevision(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getPackageType(self):
       req=IVirtualBox_getPackageTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getPackageType(req)
       return  String(self.mgr,val._returnval)
   def getHomeFolder(self):
       req=IVirtualBox_getHomeFolderRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getHomeFolder(req)
       return  String(self.mgr,val._returnval)
   def getSettingsFilePath(self):
       req=IVirtualBox_getSettingsFilePathRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getSettingsFilePath(req)
       return  String(self.mgr,val._returnval)
   def getHost(self):
       req=IVirtualBox_getHostRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getHost(req)
       return  IHost(self.mgr,val._returnval)
   def getSystemProperties(self):
       req=IVirtualBox_getSystemPropertiesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getSystemProperties(req)
       return  ISystemProperties(self.mgr,val._returnval)
   def getMachines(self):
       req=IVirtualBox_getMachinesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getMachines(req)
       return  IMachine(self.mgr,val._returnval, True)
   def getHardDisks(self):
       req=IVirtualBox_getHardDisksRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getHardDisks(req)
       return  IMedium(self.mgr,val._returnval, True)
   def getDVDImages(self):
       req=IVirtualBox_getDVDImagesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getDVDImages(req)
       return  IMedium(self.mgr,val._returnval, True)
   def getFloppyImages(self):
       req=IVirtualBox_getFloppyImagesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getFloppyImages(req)
       return  IMedium(self.mgr,val._returnval, True)
   def getProgressOperations(self):
       req=IVirtualBox_getProgressOperationsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getProgressOperations(req)
       return  IProgress(self.mgr,val._returnval, True)
   def getGuestOSTypes(self):
       req=IVirtualBox_getGuestOSTypesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getGuestOSTypes(req)
       return  IGuestOSType(self.mgr,val._returnval, True)
   def getSharedFolders(self):
       req=IVirtualBox_getSharedFoldersRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getSharedFolders(req)
       return  ISharedFolder(self.mgr,val._returnval, True)
   def getPerformanceCollector(self):
       req=IVirtualBox_getPerformanceCollectorRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getPerformanceCollector(req)
       return  IPerformanceCollector(self.mgr,val._returnval)
   def getDHCPServers(self):
       req=IVirtualBox_getDHCPServersRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualBox_getDHCPServers(req)
       return  IDHCPServer(self.mgr,val._returnval, True)


   _Attrs_={         'version':[getVersion,None],
         'revision':[getRevision,None],
         'packageType':[getPackageType,None],
         'homeFolder':[getHomeFolder,None],
         'settingsFilePath':[getSettingsFilePath,None],
         'host':[getHost,None],
         'systemProperties':[getSystemProperties,None],
         'machines':[getMachines,None],
         'hardDisks':[getHardDisks,None],
         'DVDImages':[getDVDImages,None],
         'floppyImages':[getFloppyImages,None],
         'progressOperations':[getProgressOperations,None],
         'guestOSTypes':[getGuestOSTypes,None],
         'sharedFolders':[getSharedFolders,None],
         'performanceCollector':[getPerformanceCollector,None],
         'DHCPServers':[getDHCPServers,None]}

class IVFSExplorer(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IVFSExplorer(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IVFSExplorer._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IVFSExplorer._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def update(self):
       req=IVFSExplorer_updateRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IVFSExplorer_update(req)
       
       return IProgress(self.mgr,val._returnval)


   def cd(self, _arg_aDir):
       req=IVFSExplorer_cdRequestMsg()
       req._this=self.handle
       
       req._aDir=_arg_aDir
       val=self.mgr.getPort().IVFSExplorer_cd(req)
       
       return IProgress(self.mgr,val._returnval)


   def cdUp(self):
       req=IVFSExplorer_cdUpRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IVFSExplorer_cdUp(req)
       
       return IProgress(self.mgr,val._returnval)


   def entryList(self):
       req=IVFSExplorer_entryListRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IVFSExplorer_entryList(req)
       
       return String(self.mgr,val._aNames, True), UnsignedInt(self.mgr,val._aTypes, True)


   def exists(self, _arg_aNames):
       req=IVFSExplorer_existsRequestMsg()
       req._this=self.handle
       
       req._aNames=_arg_aNames
       val=self.mgr.getPort().IVFSExplorer_exists(req)
       
       return String(self.mgr,val._returnval, True)


   def remove(self, _arg_aNames):
       req=IVFSExplorer_removeRequestMsg()
       req._this=self.handle
       
       req._aNames=_arg_aNames
       val=self.mgr.getPort().IVFSExplorer_remove(req)
       
       return IProgress(self.mgr,val._returnval)


   def getPath(self):
       req=IVFSExplorer_getPathRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVFSExplorer_getPath(req)
       return  String(self.mgr,val._returnval)
   def getType(self):
       req=IVFSExplorer_getTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVFSExplorer_getType(req)
       return  VFSType(self.mgr,val._returnval)


   _Attrs_={         'path':[getPath,None],
         'type':[getType,None]}

class IAppliance(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IAppliance(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IAppliance._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IAppliance._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def read(self, _arg_file):
       req=IAppliance_readRequestMsg()
       req._this=self.handle
       
       req._file=_arg_file
       val=self.mgr.getPort().IAppliance_read(req)
       
       return IProgress(self.mgr,val._returnval)


   def interpret(self):
       req=IAppliance_interpretRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IAppliance_interpret(req)
       
       return 


   def importMachines(self):
       req=IAppliance_importMachinesRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IAppliance_importMachines(req)
       
       return IProgress(self.mgr,val._returnval)


   def createVFSExplorer(self, _arg_aUri):
       req=IAppliance_createVFSExplorerRequestMsg()
       req._this=self.handle
       
       req._aUri=_arg_aUri
       val=self.mgr.getPort().IAppliance_createVFSExplorer(req)
       
       return IVFSExplorer(self.mgr,val._returnval)


   def write(self, _arg_format, _arg_path):
       req=IAppliance_writeRequestMsg()
       req._this=self.handle
       
       req._format=_arg_format
       req._path=_arg_path
       val=self.mgr.getPort().IAppliance_write(req)
       
       return IProgress(self.mgr,val._returnval)


   def getWarnings(self):
       req=IAppliance_getWarningsRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IAppliance_getWarnings(req)
       
       return String(self.mgr,val._returnval, True)


   def getPath(self):
       req=IAppliance_getPathRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IAppliance_getPath(req)
       return  String(self.mgr,val._returnval)
   def getDisks(self):
       req=IAppliance_getDisksRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IAppliance_getDisks(req)
       return  String(self.mgr,val._returnval, True)
   def getVirtualSystemDescriptions(self):
       req=IAppliance_getVirtualSystemDescriptionsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IAppliance_getVirtualSystemDescriptions(req)
       return  IVirtualSystemDescription(self.mgr,val._returnval, True)


   _Attrs_={         'path':[getPath,None],
         'disks':[getDisks,None],
         'virtualSystemDescriptions':[getVirtualSystemDescriptions,None]}

class IVirtualSystemDescription(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IVirtualSystemDescription(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IVirtualSystemDescription._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IVirtualSystemDescription._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getDescription(self):
       req=IVirtualSystemDescription_getDescriptionRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IVirtualSystemDescription_getDescription(req)
       
       return VirtualSystemDescriptionType(self.mgr,val._aTypes, True), String(self.mgr,val._aRefs, True), String(self.mgr,val._aOvfValues, True), String(self.mgr,val._aVBoxValues, True), String(self.mgr,val._aExtraConfigValues, True)


   def getDescriptionByType(self, _arg_aType):
       req=IVirtualSystemDescription_getDescriptionByTypeRequestMsg()
       req._this=self.handle
       
       req._aType=_arg_aType
       val=self.mgr.getPort().IVirtualSystemDescription_getDescriptionByType(req)
       
       return VirtualSystemDescriptionType(self.mgr,val._aTypes, True), String(self.mgr,val._aRefs, True), String(self.mgr,val._aOvfValues, True), String(self.mgr,val._aVBoxValues, True), String(self.mgr,val._aExtraConfigValues, True)


   def getValuesByType(self, _arg_aType, _arg_aWhich):
       req=IVirtualSystemDescription_getValuesByTypeRequestMsg()
       req._this=self.handle
       
       req._aType=_arg_aType
       req._aWhich=_arg_aWhich
       val=self.mgr.getPort().IVirtualSystemDescription_getValuesByType(req)
       
       return String(self.mgr,val._returnval, True)


   def setFinalValues(self, _arg_aEnabled, _arg_aVBoxValues, _arg_aExtraConfigValues):
       req=IVirtualSystemDescription_setFinalValuesRequestMsg()
       req._this=self.handle
       
       req._aEnabled=_arg_aEnabled
       req._aVBoxValues=_arg_aVBoxValues
       req._aExtraConfigValues=_arg_aExtraConfigValues
       val=self.mgr.getPort().IVirtualSystemDescription_setFinalValues(req)
       
       return 


   def addDescription(self, _arg_aType, _arg_aVBoxValue, _arg_aExtraConfigValue):
       req=IVirtualSystemDescription_addDescriptionRequestMsg()
       req._this=self.handle
       
       req._aType=_arg_aType
       req._aVBoxValue=_arg_aVBoxValue
       req._aExtraConfigValue=_arg_aExtraConfigValue
       val=self.mgr.getPort().IVirtualSystemDescription_addDescription(req)
       
       return 


   def getCount(self):
       req=IVirtualSystemDescription_getCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVirtualSystemDescription_getCount(req)
       return  UnsignedInt(self.mgr,val._returnval)


   _Attrs_={         'count':[getCount,None]}

class IBIOSSettings(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IBIOSSettings(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IBIOSSettings._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IBIOSSettings._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getLogoFadeIn(self):
       req=IBIOSSettings_getLogoFadeInRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IBIOSSettings_getLogoFadeIn(req)
       return  Boolean(self.mgr,val._returnval)
   def setLogoFadeIn(self, value):
       req=IBIOSSettings_setLogoFadeInRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._logoFadeIn = value
       else:
            req._logoFadeIn = value.handle
       self.mgr.getPort().IBIOSSettings_setLogoFadeIn(req)

   def getLogoFadeOut(self):
       req=IBIOSSettings_getLogoFadeOutRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IBIOSSettings_getLogoFadeOut(req)
       return  Boolean(self.mgr,val._returnval)
   def setLogoFadeOut(self, value):
       req=IBIOSSettings_setLogoFadeOutRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._logoFadeOut = value
       else:
            req._logoFadeOut = value.handle
       self.mgr.getPort().IBIOSSettings_setLogoFadeOut(req)

   def getLogoDisplayTime(self):
       req=IBIOSSettings_getLogoDisplayTimeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IBIOSSettings_getLogoDisplayTime(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setLogoDisplayTime(self, value):
       req=IBIOSSettings_setLogoDisplayTimeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._logoDisplayTime = value
       else:
            req._logoDisplayTime = value.handle
       self.mgr.getPort().IBIOSSettings_setLogoDisplayTime(req)

   def getLogoImagePath(self):
       req=IBIOSSettings_getLogoImagePathRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IBIOSSettings_getLogoImagePath(req)
       return  String(self.mgr,val._returnval)
   def setLogoImagePath(self, value):
       req=IBIOSSettings_setLogoImagePathRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._logoImagePath = value
       else:
            req._logoImagePath = value.handle
       self.mgr.getPort().IBIOSSettings_setLogoImagePath(req)

   def getBootMenuMode(self):
       req=IBIOSSettings_getBootMenuModeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IBIOSSettings_getBootMenuMode(req)
       return  BIOSBootMenuMode(self.mgr,val._returnval)
   def setBootMenuMode(self, value):
       req=IBIOSSettings_setBootMenuModeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._bootMenuMode = value
       else:
            req._bootMenuMode = value.handle
       self.mgr.getPort().IBIOSSettings_setBootMenuMode(req)

   def getACPIEnabled(self):
       req=IBIOSSettings_getACPIEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IBIOSSettings_getACPIEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setACPIEnabled(self, value):
       req=IBIOSSettings_setACPIEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._ACPIEnabled = value
       else:
            req._ACPIEnabled = value.handle
       self.mgr.getPort().IBIOSSettings_setACPIEnabled(req)

   def getIOAPICEnabled(self):
       req=IBIOSSettings_getIOAPICEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IBIOSSettings_getIOAPICEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setIOAPICEnabled(self, value):
       req=IBIOSSettings_setIOAPICEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._IOAPICEnabled = value
       else:
            req._IOAPICEnabled = value.handle
       self.mgr.getPort().IBIOSSettings_setIOAPICEnabled(req)

   def getTimeOffset(self):
       req=IBIOSSettings_getTimeOffsetRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IBIOSSettings_getTimeOffset(req)
       return  Long(self.mgr,val._returnval)
   def setTimeOffset(self, value):
       req=IBIOSSettings_setTimeOffsetRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._timeOffset = value
       else:
            req._timeOffset = value.handle
       self.mgr.getPort().IBIOSSettings_setTimeOffset(req)

   def getPXEDebugEnabled(self):
       req=IBIOSSettings_getPXEDebugEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IBIOSSettings_getPXEDebugEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setPXEDebugEnabled(self, value):
       req=IBIOSSettings_setPXEDebugEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._PXEDebugEnabled = value
       else:
            req._PXEDebugEnabled = value.handle
       self.mgr.getPort().IBIOSSettings_setPXEDebugEnabled(req)



   _Attrs_={         'logoFadeIn':[getLogoFadeIn,setLogoFadeIn,
        ],
         'logoFadeOut':[getLogoFadeOut,setLogoFadeOut,
        ],
         'logoDisplayTime':[getLogoDisplayTime,setLogoDisplayTime,
        ],
         'logoImagePath':[getLogoImagePath,setLogoImagePath,
        ],
         'bootMenuMode':[getBootMenuMode,setBootMenuMode,
        ],
         'ACPIEnabled':[getACPIEnabled,setACPIEnabled,
        ],
         'IOAPICEnabled':[getIOAPICEnabled,setIOAPICEnabled,
        ],
         'timeOffset':[getTimeOffset,setTimeOffset,
        ],
         'PXEDebugEnabled':[getPXEDebugEnabled,setPXEDebugEnabled,
        ]}

class IMachine(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IMachine(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IMachine._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IMachine._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def setBootOrder(self, _arg_position, _arg_device):
       req=IMachine_setBootOrderRequestMsg()
       req._this=self.handle
       
       req._position=_arg_position
       req._device=_arg_device
       val=self.mgr.getPort().IMachine_setBootOrder(req)
       
       return 


   def getBootOrder(self, _arg_position):
       req=IMachine_getBootOrderRequestMsg()
       req._this=self.handle
       
       req._position=_arg_position
       val=self.mgr.getPort().IMachine_getBootOrder(req)
       
       return DeviceType(self.mgr,val._returnval)


   def attachDevice(self, _arg_name, _arg_controllerPort, _arg_device, _arg_type, _arg_id):
       req=IMachine_attachDeviceRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._controllerPort=_arg_controllerPort
       req._device=_arg_device
       req._type=_arg_type
       req._id=_arg_id
       val=self.mgr.getPort().IMachine_attachDevice(req)
       
       return 


   def detachDevice(self, _arg_name, _arg_controllerPort, _arg_device):
       req=IMachine_detachDeviceRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._controllerPort=_arg_controllerPort
       req._device=_arg_device
       val=self.mgr.getPort().IMachine_detachDevice(req)
       
       return 


   def passthroughDevice(self, _arg_name, _arg_controllerPort, _arg_device, _arg_passthrough):
       req=IMachine_passthroughDeviceRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._controllerPort=_arg_controllerPort
       req._device=_arg_device
       req._passthrough=_arg_passthrough
       val=self.mgr.getPort().IMachine_passthroughDevice(req)
       
       return 


   def mountMedium(self, _arg_name, _arg_controllerPort, _arg_device, _arg_medium, _arg_force):
       req=IMachine_mountMediumRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._controllerPort=_arg_controllerPort
       req._device=_arg_device
       req._medium=_arg_medium
       req._force=_arg_force
       val=self.mgr.getPort().IMachine_mountMedium(req)
       
       return 


   def getMedium(self, _arg_name, _arg_controllerPort, _arg_device):
       req=IMachine_getMediumRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._controllerPort=_arg_controllerPort
       req._device=_arg_device
       val=self.mgr.getPort().IMachine_getMedium(req)
       
       return IMedium(self.mgr,val._returnval)


   def getMediumAttachmentsOfController(self, _arg_name):
       req=IMachine_getMediumAttachmentsOfControllerRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IMachine_getMediumAttachmentsOfController(req)
       
       return IMediumAttachment(self.mgr,val._returnval, True)


   def getMediumAttachment(self, _arg_name, _arg_controllerPort, _arg_device):
       req=IMachine_getMediumAttachmentRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._controllerPort=_arg_controllerPort
       req._device=_arg_device
       val=self.mgr.getPort().IMachine_getMediumAttachment(req)
       
       return IMediumAttachment(self.mgr,val._returnval)


   def getNetworkAdapter(self, _arg_slot):
       req=IMachine_getNetworkAdapterRequestMsg()
       req._this=self.handle
       
       req._slot=_arg_slot
       val=self.mgr.getPort().IMachine_getNetworkAdapter(req)
       
       return INetworkAdapter(self.mgr,val._returnval)


   def addStorageController(self, _arg_name, _arg_connectionType):
       req=IMachine_addStorageControllerRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._connectionType=_arg_connectionType
       val=self.mgr.getPort().IMachine_addStorageController(req)
       
       return IStorageController(self.mgr,val._returnval)


   def getStorageControllerByName(self, _arg_name):
       req=IMachine_getStorageControllerByNameRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IMachine_getStorageControllerByName(req)
       
       return IStorageController(self.mgr,val._returnval)


   def getStorageControllerByInstance(self, _arg_instance):
       req=IMachine_getStorageControllerByInstanceRequestMsg()
       req._this=self.handle
       
       req._instance=_arg_instance
       val=self.mgr.getPort().IMachine_getStorageControllerByInstance(req)
       
       return IStorageController(self.mgr,val._returnval)


   def removeStorageController(self, _arg_name):
       req=IMachine_removeStorageControllerRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IMachine_removeStorageController(req)
       
       return 


   def getSerialPort(self, _arg_slot):
       req=IMachine_getSerialPortRequestMsg()
       req._this=self.handle
       
       req._slot=_arg_slot
       val=self.mgr.getPort().IMachine_getSerialPort(req)
       
       return ISerialPort(self.mgr,val._returnval)


   def getParallelPort(self, _arg_slot):
       req=IMachine_getParallelPortRequestMsg()
       req._this=self.handle
       
       req._slot=_arg_slot
       val=self.mgr.getPort().IMachine_getParallelPort(req)
       
       return IParallelPort(self.mgr,val._returnval)


   def getExtraDataKeys(self):
       req=IMachine_getExtraDataKeysRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMachine_getExtraDataKeys(req)
       
       return String(self.mgr,val._returnval, True)


   def getExtraData(self, _arg_key):
       req=IMachine_getExtraDataRequestMsg()
       req._this=self.handle
       
       req._key=_arg_key
       val=self.mgr.getPort().IMachine_getExtraData(req)
       
       return String(self.mgr,val._returnval)


   def setExtraData(self, _arg_key, _arg_value):
       req=IMachine_setExtraDataRequestMsg()
       req._this=self.handle
       
       req._key=_arg_key
       req._value=_arg_value
       val=self.mgr.getPort().IMachine_setExtraData(req)
       
       return 


   def getCPUProperty(self, _arg_property):
       req=IMachine_getCPUPropertyRequestMsg()
       req._this=self.handle
       
       req._property=_arg_property
       val=self.mgr.getPort().IMachine_getCPUProperty(req)
       
       return Boolean(self.mgr,val._returnval)


   def setCPUProperty(self, _arg_property, _arg_value):
       req=IMachine_setCPUPropertyRequestMsg()
       req._this=self.handle
       
       req._property=_arg_property
       req._value=_arg_value
       val=self.mgr.getPort().IMachine_setCPUProperty(req)
       
       return 


   def getCPUIDLeaf(self, _arg_id):
       req=IMachine_getCPUIDLeafRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IMachine_getCPUIDLeaf(req)
       
       return UnsignedInt(self.mgr,val._valEax), UnsignedInt(self.mgr,val._valEbx), UnsignedInt(self.mgr,val._valEcx), UnsignedInt(self.mgr,val._valEdx)


   def setCPUIDLeaf(self, _arg_id, _arg_valEax, _arg_valEbx, _arg_valEcx, _arg_valEdx):
       req=IMachine_setCPUIDLeafRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       req._valEax=_arg_valEax
       req._valEbx=_arg_valEbx
       req._valEcx=_arg_valEcx
       req._valEdx=_arg_valEdx
       val=self.mgr.getPort().IMachine_setCPUIDLeaf(req)
       
       return 


   def removeCPUIDLeaf(self, _arg_id):
       req=IMachine_removeCPUIDLeafRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IMachine_removeCPUIDLeaf(req)
       
       return 


   def removeAllCPUIDLeaves(self):
       req=IMachine_removeAllCPUIDLeavesRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMachine_removeAllCPUIDLeaves(req)
       
       return 


   def getHWVirtExProperty(self, _arg_property):
       req=IMachine_getHWVirtExPropertyRequestMsg()
       req._this=self.handle
       
       req._property=_arg_property
       val=self.mgr.getPort().IMachine_getHWVirtExProperty(req)
       
       return Boolean(self.mgr,val._returnval)


   def setHWVirtExProperty(self, _arg_property, _arg_value):
       req=IMachine_setHWVirtExPropertyRequestMsg()
       req._this=self.handle
       
       req._property=_arg_property
       req._value=_arg_value
       val=self.mgr.getPort().IMachine_setHWVirtExProperty(req)
       
       return 


   def saveSettings(self):
       req=IMachine_saveSettingsRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMachine_saveSettings(req)
       
       return 


   def discardSettings(self):
       req=IMachine_discardSettingsRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMachine_discardSettings(req)
       
       return 


   def deleteSettings(self):
       req=IMachine_deleteSettingsRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMachine_deleteSettings(req)
       
       return 


   def export(self, _arg_aAppliance):
       req=IMachine_exportRequestMsg()
       req._this=self.handle
       
       req._aAppliance=_arg_aAppliance
       val=self.mgr.getPort().IMachine_export(req)
       
       return IVirtualSystemDescription(self.mgr,val._returnval)


   def getSnapshot(self, _arg_id):
       req=IMachine_getSnapshotRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IMachine_getSnapshot(req)
       
       return ISnapshot(self.mgr,val._returnval)


   def findSnapshot(self, _arg_name):
       req=IMachine_findSnapshotRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IMachine_findSnapshot(req)
       
       return ISnapshot(self.mgr,val._returnval)


   def setCurrentSnapshot(self, _arg_id):
       req=IMachine_setCurrentSnapshotRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IMachine_setCurrentSnapshot(req)
       
       return 


   def createSharedFolder(self, _arg_name, _arg_hostPath, _arg_writable):
       req=IMachine_createSharedFolderRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._hostPath=_arg_hostPath
       req._writable=_arg_writable
       val=self.mgr.getPort().IMachine_createSharedFolder(req)
       
       return 


   def removeSharedFolder(self, _arg_name):
       req=IMachine_removeSharedFolderRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IMachine_removeSharedFolder(req)
       
       return 


   def canShowConsoleWindow(self):
       req=IMachine_canShowConsoleWindowRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMachine_canShowConsoleWindow(req)
       
       return Boolean(self.mgr,val._returnval)


   def showConsoleWindow(self):
       req=IMachine_showConsoleWindowRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMachine_showConsoleWindow(req)
       
       return UnsignedLong(self.mgr,val._returnval)


   def getGuestProperty(self, _arg_name):
       req=IMachine_getGuestPropertyRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IMachine_getGuestProperty(req)
       
       return String(self.mgr,val._value), UnsignedLong(self.mgr,val._timestamp), String(self.mgr,val._flags)


   def getGuestPropertyValue(self, _arg_property):
       req=IMachine_getGuestPropertyValueRequestMsg()
       req._this=self.handle
       
       req._property=_arg_property
       val=self.mgr.getPort().IMachine_getGuestPropertyValue(req)
       
       return String(self.mgr,val._returnval)


   def getGuestPropertyTimestamp(self, _arg_property):
       req=IMachine_getGuestPropertyTimestampRequestMsg()
       req._this=self.handle
       
       req._property=_arg_property
       val=self.mgr.getPort().IMachine_getGuestPropertyTimestamp(req)
       
       return UnsignedLong(self.mgr,val._returnval)


   def setGuestProperty(self, _arg_property, _arg_value, _arg_flags):
       req=IMachine_setGuestPropertyRequestMsg()
       req._this=self.handle
       
       req._property=_arg_property
       req._value=_arg_value
       req._flags=_arg_flags
       val=self.mgr.getPort().IMachine_setGuestProperty(req)
       
       return 


   def setGuestPropertyValue(self, _arg_property, _arg_value):
       req=IMachine_setGuestPropertyValueRequestMsg()
       req._this=self.handle
       
       req._property=_arg_property
       req._value=_arg_value
       val=self.mgr.getPort().IMachine_setGuestPropertyValue(req)
       
       return 


   def enumerateGuestProperties(self, _arg_patterns):
       req=IMachine_enumerateGuestPropertiesRequestMsg()
       req._this=self.handle
       
       req._patterns=_arg_patterns
       val=self.mgr.getPort().IMachine_enumerateGuestProperties(req)
       
       return String(self.mgr,val._name, True), String(self.mgr,val._value, True), UnsignedLong(self.mgr,val._timestamp, True), String(self.mgr,val._flags, True)


   def querySavedThumbnailSize(self, _arg_screenId):
       req=IMachine_querySavedThumbnailSizeRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       val=self.mgr.getPort().IMachine_querySavedThumbnailSize(req)
       
       return UnsignedInt(self.mgr,val._size), UnsignedInt(self.mgr,val._width), UnsignedInt(self.mgr,val._height)


   def readSavedThumbnailToArray(self, _arg_screenId, _arg_BGR):
       req=IMachine_readSavedThumbnailToArrayRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       req._BGR=_arg_BGR
       val=self.mgr.getPort().IMachine_readSavedThumbnailToArray(req)
       
       return Octet(self.mgr,val._returnval, True), UnsignedInt(self.mgr,val._width), UnsignedInt(self.mgr,val._height)


   def querySavedScreenshotPNGSize(self, _arg_screenId):
       req=IMachine_querySavedScreenshotPNGSizeRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       val=self.mgr.getPort().IMachine_querySavedScreenshotPNGSize(req)
       
       return UnsignedInt(self.mgr,val._size), UnsignedInt(self.mgr,val._width), UnsignedInt(self.mgr,val._height)


   def readSavedScreenshotPNGToArray(self, _arg_screenId):
       req=IMachine_readSavedScreenshotPNGToArrayRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       val=self.mgr.getPort().IMachine_readSavedScreenshotPNGToArray(req)
       
       return Octet(self.mgr,val._returnval, True), UnsignedInt(self.mgr,val._width), UnsignedInt(self.mgr,val._height)


   def hotPlugCPU(self, _arg_cpu):
       req=IMachine_hotPlugCPURequestMsg()
       req._this=self.handle
       
       req._cpu=_arg_cpu
       val=self.mgr.getPort().IMachine_hotPlugCPU(req)
       
       return 


   def hotUnplugCPU(self, _arg_cpu):
       req=IMachine_hotUnplugCPURequestMsg()
       req._this=self.handle
       
       req._cpu=_arg_cpu
       val=self.mgr.getPort().IMachine_hotUnplugCPU(req)
       
       return 


   def getCPUStatus(self, _arg_cpu):
       req=IMachine_getCPUStatusRequestMsg()
       req._this=self.handle
       
       req._cpu=_arg_cpu
       val=self.mgr.getPort().IMachine_getCPUStatus(req)
       
       return Boolean(self.mgr,val._returnval)


   def queryLogFilename(self, _arg_idx):
       req=IMachine_queryLogFilenameRequestMsg()
       req._this=self.handle
       
       req._idx=_arg_idx
       val=self.mgr.getPort().IMachine_queryLogFilename(req)
       
       return String(self.mgr,val._returnval)


   def readLog(self, _arg_idx, _arg_offset, _arg_size):
       req=IMachine_readLogRequestMsg()
       req._this=self.handle
       
       req._idx=_arg_idx
       req._offset=_arg_offset
       req._size=_arg_size
       val=self.mgr.getPort().IMachine_readLog(req)
       
       return Octet(self.mgr,val._returnval, True)


   def getParent(self):
       req=IMachine_getParentRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getParent(req)
       return  IVirtualBox(self.mgr,val._returnval)
   def getAccessible(self):
       req=IMachine_getAccessibleRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getAccessible(req)
       return  Boolean(self.mgr,val._returnval)
   def getAccessError(self):
       req=IMachine_getAccessErrorRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getAccessError(req)
       return  IVirtualBoxErrorInfo(self.mgr,val._returnval)
   def getName(self):
       req=IMachine_getNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getName(req)
       return  String(self.mgr,val._returnval)
   def setName(self, value):
       req=IMachine_setNameRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._name = value
       else:
            req._name = value.handle
       self.mgr.getPort().IMachine_setName(req)

   def getDescription(self):
       req=IMachine_getDescriptionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getDescription(req)
       return  String(self.mgr,val._returnval)
   def setDescription(self, value):
       req=IMachine_setDescriptionRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._description = value
       else:
            req._description = value.handle
       self.mgr.getPort().IMachine_setDescription(req)

   def getId(self):
       req=IMachine_getIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getId(req)
       return  String(self.mgr,val._returnval)
   def getOSTypeId(self):
       req=IMachine_getOSTypeIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getOSTypeId(req)
       return  String(self.mgr,val._returnval)
   def setOSTypeId(self, value):
       req=IMachine_setOSTypeIdRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._OSTypeId = value
       else:
            req._OSTypeId = value.handle
       self.mgr.getPort().IMachine_setOSTypeId(req)

   def getHardwareVersion(self):
       req=IMachine_getHardwareVersionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getHardwareVersion(req)
       return  String(self.mgr,val._returnval)
   def setHardwareVersion(self, value):
       req=IMachine_setHardwareVersionRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._HardwareVersion = value
       else:
            req._HardwareVersion = value.handle
       self.mgr.getPort().IMachine_setHardwareVersion(req)

   def getHardwareUUID(self):
       req=IMachine_getHardwareUUIDRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getHardwareUUID(req)
       return  String(self.mgr,val._returnval)
   def setHardwareUUID(self, value):
       req=IMachine_setHardwareUUIDRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._hardwareUUID = value
       else:
            req._hardwareUUID = value.handle
       self.mgr.getPort().IMachine_setHardwareUUID(req)

   def getCPUCount(self):
       req=IMachine_getCPUCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getCPUCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setCPUCount(self, value):
       req=IMachine_setCPUCountRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._CPUCount = value
       else:
            req._CPUCount = value.handle
       self.mgr.getPort().IMachine_setCPUCount(req)

   def getCPUHotPlugEnabled(self):
       req=IMachine_getCPUHotPlugEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getCPUHotPlugEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setCPUHotPlugEnabled(self, value):
       req=IMachine_setCPUHotPlugEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._CPUHotPlugEnabled = value
       else:
            req._CPUHotPlugEnabled = value.handle
       self.mgr.getPort().IMachine_setCPUHotPlugEnabled(req)

   def getMemorySize(self):
       req=IMachine_getMemorySizeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getMemorySize(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setMemorySize(self, value):
       req=IMachine_setMemorySizeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._memorySize = value
       else:
            req._memorySize = value.handle
       self.mgr.getPort().IMachine_setMemorySize(req)

   def getMemoryBalloonSize(self):
       req=IMachine_getMemoryBalloonSizeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getMemoryBalloonSize(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setMemoryBalloonSize(self, value):
       req=IMachine_setMemoryBalloonSizeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._memoryBalloonSize = value
       else:
            req._memoryBalloonSize = value.handle
       self.mgr.getPort().IMachine_setMemoryBalloonSize(req)

   def getPageFusionEnabled(self):
       req=IMachine_getPageFusionEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getPageFusionEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setPageFusionEnabled(self, value):
       req=IMachine_setPageFusionEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._PageFusionEnabled = value
       else:
            req._PageFusionEnabled = value.handle
       self.mgr.getPort().IMachine_setPageFusionEnabled(req)

   def getVRAMSize(self):
       req=IMachine_getVRAMSizeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getVRAMSize(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setVRAMSize(self, value):
       req=IMachine_setVRAMSizeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._VRAMSize = value
       else:
            req._VRAMSize = value.handle
       self.mgr.getPort().IMachine_setVRAMSize(req)

   def getAccelerate3DEnabled(self):
       req=IMachine_getAccelerate3DEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getAccelerate3DEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setAccelerate3DEnabled(self, value):
       req=IMachine_setAccelerate3DEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._accelerate3DEnabled = value
       else:
            req._accelerate3DEnabled = value.handle
       self.mgr.getPort().IMachine_setAccelerate3DEnabled(req)

   def getAccelerate2DVideoEnabled(self):
       req=IMachine_getAccelerate2DVideoEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getAccelerate2DVideoEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setAccelerate2DVideoEnabled(self, value):
       req=IMachine_setAccelerate2DVideoEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._accelerate2DVideoEnabled = value
       else:
            req._accelerate2DVideoEnabled = value.handle
       self.mgr.getPort().IMachine_setAccelerate2DVideoEnabled(req)

   def getMonitorCount(self):
       req=IMachine_getMonitorCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getMonitorCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setMonitorCount(self, value):
       req=IMachine_setMonitorCountRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._monitorCount = value
       else:
            req._monitorCount = value.handle
       self.mgr.getPort().IMachine_setMonitorCount(req)

   def getBIOSSettings(self):
       req=IMachine_getBIOSSettingsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getBIOSSettings(req)
       return  IBIOSSettings(self.mgr,val._returnval)
   def getFirmwareType(self):
       req=IMachine_getFirmwareTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getFirmwareType(req)
       return  FirmwareType(self.mgr,val._returnval)
   def setFirmwareType(self, value):
       req=IMachine_setFirmwareTypeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._firmwareType = value
       else:
            req._firmwareType = value.handle
       self.mgr.getPort().IMachine_setFirmwareType(req)

   def getPointingHidType(self):
       req=IMachine_getPointingHidTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getPointingHidType(req)
       return  PointingHidType(self.mgr,val._returnval)
   def setPointingHidType(self, value):
       req=IMachine_setPointingHidTypeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._pointingHidType = value
       else:
            req._pointingHidType = value.handle
       self.mgr.getPort().IMachine_setPointingHidType(req)

   def getKeyboardHidType(self):
       req=IMachine_getKeyboardHidTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getKeyboardHidType(req)
       return  KeyboardHidType(self.mgr,val._returnval)
   def setKeyboardHidType(self, value):
       req=IMachine_setKeyboardHidTypeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._keyboardHidType = value
       else:
            req._keyboardHidType = value.handle
       self.mgr.getPort().IMachine_setKeyboardHidType(req)

   def getHpetEnabled(self):
       req=IMachine_getHpetEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getHpetEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setHpetEnabled(self, value):
       req=IMachine_setHpetEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._hpetEnabled = value
       else:
            req._hpetEnabled = value.handle
       self.mgr.getPort().IMachine_setHpetEnabled(req)

   def getSnapshotFolder(self):
       req=IMachine_getSnapshotFolderRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getSnapshotFolder(req)
       return  String(self.mgr,val._returnval)
   def setSnapshotFolder(self, value):
       req=IMachine_setSnapshotFolderRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._snapshotFolder = value
       else:
            req._snapshotFolder = value.handle
       self.mgr.getPort().IMachine_setSnapshotFolder(req)

   def getVRDPServer(self):
       req=IMachine_getVRDPServerRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getVRDPServer(req)
       return  IVRDPServer(self.mgr,val._returnval)
   def getMediumAttachments(self):
       req=IMachine_getMediumAttachmentsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getMediumAttachments(req)
       return  IMediumAttachment(self.mgr,val._returnval, True)
   def getUSBController(self):
       req=IMachine_getUSBControllerRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getUSBController(req)
       return  IUSBController(self.mgr,val._returnval)
   def getAudioAdapter(self):
       req=IMachine_getAudioAdapterRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getAudioAdapter(req)
       return  IAudioAdapter(self.mgr,val._returnval)
   def getStorageControllers(self):
       req=IMachine_getStorageControllersRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getStorageControllers(req)
       return  IStorageController(self.mgr,val._returnval, True)
   def getSettingsFilePath(self):
       req=IMachine_getSettingsFilePathRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getSettingsFilePath(req)
       return  String(self.mgr,val._returnval)
   def getSettingsModified(self):
       req=IMachine_getSettingsModifiedRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getSettingsModified(req)
       return  Boolean(self.mgr,val._returnval)
   def getSessionState(self):
       req=IMachine_getSessionStateRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getSessionState(req)
       return  SessionState(self.mgr,val._returnval)
   def getSessionType(self):
       req=IMachine_getSessionTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getSessionType(req)
       return  String(self.mgr,val._returnval)
   def getSessionPid(self):
       req=IMachine_getSessionPidRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getSessionPid(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getState(self):
       req=IMachine_getStateRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getState(req)
       return  MachineState(self.mgr,val._returnval)
   def getLastStateChange(self):
       req=IMachine_getLastStateChangeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getLastStateChange(req)
       return  Long(self.mgr,val._returnval)
   def getStateFilePath(self):
       req=IMachine_getStateFilePathRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getStateFilePath(req)
       return  String(self.mgr,val._returnval)
   def getLogFolder(self):
       req=IMachine_getLogFolderRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getLogFolder(req)
       return  String(self.mgr,val._returnval)
   def getCurrentSnapshot(self):
       req=IMachine_getCurrentSnapshotRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getCurrentSnapshot(req)
       return  ISnapshot(self.mgr,val._returnval)
   def getSnapshotCount(self):
       req=IMachine_getSnapshotCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getSnapshotCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getCurrentStateModified(self):
       req=IMachine_getCurrentStateModifiedRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getCurrentStateModified(req)
       return  Boolean(self.mgr,val._returnval)
   def getSharedFolders(self):
       req=IMachine_getSharedFoldersRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getSharedFolders(req)
       return  ISharedFolder(self.mgr,val._returnval, True)
   def getClipboardMode(self):
       req=IMachine_getClipboardModeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getClipboardMode(req)
       return  ClipboardMode(self.mgr,val._returnval)
   def setClipboardMode(self, value):
       req=IMachine_setClipboardModeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._clipboardMode = value
       else:
            req._clipboardMode = value.handle
       self.mgr.getPort().IMachine_setClipboardMode(req)

   def getGuestPropertyNotificationPatterns(self):
       req=IMachine_getGuestPropertyNotificationPatternsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getGuestPropertyNotificationPatterns(req)
       return  String(self.mgr,val._returnval)
   def setGuestPropertyNotificationPatterns(self, value):
       req=IMachine_setGuestPropertyNotificationPatternsRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._guestPropertyNotificationPatterns = value
       else:
            req._guestPropertyNotificationPatterns = value.handle
       self.mgr.getPort().IMachine_setGuestPropertyNotificationPatterns(req)

   def getTeleporterEnabled(self):
       req=IMachine_getTeleporterEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getTeleporterEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setTeleporterEnabled(self, value):
       req=IMachine_setTeleporterEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._teleporterEnabled = value
       else:
            req._teleporterEnabled = value.handle
       self.mgr.getPort().IMachine_setTeleporterEnabled(req)

   def getTeleporterPort(self):
       req=IMachine_getTeleporterPortRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getTeleporterPort(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setTeleporterPort(self, value):
       req=IMachine_setTeleporterPortRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._teleporterPort = value
       else:
            req._teleporterPort = value.handle
       self.mgr.getPort().IMachine_setTeleporterPort(req)

   def getTeleporterAddress(self):
       req=IMachine_getTeleporterAddressRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getTeleporterAddress(req)
       return  String(self.mgr,val._returnval)
   def setTeleporterAddress(self, value):
       req=IMachine_setTeleporterAddressRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._teleporterAddress = value
       else:
            req._teleporterAddress = value.handle
       self.mgr.getPort().IMachine_setTeleporterAddress(req)

   def getTeleporterPassword(self):
       req=IMachine_getTeleporterPasswordRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getTeleporterPassword(req)
       return  String(self.mgr,val._returnval)
   def setTeleporterPassword(self, value):
       req=IMachine_setTeleporterPasswordRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._teleporterPassword = value
       else:
            req._teleporterPassword = value.handle
       self.mgr.getPort().IMachine_setTeleporterPassword(req)

   def getRTCUseUTC(self):
       req=IMachine_getRTCUseUTCRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getRTCUseUTC(req)
       return  Boolean(self.mgr,val._returnval)
   def setRTCUseUTC(self, value):
       req=IMachine_setRTCUseUTCRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._RTCUseUTC = value
       else:
            req._RTCUseUTC = value.handle
       self.mgr.getPort().IMachine_setRTCUseUTC(req)

   def getIoCacheEnabled(self):
       req=IMachine_getIoCacheEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getIoCacheEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setIoCacheEnabled(self, value):
       req=IMachine_setIoCacheEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._ioCacheEnabled = value
       else:
            req._ioCacheEnabled = value.handle
       self.mgr.getPort().IMachine_setIoCacheEnabled(req)

   def getIoCacheSize(self):
       req=IMachine_getIoCacheSizeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getIoCacheSize(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setIoCacheSize(self, value):
       req=IMachine_setIoCacheSizeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._ioCacheSize = value
       else:
            req._ioCacheSize = value.handle
       self.mgr.getPort().IMachine_setIoCacheSize(req)

   def getIoBandwidthMax(self):
       req=IMachine_getIoBandwidthMaxRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMachine_getIoBandwidthMax(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setIoBandwidthMax(self, value):
       req=IMachine_setIoBandwidthMaxRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._ioBandwidthMax = value
       else:
            req._ioBandwidthMax = value.handle
       self.mgr.getPort().IMachine_setIoBandwidthMax(req)



   _Attrs_={         'parent':[getParent,None],
         'accessible':[getAccessible,None],
         'accessError':[getAccessError,None],
         'name':[getName,setName,
        ],
         'description':[getDescription,setDescription,
        ],
         'id':[getId,None],
         'OSTypeId':[getOSTypeId,setOSTypeId,
        ],
         'HardwareVersion':[getHardwareVersion,setHardwareVersion,
        ],
         'hardwareUUID':[getHardwareUUID,setHardwareUUID,
        ],
         'CPUCount':[getCPUCount,setCPUCount,
        ],
         'CPUHotPlugEnabled':[getCPUHotPlugEnabled,setCPUHotPlugEnabled,
        ],
         'memorySize':[getMemorySize,setMemorySize,
        ],
         'memoryBalloonSize':[getMemoryBalloonSize,setMemoryBalloonSize,
        ],
         'PageFusionEnabled':[getPageFusionEnabled,setPageFusionEnabled,
        ],
         'VRAMSize':[getVRAMSize,setVRAMSize,
        ],
         'accelerate3DEnabled':[getAccelerate3DEnabled,setAccelerate3DEnabled,
        ],
         'accelerate2DVideoEnabled':[getAccelerate2DVideoEnabled,setAccelerate2DVideoEnabled,
        ],
         'monitorCount':[getMonitorCount,setMonitorCount,
        ],
         'BIOSSettings':[getBIOSSettings,None],
         'firmwareType':[getFirmwareType,setFirmwareType,
        ],
         'pointingHidType':[getPointingHidType,setPointingHidType,
        ],
         'keyboardHidType':[getKeyboardHidType,setKeyboardHidType,
        ],
         'hpetEnabled':[getHpetEnabled,setHpetEnabled,
        ],
         'snapshotFolder':[getSnapshotFolder,setSnapshotFolder,
        ],
         'VRDPServer':[getVRDPServer,None],
         'mediumAttachments':[getMediumAttachments,None],
         'USBController':[getUSBController,None],
         'audioAdapter':[getAudioAdapter,None],
         'storageControllers':[getStorageControllers,None],
         'settingsFilePath':[getSettingsFilePath,None],
         'settingsModified':[getSettingsModified,None],
         'sessionState':[getSessionState,None],
         'sessionType':[getSessionType,None],
         'sessionPid':[getSessionPid,None],
         'state':[getState,None],
         'lastStateChange':[getLastStateChange,None],
         'stateFilePath':[getStateFilePath,None],
         'logFolder':[getLogFolder,None],
         'currentSnapshot':[getCurrentSnapshot,None],
         'snapshotCount':[getSnapshotCount,None],
         'currentStateModified':[getCurrentStateModified,None],
         'sharedFolders':[getSharedFolders,None],
         'clipboardMode':[getClipboardMode,setClipboardMode,
        ],
         'guestPropertyNotificationPatterns':[getGuestPropertyNotificationPatterns,setGuestPropertyNotificationPatterns,
        ],
         'teleporterEnabled':[getTeleporterEnabled,setTeleporterEnabled,
        ],
         'teleporterPort':[getTeleporterPort,setTeleporterPort,
        ],
         'teleporterAddress':[getTeleporterAddress,setTeleporterAddress,
        ],
         'teleporterPassword':[getTeleporterPassword,setTeleporterPassword,
        ],
         'RTCUseUTC':[getRTCUseUTC,setRTCUseUTC,
        ],
         'ioCacheEnabled':[getIoCacheEnabled,setIoCacheEnabled,
        ],
         'ioCacheSize':[getIoCacheSize,setIoCacheSize,
        ],
         'ioBandwidthMax':[getIoBandwidthMax,setIoBandwidthMax,
        ]}

class IConsole(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IConsole(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IConsole._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IConsole._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def powerUp(self):
       req=IConsole_powerUpRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_powerUp(req)
       
       return IProgress(self.mgr,val._returnval)


   def powerUpPaused(self):
       req=IConsole_powerUpPausedRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_powerUpPaused(req)
       
       return IProgress(self.mgr,val._returnval)


   def powerDown(self):
       req=IConsole_powerDownRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_powerDown(req)
       
       return IProgress(self.mgr,val._returnval)


   def reset(self):
       req=IConsole_resetRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_reset(req)
       
       return 


   def pause(self):
       req=IConsole_pauseRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_pause(req)
       
       return 


   def resume(self):
       req=IConsole_resumeRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_resume(req)
       
       return 


   def powerButton(self):
       req=IConsole_powerButtonRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_powerButton(req)
       
       return 


   def sleepButton(self):
       req=IConsole_sleepButtonRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_sleepButton(req)
       
       return 


   def getPowerButtonHandled(self):
       req=IConsole_getPowerButtonHandledRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_getPowerButtonHandled(req)
       
       return Boolean(self.mgr,val._returnval)


   def getGuestEnteredACPIMode(self):
       req=IConsole_getGuestEnteredACPIModeRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_getGuestEnteredACPIMode(req)
       
       return Boolean(self.mgr,val._returnval)


   def saveState(self):
       req=IConsole_saveStateRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IConsole_saveState(req)
       
       return IProgress(self.mgr,val._returnval)


   def adoptSavedState(self, _arg_savedStateFile):
       req=IConsole_adoptSavedStateRequestMsg()
       req._this=self.handle
       
       req._savedStateFile=_arg_savedStateFile
       val=self.mgr.getPort().IConsole_adoptSavedState(req)
       
       return 


   def forgetSavedState(self, _arg_remove):
       req=IConsole_forgetSavedStateRequestMsg()
       req._this=self.handle
       
       req._remove=_arg_remove
       val=self.mgr.getPort().IConsole_forgetSavedState(req)
       
       return 


   def getDeviceActivity(self, _arg_type):
       req=IConsole_getDeviceActivityRequestMsg()
       req._this=self.handle
       
       req._type=_arg_type
       val=self.mgr.getPort().IConsole_getDeviceActivity(req)
       
       return DeviceActivity(self.mgr,val._returnval)


   def attachUSBDevice(self, _arg_id):
       req=IConsole_attachUSBDeviceRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IConsole_attachUSBDevice(req)
       
       return 


   def detachUSBDevice(self, _arg_id):
       req=IConsole_detachUSBDeviceRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IConsole_detachUSBDevice(req)
       
       return IUSBDevice(self.mgr,val._returnval)


   def findUSBDeviceByAddress(self, _arg_name):
       req=IConsole_findUSBDeviceByAddressRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IConsole_findUSBDeviceByAddress(req)
       
       return IUSBDevice(self.mgr,val._returnval)


   def findUSBDeviceById(self, _arg_id):
       req=IConsole_findUSBDeviceByIdRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IConsole_findUSBDeviceById(req)
       
       return IUSBDevice(self.mgr,val._returnval)


   def createSharedFolder(self, _arg_name, _arg_hostPath, _arg_writable):
       req=IConsole_createSharedFolderRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._hostPath=_arg_hostPath
       req._writable=_arg_writable
       val=self.mgr.getPort().IConsole_createSharedFolder(req)
       
       return 


   def removeSharedFolder(self, _arg_name):
       req=IConsole_removeSharedFolderRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IConsole_removeSharedFolder(req)
       
       return 


   def takeSnapshot(self, _arg_name, _arg_description):
       req=IConsole_takeSnapshotRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._description=_arg_description
       val=self.mgr.getPort().IConsole_takeSnapshot(req)
       
       return IProgress(self.mgr,val._returnval)


   def deleteSnapshot(self, _arg_id):
       req=IConsole_deleteSnapshotRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IConsole_deleteSnapshot(req)
       
       return IProgress(self.mgr,val._returnval)


   def restoreSnapshot(self, _arg_snapshot):
       req=IConsole_restoreSnapshotRequestMsg()
       req._this=self.handle
       
       req._snapshot=_arg_snapshot
       val=self.mgr.getPort().IConsole_restoreSnapshot(req)
       
       return IProgress(self.mgr,val._returnval)


   def teleport(self, _arg_hostname, _arg_tcpport, _arg_password, _arg_maxDowntime):
       req=IConsole_teleportRequestMsg()
       req._this=self.handle
       
       req._hostname=_arg_hostname
       req._tcpport=_arg_tcpport
       req._password=_arg_password
       req._maxDowntime=_arg_maxDowntime
       val=self.mgr.getPort().IConsole_teleport(req)
       
       return IProgress(self.mgr,val._returnval)


   def registerCallback(self, _arg_callback):
       req=IConsole_registerCallbackRequestMsg()
       req._this=self.handle
       
       req._callback=_arg_callback
       val=self.mgr.getPort().IConsole_registerCallback(req)
       
       return 


   def unregisterCallback(self, _arg_callback):
       req=IConsole_unregisterCallbackRequestMsg()
       req._this=self.handle
       
       req._callback=_arg_callback
       val=self.mgr.getPort().IConsole_unregisterCallback(req)
       
       return 


   def getMachine(self):
       req=IConsole_getMachineRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getMachine(req)
       return  IMachine(self.mgr,val._returnval)
   def getState(self):
       req=IConsole_getStateRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getState(req)
       return  MachineState(self.mgr,val._returnval)
   def getGuest(self):
       req=IConsole_getGuestRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getGuest(req)
       return  IGuest(self.mgr,val._returnval)
   def getKeyboard(self):
       req=IConsole_getKeyboardRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getKeyboard(req)
       return  IKeyboard(self.mgr,val._returnval)
   def getMouse(self):
       req=IConsole_getMouseRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getMouse(req)
       return  IMouse(self.mgr,val._returnval)
   def getDisplay(self):
       req=IConsole_getDisplayRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getDisplay(req)
       return  IDisplay(self.mgr,val._returnval)
   def getUSBDevices(self):
       req=IConsole_getUSBDevicesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getUSBDevices(req)
       return  IUSBDevice(self.mgr,val._returnval, True)
   def getRemoteUSBDevices(self):
       req=IConsole_getRemoteUSBDevicesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getRemoteUSBDevices(req)
       return  IHostUSBDevice(self.mgr,val._returnval, True)
   def getSharedFolders(self):
       req=IConsole_getSharedFoldersRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getSharedFolders(req)
       return  ISharedFolder(self.mgr,val._returnval, True)
   def getRemoteDisplayInfo(self):
       req=IConsole_getRemoteDisplayInfoRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IConsole_getRemoteDisplayInfo(req)
       return  IRemoteDisplayInfo(self.mgr,val._returnval)


   _Attrs_={         'machine':[getMachine,None],
         'state':[getState,None],
         'guest':[getGuest,None],
         'keyboard':[getKeyboard,None],
         'mouse':[getMouse,None],
         'display':[getDisplay,None],
         'USBDevices':[getUSBDevices,None],
         'remoteUSBDevices':[getRemoteUSBDevices,None],
         'sharedFolders':[getSharedFolders,None],
         'remoteDisplayInfo':[getRemoteDisplayInfo,None]}

class IHostNetworkInterface(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IHostNetworkInterface(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IHostNetworkInterface._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IHostNetworkInterface._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def enableStaticIpConfig(self, _arg_IPAddress, _arg_networkMask):
       req=IHostNetworkInterface_enableStaticIpConfigRequestMsg()
       req._this=self.handle
       
       req._IPAddress=_arg_IPAddress
       req._networkMask=_arg_networkMask
       val=self.mgr.getPort().IHostNetworkInterface_enableStaticIpConfig(req)
       
       return 


   def enableStaticIpConfigV6(self, _arg_IPV6Address, _arg_IPV6NetworkMaskPrefixLength):
       req=IHostNetworkInterface_enableStaticIpConfigV6RequestMsg()
       req._this=self.handle
       
       req._IPV6Address=_arg_IPV6Address
       req._IPV6NetworkMaskPrefixLength=_arg_IPV6NetworkMaskPrefixLength
       val=self.mgr.getPort().IHostNetworkInterface_enableStaticIpConfigV6(req)
       
       return 


   def enableDynamicIpConfig(self):
       req=IHostNetworkInterface_enableDynamicIpConfigRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IHostNetworkInterface_enableDynamicIpConfig(req)
       
       return 


   def dhcpRediscover(self):
       req=IHostNetworkInterface_dhcpRediscoverRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IHostNetworkInterface_dhcpRediscover(req)
       
       return 


   def getName(self):
       req=IHostNetworkInterface_getNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getName(req)
       return  String(self.mgr,val._returnval)
   def getId(self):
       req=IHostNetworkInterface_getIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getId(req)
       return  String(self.mgr,val._returnval)
   def getNetworkName(self):
       req=IHostNetworkInterface_getNetworkNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getNetworkName(req)
       return  String(self.mgr,val._returnval)
   def getDhcpEnabled(self):
       req=IHostNetworkInterface_getDhcpEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getDhcpEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def getIPAddress(self):
       req=IHostNetworkInterface_getIPAddressRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getIPAddress(req)
       return  String(self.mgr,val._returnval)
   def getNetworkMask(self):
       req=IHostNetworkInterface_getNetworkMaskRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getNetworkMask(req)
       return  String(self.mgr,val._returnval)
   def getIPV6Supported(self):
       req=IHostNetworkInterface_getIPV6SupportedRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getIPV6Supported(req)
       return  Boolean(self.mgr,val._returnval)
   def getIPV6Address(self):
       req=IHostNetworkInterface_getIPV6AddressRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getIPV6Address(req)
       return  String(self.mgr,val._returnval)
   def getIPV6NetworkMaskPrefixLength(self):
       req=IHostNetworkInterface_getIPV6NetworkMaskPrefixLengthRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getIPV6NetworkMaskPrefixLength(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getHardwareAddress(self):
       req=IHostNetworkInterface_getHardwareAddressRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getHardwareAddress(req)
       return  String(self.mgr,val._returnval)
   def getMediumType(self):
       req=IHostNetworkInterface_getMediumTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getMediumType(req)
       return  HostNetworkInterfaceMediumType(self.mgr,val._returnval)
   def getStatus(self):
       req=IHostNetworkInterface_getStatusRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getStatus(req)
       return  HostNetworkInterfaceStatus(self.mgr,val._returnval)
   def getInterfaceType(self):
       req=IHostNetworkInterface_getInterfaceTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostNetworkInterface_getInterfaceType(req)
       return  HostNetworkInterfaceType(self.mgr,val._returnval)


   _Attrs_={         'name':[getName,None],
         'id':[getId,None],
         'networkName':[getNetworkName,None],
         'dhcpEnabled':[getDhcpEnabled,None],
         'IPAddress':[getIPAddress,None],
         'networkMask':[getNetworkMask,None],
         'IPV6Supported':[getIPV6Supported,None],
         'IPV6Address':[getIPV6Address,None],
         'IPV6NetworkMaskPrefixLength':[getIPV6NetworkMaskPrefixLength,None],
         'hardwareAddress':[getHardwareAddress,None],
         'mediumType':[getMediumType,None],
         'status':[getStatus,None],
         'interfaceType':[getInterfaceType,None]}

class IHost(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IHost(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IHost._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IHost._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getProcessorSpeed(self, _arg_cpuId):
       req=IHost_getProcessorSpeedRequestMsg()
       req._this=self.handle
       
       req._cpuId=_arg_cpuId
       val=self.mgr.getPort().IHost_getProcessorSpeed(req)
       
       return UnsignedInt(self.mgr,val._returnval)


   def getProcessorFeature(self, _arg_feature):
       req=IHost_getProcessorFeatureRequestMsg()
       req._this=self.handle
       
       req._feature=_arg_feature
       val=self.mgr.getPort().IHost_getProcessorFeature(req)
       
       return Boolean(self.mgr,val._returnval)


   def getProcessorDescription(self, _arg_cpuId):
       req=IHost_getProcessorDescriptionRequestMsg()
       req._this=self.handle
       
       req._cpuId=_arg_cpuId
       val=self.mgr.getPort().IHost_getProcessorDescription(req)
       
       return String(self.mgr,val._returnval)


   def getProcessorCPUIDLeaf(self, _arg_cpuId, _arg_leaf, _arg_subLeaf):
       req=IHost_getProcessorCPUIDLeafRequestMsg()
       req._this=self.handle
       
       req._cpuId=_arg_cpuId
       req._leaf=_arg_leaf
       req._subLeaf=_arg_subLeaf
       val=self.mgr.getPort().IHost_getProcessorCPUIDLeaf(req)
       
       return UnsignedInt(self.mgr,val._valEax), UnsignedInt(self.mgr,val._valEbx), UnsignedInt(self.mgr,val._valEcx), UnsignedInt(self.mgr,val._valEdx)


   def createHostOnlyNetworkInterface(self):
       req=IHost_createHostOnlyNetworkInterfaceRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IHost_createHostOnlyNetworkInterface(req)
       
       return IProgress(self.mgr,val._returnval), IHostNetworkInterface(self.mgr,val._hostInterface)


   def removeHostOnlyNetworkInterface(self, _arg_id):
       req=IHost_removeHostOnlyNetworkInterfaceRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IHost_removeHostOnlyNetworkInterface(req)
       
       return IProgress(self.mgr,val._returnval)


   def createUSBDeviceFilter(self, _arg_name):
       req=IHost_createUSBDeviceFilterRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IHost_createUSBDeviceFilter(req)
       
       return IHostUSBDeviceFilter(self.mgr,val._returnval)


   def insertUSBDeviceFilter(self, _arg_position, _arg_filter):
       req=IHost_insertUSBDeviceFilterRequestMsg()
       req._this=self.handle
       
       req._position=_arg_position
       req._filter=_arg_filter
       val=self.mgr.getPort().IHost_insertUSBDeviceFilter(req)
       
       return 


   def removeUSBDeviceFilter(self, _arg_position):
       req=IHost_removeUSBDeviceFilterRequestMsg()
       req._this=self.handle
       
       req._position=_arg_position
       val=self.mgr.getPort().IHost_removeUSBDeviceFilter(req)
       
       return 


   def findHostDVDDrive(self, _arg_name):
       req=IHost_findHostDVDDriveRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IHost_findHostDVDDrive(req)
       
       return IMedium(self.mgr,val._returnval)


   def findHostFloppyDrive(self, _arg_name):
       req=IHost_findHostFloppyDriveRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IHost_findHostFloppyDrive(req)
       
       return IMedium(self.mgr,val._returnval)


   def findHostNetworkInterfaceByName(self, _arg_name):
       req=IHost_findHostNetworkInterfaceByNameRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IHost_findHostNetworkInterfaceByName(req)
       
       return IHostNetworkInterface(self.mgr,val._returnval)


   def findHostNetworkInterfaceById(self, _arg_id):
       req=IHost_findHostNetworkInterfaceByIdRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IHost_findHostNetworkInterfaceById(req)
       
       return IHostNetworkInterface(self.mgr,val._returnval)


   def findHostNetworkInterfacesOfType(self, _arg_type):
       req=IHost_findHostNetworkInterfacesOfTypeRequestMsg()
       req._this=self.handle
       
       req._type=_arg_type
       val=self.mgr.getPort().IHost_findHostNetworkInterfacesOfType(req)
       
       return IHostNetworkInterface(self.mgr,val._returnval, True)


   def findUSBDeviceById(self, _arg_id):
       req=IHost_findUSBDeviceByIdRequestMsg()
       req._this=self.handle
       
       req._id=_arg_id
       val=self.mgr.getPort().IHost_findUSBDeviceById(req)
       
       return IHostUSBDevice(self.mgr,val._returnval)


   def findUSBDeviceByAddress(self, _arg_name):
       req=IHost_findUSBDeviceByAddressRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IHost_findUSBDeviceByAddress(req)
       
       return IHostUSBDevice(self.mgr,val._returnval)


   def getDVDDrives(self):
       req=IHost_getDVDDrivesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getDVDDrives(req)
       return  IMedium(self.mgr,val._returnval, True)
   def getFloppyDrives(self):
       req=IHost_getFloppyDrivesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getFloppyDrives(req)
       return  IMedium(self.mgr,val._returnval, True)
   def getUSBDevices(self):
       req=IHost_getUSBDevicesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getUSBDevices(req)
       return  IHostUSBDevice(self.mgr,val._returnval, True)
   def getUSBDeviceFilters(self):
       req=IHost_getUSBDeviceFiltersRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getUSBDeviceFilters(req)
       return  IHostUSBDeviceFilter(self.mgr,val._returnval, True)
   def getNetworkInterfaces(self):
       req=IHost_getNetworkInterfacesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getNetworkInterfaces(req)
       return  IHostNetworkInterface(self.mgr,val._returnval, True)
   def getProcessorCount(self):
       req=IHost_getProcessorCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getProcessorCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getProcessorOnlineCount(self):
       req=IHost_getProcessorOnlineCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getProcessorOnlineCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getProcessorCoreCount(self):
       req=IHost_getProcessorCoreCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getProcessorCoreCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMemorySize(self):
       req=IHost_getMemorySizeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getMemorySize(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMemoryAvailable(self):
       req=IHost_getMemoryAvailableRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getMemoryAvailable(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getOperatingSystem(self):
       req=IHost_getOperatingSystemRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getOperatingSystem(req)
       return  String(self.mgr,val._returnval)
   def getOSVersion(self):
       req=IHost_getOSVersionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getOSVersion(req)
       return  String(self.mgr,val._returnval)
   def getUTCTime(self):
       req=IHost_getUTCTimeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getUTCTime(req)
       return  Long(self.mgr,val._returnval)
   def getAcceleration3DAvailable(self):
       req=IHost_getAcceleration3DAvailableRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHost_getAcceleration3DAvailable(req)
       return  Boolean(self.mgr,val._returnval)


   _Attrs_={         'DVDDrives':[getDVDDrives,None],
         'floppyDrives':[getFloppyDrives,None],
         'USBDevices':[getUSBDevices,None],
         'USBDeviceFilters':[getUSBDeviceFilters,None],
         'networkInterfaces':[getNetworkInterfaces,None],
         'processorCount':[getProcessorCount,None],
         'processorOnlineCount':[getProcessorOnlineCount,None],
         'processorCoreCount':[getProcessorCoreCount,None],
         'memorySize':[getMemorySize,None],
         'memoryAvailable':[getMemoryAvailable,None],
         'operatingSystem':[getOperatingSystem,None],
         'OSVersion':[getOSVersion,None],
         'UTCTime':[getUTCTime,None],
         'Acceleration3DAvailable':[getAcceleration3DAvailable,None]}

class ISystemProperties(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return ISystemProperties(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = ISystemProperties._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = ISystemProperties._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getMaxDevicesPerPortForStorageBus(self, _arg_bus):
       req=ISystemProperties_getMaxDevicesPerPortForStorageBusRequestMsg()
       req._this=self.handle
       
       req._bus=_arg_bus
       val=self.mgr.getPort().ISystemProperties_getMaxDevicesPerPortForStorageBus(req)
       
       return UnsignedInt(self.mgr,val._returnval)


   def getMinPortCountForStorageBus(self, _arg_bus):
       req=ISystemProperties_getMinPortCountForStorageBusRequestMsg()
       req._this=self.handle
       
       req._bus=_arg_bus
       val=self.mgr.getPort().ISystemProperties_getMinPortCountForStorageBus(req)
       
       return UnsignedInt(self.mgr,val._returnval)


   def getMaxPortCountForStorageBus(self, _arg_bus):
       req=ISystemProperties_getMaxPortCountForStorageBusRequestMsg()
       req._this=self.handle
       
       req._bus=_arg_bus
       val=self.mgr.getPort().ISystemProperties_getMaxPortCountForStorageBus(req)
       
       return UnsignedInt(self.mgr,val._returnval)


   def getMaxInstancesOfStorageBus(self, _arg_bus):
       req=ISystemProperties_getMaxInstancesOfStorageBusRequestMsg()
       req._this=self.handle
       
       req._bus=_arg_bus
       val=self.mgr.getPort().ISystemProperties_getMaxInstancesOfStorageBus(req)
       
       return UnsignedInt(self.mgr,val._returnval)


   def getDeviceTypesForStorageBus(self, _arg_bus):
       req=ISystemProperties_getDeviceTypesForStorageBusRequestMsg()
       req._this=self.handle
       
       req._bus=_arg_bus
       val=self.mgr.getPort().ISystemProperties_getDeviceTypesForStorageBus(req)
       
       return DeviceType(self.mgr,val._returnval, True)


   def getMinGuestRAM(self):
       req=ISystemProperties_getMinGuestRAMRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMinGuestRAM(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMaxGuestRAM(self):
       req=ISystemProperties_getMaxGuestRAMRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMaxGuestRAM(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMinGuestVRAM(self):
       req=ISystemProperties_getMinGuestVRAMRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMinGuestVRAM(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMaxGuestVRAM(self):
       req=ISystemProperties_getMaxGuestVRAMRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMaxGuestVRAM(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMinGuestCPUCount(self):
       req=ISystemProperties_getMinGuestCPUCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMinGuestCPUCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMaxGuestCPUCount(self):
       req=ISystemProperties_getMaxGuestCPUCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMaxGuestCPUCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMaxGuestMonitors(self):
       req=ISystemProperties_getMaxGuestMonitorsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMaxGuestMonitors(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMaxVDISize(self):
       req=ISystemProperties_getMaxVDISizeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMaxVDISize(req)
       return  UnsignedLong(self.mgr,val._returnval)
   def getNetworkAdapterCount(self):
       req=ISystemProperties_getNetworkAdapterCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getNetworkAdapterCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getSerialPortCount(self):
       req=ISystemProperties_getSerialPortCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getSerialPortCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getParallelPortCount(self):
       req=ISystemProperties_getParallelPortCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getParallelPortCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMaxBootPosition(self):
       req=ISystemProperties_getMaxBootPositionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMaxBootPosition(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getDefaultMachineFolder(self):
       req=ISystemProperties_getDefaultMachineFolderRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getDefaultMachineFolder(req)
       return  String(self.mgr,val._returnval)
   def setDefaultMachineFolder(self, value):
       req=ISystemProperties_setDefaultMachineFolderRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._defaultMachineFolder = value
       else:
            req._defaultMachineFolder = value.handle
       self.mgr.getPort().ISystemProperties_setDefaultMachineFolder(req)

   def getDefaultHardDiskFolder(self):
       req=ISystemProperties_getDefaultHardDiskFolderRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getDefaultHardDiskFolder(req)
       return  String(self.mgr,val._returnval)
   def setDefaultHardDiskFolder(self, value):
       req=ISystemProperties_setDefaultHardDiskFolderRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._defaultHardDiskFolder = value
       else:
            req._defaultHardDiskFolder = value.handle
       self.mgr.getPort().ISystemProperties_setDefaultHardDiskFolder(req)

   def getMediumFormats(self):
       req=ISystemProperties_getMediumFormatsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getMediumFormats(req)
       return  IMediumFormat(self.mgr,val._returnval, True)
   def getDefaultHardDiskFormat(self):
       req=ISystemProperties_getDefaultHardDiskFormatRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getDefaultHardDiskFormat(req)
       return  String(self.mgr,val._returnval)
   def setDefaultHardDiskFormat(self, value):
       req=ISystemProperties_setDefaultHardDiskFormatRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._defaultHardDiskFormat = value
       else:
            req._defaultHardDiskFormat = value.handle
       self.mgr.getPort().ISystemProperties_setDefaultHardDiskFormat(req)

   def getFreeDiskSpaceWarning(self):
       req=ISystemProperties_getFreeDiskSpaceWarningRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getFreeDiskSpaceWarning(req)
       return  UnsignedLong(self.mgr,val._returnval)
   def setFreeDiskSpaceWarning(self, value):
       req=ISystemProperties_setFreeDiskSpaceWarningRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._freeDiskSpaceWarning = value
       else:
            req._freeDiskSpaceWarning = value.handle
       self.mgr.getPort().ISystemProperties_setFreeDiskSpaceWarning(req)

   def getFreeDiskSpacePercentWarning(self):
       req=ISystemProperties_getFreeDiskSpacePercentWarningRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getFreeDiskSpacePercentWarning(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setFreeDiskSpacePercentWarning(self, value):
       req=ISystemProperties_setFreeDiskSpacePercentWarningRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._freeDiskSpacePercentWarning = value
       else:
            req._freeDiskSpacePercentWarning = value.handle
       self.mgr.getPort().ISystemProperties_setFreeDiskSpacePercentWarning(req)

   def getFreeDiskSpaceError(self):
       req=ISystemProperties_getFreeDiskSpaceErrorRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getFreeDiskSpaceError(req)
       return  UnsignedLong(self.mgr,val._returnval)
   def setFreeDiskSpaceError(self, value):
       req=ISystemProperties_setFreeDiskSpaceErrorRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._freeDiskSpaceError = value
       else:
            req._freeDiskSpaceError = value.handle
       self.mgr.getPort().ISystemProperties_setFreeDiskSpaceError(req)

   def getFreeDiskSpacePercentError(self):
       req=ISystemProperties_getFreeDiskSpacePercentErrorRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getFreeDiskSpacePercentError(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setFreeDiskSpacePercentError(self, value):
       req=ISystemProperties_setFreeDiskSpacePercentErrorRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._freeDiskSpacePercentError = value
       else:
            req._freeDiskSpacePercentError = value.handle
       self.mgr.getPort().ISystemProperties_setFreeDiskSpacePercentError(req)

   def getRemoteDisplayAuthLibrary(self):
       req=ISystemProperties_getRemoteDisplayAuthLibraryRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getRemoteDisplayAuthLibrary(req)
       return  String(self.mgr,val._returnval)
   def setRemoteDisplayAuthLibrary(self, value):
       req=ISystemProperties_setRemoteDisplayAuthLibraryRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._remoteDisplayAuthLibrary = value
       else:
            req._remoteDisplayAuthLibrary = value.handle
       self.mgr.getPort().ISystemProperties_setRemoteDisplayAuthLibrary(req)

   def getWebServiceAuthLibrary(self):
       req=ISystemProperties_getWebServiceAuthLibraryRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getWebServiceAuthLibrary(req)
       return  String(self.mgr,val._returnval)
   def setWebServiceAuthLibrary(self, value):
       req=ISystemProperties_setWebServiceAuthLibraryRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._webServiceAuthLibrary = value
       else:
            req._webServiceAuthLibrary = value.handle
       self.mgr.getPort().ISystemProperties_setWebServiceAuthLibrary(req)

   def getLogHistoryCount(self):
       req=ISystemProperties_getLogHistoryCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getLogHistoryCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setLogHistoryCount(self, value):
       req=ISystemProperties_setLogHistoryCountRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._LogHistoryCount = value
       else:
            req._LogHistoryCount = value.handle
       self.mgr.getPort().ISystemProperties_setLogHistoryCount(req)

   def getDefaultAudioDriver(self):
       req=ISystemProperties_getDefaultAudioDriverRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISystemProperties_getDefaultAudioDriver(req)
       return  AudioDriverType(self.mgr,val._returnval)


   _Attrs_={         'minGuestRAM':[getMinGuestRAM,None],
         'maxGuestRAM':[getMaxGuestRAM,None],
         'minGuestVRAM':[getMinGuestVRAM,None],
         'maxGuestVRAM':[getMaxGuestVRAM,None],
         'minGuestCPUCount':[getMinGuestCPUCount,None],
         'maxGuestCPUCount':[getMaxGuestCPUCount,None],
         'maxGuestMonitors':[getMaxGuestMonitors,None],
         'maxVDISize':[getMaxVDISize,None],
         'networkAdapterCount':[getNetworkAdapterCount,None],
         'serialPortCount':[getSerialPortCount,None],
         'parallelPortCount':[getParallelPortCount,None],
         'maxBootPosition':[getMaxBootPosition,None],
         'defaultMachineFolder':[getDefaultMachineFolder,setDefaultMachineFolder,
        ],
         'defaultHardDiskFolder':[getDefaultHardDiskFolder,setDefaultHardDiskFolder,
        ],
         'mediumFormats':[getMediumFormats,None],
         'defaultHardDiskFormat':[getDefaultHardDiskFormat,setDefaultHardDiskFormat,
        ],
         'freeDiskSpaceWarning':[getFreeDiskSpaceWarning,setFreeDiskSpaceWarning,
        ],
         'freeDiskSpacePercentWarning':[getFreeDiskSpacePercentWarning,setFreeDiskSpacePercentWarning,
        ],
         'freeDiskSpaceError':[getFreeDiskSpaceError,setFreeDiskSpaceError,
        ],
         'freeDiskSpacePercentError':[getFreeDiskSpacePercentError,setFreeDiskSpacePercentError,
        ],
         'remoteDisplayAuthLibrary':[getRemoteDisplayAuthLibrary,setRemoteDisplayAuthLibrary,
        ],
         'webServiceAuthLibrary':[getWebServiceAuthLibrary,setWebServiceAuthLibrary,
        ],
         'LogHistoryCount':[getLogHistoryCount,setLogHistoryCount,
        ],
         'defaultAudioDriver':[getDefaultAudioDriver,None]}

class IGuest(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IGuest(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IGuest._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IGuest._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def internalGetStatistics(self):
       req=IGuest_internalGetStatisticsRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IGuest_internalGetStatistics(req)
       
       return UnsignedInt(self.mgr,val._cpuUser), UnsignedInt(self.mgr,val._cpuKernel), UnsignedInt(self.mgr,val._cpuIdle), UnsignedInt(self.mgr,val._memTotal), UnsignedInt(self.mgr,val._memFree), UnsignedInt(self.mgr,val._memBalloon), UnsignedInt(self.mgr,val._memShared), UnsignedInt(self.mgr,val._memCache), UnsignedInt(self.mgr,val._pagedTotal), UnsignedInt(self.mgr,val._memAllocTotal), UnsignedInt(self.mgr,val._memFreeTotal), UnsignedInt(self.mgr,val._memBalloonTotal), UnsignedInt(self.mgr,val._memSharedTotal)


   def setCredentials(self, _arg_userName, _arg_password, _arg_domain, _arg_allowInteractiveLogon):
       req=IGuest_setCredentialsRequestMsg()
       req._this=self.handle
       
       req._userName=_arg_userName
       req._password=_arg_password
       req._domain=_arg_domain
       req._allowInteractiveLogon=_arg_allowInteractiveLogon
       val=self.mgr.getPort().IGuest_setCredentials(req)
       
       return 


   def executeProcess(self, _arg_execName, _arg_flags, _arg_arguments, _arg_environment, _arg_userName, _arg_password, _arg_timeoutMS):
       req=IGuest_executeProcessRequestMsg()
       req._this=self.handle
       
       req._execName=_arg_execName
       req._flags=_arg_flags
       req._arguments=_arg_arguments
       req._environment=_arg_environment
       req._userName=_arg_userName
       req._password=_arg_password
       req._timeoutMS=_arg_timeoutMS
       val=self.mgr.getPort().IGuest_executeProcess(req)
       
       return IProgress(self.mgr,val._returnval), UnsignedInt(self.mgr,val._pid)


   def getProcessOutput(self, _arg_pid, _arg_flags, _arg_timeoutMS, _arg_size):
       req=IGuest_getProcessOutputRequestMsg()
       req._this=self.handle
       
       req._pid=_arg_pid
       req._flags=_arg_flags
       req._timeoutMS=_arg_timeoutMS
       req._size=_arg_size
       val=self.mgr.getPort().IGuest_getProcessOutput(req)
       
       return Octet(self.mgr,val._returnval, True)


   def getProcessStatus(self, _arg_pid):
       req=IGuest_getProcessStatusRequestMsg()
       req._this=self.handle
       
       req._pid=_arg_pid
       val=self.mgr.getPort().IGuest_getProcessStatus(req)
       
       return UnsignedInt(self.mgr,val._returnval), UnsignedInt(self.mgr,val._exitcode), UnsignedInt(self.mgr,val._flags)


   def getOSTypeId(self):
       req=IGuest_getOSTypeIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IGuest_getOSTypeId(req)
       return  String(self.mgr,val._returnval)
   def getAdditionsActive(self):
       req=IGuest_getAdditionsActiveRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IGuest_getAdditionsActive(req)
       return  Boolean(self.mgr,val._returnval)
   def getAdditionsVersion(self):
       req=IGuest_getAdditionsVersionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IGuest_getAdditionsVersion(req)
       return  String(self.mgr,val._returnval)
   def getSupportsSeamless(self):
       req=IGuest_getSupportsSeamlessRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IGuest_getSupportsSeamless(req)
       return  Boolean(self.mgr,val._returnval)
   def getSupportsGraphics(self):
       req=IGuest_getSupportsGraphicsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IGuest_getSupportsGraphics(req)
       return  Boolean(self.mgr,val._returnval)
   def getMemoryBalloonSize(self):
       req=IGuest_getMemoryBalloonSizeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IGuest_getMemoryBalloonSize(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setMemoryBalloonSize(self, value):
       req=IGuest_setMemoryBalloonSizeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._memoryBalloonSize = value
       else:
            req._memoryBalloonSize = value.handle
       self.mgr.getPort().IGuest_setMemoryBalloonSize(req)

   def getPageFusionEnabled(self):
       req=IGuest_getPageFusionEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IGuest_getPageFusionEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setPageFusionEnabled(self, value):
       req=IGuest_setPageFusionEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._pageFusionEnabled = value
       else:
            req._pageFusionEnabled = value.handle
       self.mgr.getPort().IGuest_setPageFusionEnabled(req)

   def getStatisticsUpdateInterval(self):
       req=IGuest_getStatisticsUpdateIntervalRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IGuest_getStatisticsUpdateInterval(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setStatisticsUpdateInterval(self, value):
       req=IGuest_setStatisticsUpdateIntervalRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._statisticsUpdateInterval = value
       else:
            req._statisticsUpdateInterval = value.handle
       self.mgr.getPort().IGuest_setStatisticsUpdateInterval(req)



   _Attrs_={         'OSTypeId':[getOSTypeId,None],
         'additionsActive':[getAdditionsActive,None],
         'additionsVersion':[getAdditionsVersion,None],
         'supportsSeamless':[getSupportsSeamless,None],
         'supportsGraphics':[getSupportsGraphics,None],
         'memoryBalloonSize':[getMemoryBalloonSize,setMemoryBalloonSize,
        ],
         'pageFusionEnabled':[getPageFusionEnabled,setPageFusionEnabled,
        ],
         'statisticsUpdateInterval':[getStatisticsUpdateInterval,setStatisticsUpdateInterval,
        ]}

class IProgress(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IProgress(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IProgress._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IProgress._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def setCurrentOperationProgress(self, _arg_percent):
       req=IProgress_setCurrentOperationProgressRequestMsg()
       req._this=self.handle
       
       req._percent=_arg_percent
       val=self.mgr.getPort().IProgress_setCurrentOperationProgress(req)
       
       return 


   def setNextOperation(self, _arg_nextOperationDescription, _arg_nextOperationsWeight):
       req=IProgress_setNextOperationRequestMsg()
       req._this=self.handle
       
       req._nextOperationDescription=_arg_nextOperationDescription
       req._nextOperationsWeight=_arg_nextOperationsWeight
       val=self.mgr.getPort().IProgress_setNextOperation(req)
       
       return 


   def waitForCompletion(self, _arg_timeout):
       req=IProgress_waitForCompletionRequestMsg()
       req._this=self.handle
       
       req._timeout=_arg_timeout
       val=self.mgr.getPort().IProgress_waitForCompletion(req)
       
       return 


   def waitForOperationCompletion(self, _arg_operation, _arg_timeout):
       req=IProgress_waitForOperationCompletionRequestMsg()
       req._this=self.handle
       
       req._operation=_arg_operation
       req._timeout=_arg_timeout
       val=self.mgr.getPort().IProgress_waitForOperationCompletion(req)
       
       return 


   def cancel(self):
       req=IProgress_cancelRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IProgress_cancel(req)
       
       return 


   def getId(self):
       req=IProgress_getIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getId(req)
       return  String(self.mgr,val._returnval)
   def getDescription(self):
       req=IProgress_getDescriptionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getDescription(req)
       return  String(self.mgr,val._returnval)
   def getInitiator(self):
       req=IProgress_getInitiatorRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getInitiator(req)
       return  IUnknown(self.mgr,val._returnval)
   def getCancelable(self):
       req=IProgress_getCancelableRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getCancelable(req)
       return  Boolean(self.mgr,val._returnval)
   def getPercent(self):
       req=IProgress_getPercentRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getPercent(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getTimeRemaining(self):
       req=IProgress_getTimeRemainingRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getTimeRemaining(req)
       return  Int(self.mgr,val._returnval)
   def getCompleted(self):
       req=IProgress_getCompletedRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getCompleted(req)
       return  Boolean(self.mgr,val._returnval)
   def getCanceled(self):
       req=IProgress_getCanceledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getCanceled(req)
       return  Boolean(self.mgr,val._returnval)
   def getResultCode(self):
       req=IProgress_getResultCodeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getResultCode(req)
       return  Int(self.mgr,val._returnval)
   def getErrorInfo(self):
       req=IProgress_getErrorInfoRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getErrorInfo(req)
       return  IVirtualBoxErrorInfo(self.mgr,val._returnval)
   def getOperationCount(self):
       req=IProgress_getOperationCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getOperationCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getOperation(self):
       req=IProgress_getOperationRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getOperation(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getOperationDescription(self):
       req=IProgress_getOperationDescriptionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getOperationDescription(req)
       return  String(self.mgr,val._returnval)
   def getOperationPercent(self):
       req=IProgress_getOperationPercentRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getOperationPercent(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getTimeout(self):
       req=IProgress_getTimeoutRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IProgress_getTimeout(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setTimeout(self, value):
       req=IProgress_setTimeoutRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._timeout = value
       else:
            req._timeout = value.handle
       self.mgr.getPort().IProgress_setTimeout(req)



   _Attrs_={         'id':[getId,None],
         'description':[getDescription,None],
         'initiator':[getInitiator,None],
         'cancelable':[getCancelable,None],
         'percent':[getPercent,None],
         'timeRemaining':[getTimeRemaining,None],
         'completed':[getCompleted,None],
         'canceled':[getCanceled,None],
         'resultCode':[getResultCode,None],
         'errorInfo':[getErrorInfo,None],
         'operationCount':[getOperationCount,None],
         'operation':[getOperation,None],
         'operationDescription':[getOperationDescription,None],
         'operationPercent':[getOperationPercent,None],
         'timeout':[getTimeout,setTimeout,
        ]}

class ISnapshot(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return ISnapshot(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = ISnapshot._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = ISnapshot._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getId(self):
       req=ISnapshot_getIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISnapshot_getId(req)
       return  String(self.mgr,val._returnval)
   def getName(self):
       req=ISnapshot_getNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISnapshot_getName(req)
       return  String(self.mgr,val._returnval)
   def setName(self, value):
       req=ISnapshot_setNameRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._name = value
       else:
            req._name = value.handle
       self.mgr.getPort().ISnapshot_setName(req)

   def getDescription(self):
       req=ISnapshot_getDescriptionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISnapshot_getDescription(req)
       return  String(self.mgr,val._returnval)
   def setDescription(self, value):
       req=ISnapshot_setDescriptionRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._description = value
       else:
            req._description = value.handle
       self.mgr.getPort().ISnapshot_setDescription(req)

   def getTimeStamp(self):
       req=ISnapshot_getTimeStampRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISnapshot_getTimeStamp(req)
       return  Long(self.mgr,val._returnval)
   def getOnline(self):
       req=ISnapshot_getOnlineRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISnapshot_getOnline(req)
       return  Boolean(self.mgr,val._returnval)
   def getMachine(self):
       req=ISnapshot_getMachineRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISnapshot_getMachine(req)
       return  IMachine(self.mgr,val._returnval)
   def getParent(self):
       req=ISnapshot_getParentRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISnapshot_getParent(req)
       return  ISnapshot(self.mgr,val._returnval)
   def getChildren(self):
       req=ISnapshot_getChildrenRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISnapshot_getChildren(req)
       return  ISnapshot(self.mgr,val._returnval, True)


   _Attrs_={         'id':[getId,None],
         'name':[getName,setName,
        ],
         'description':[getDescription,setDescription,
        ],
         'timeStamp':[getTimeStamp,None],
         'online':[getOnline,None],
         'machine':[getMachine,None],
         'parent':[getParent,None],
         'children':[getChildren,None]}

class IMedium(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IMedium(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IMedium._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IMedium._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def refreshState(self):
       req=IMedium_refreshStateRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMedium_refreshState(req)
       
       return MediumState(self.mgr,val._returnval)


   def getSnapshotIds(self, _arg_machineId):
       req=IMedium_getSnapshotIdsRequestMsg()
       req._this=self.handle
       
       req._machineId=_arg_machineId
       val=self.mgr.getPort().IMedium_getSnapshotIds(req)
       
       return String(self.mgr,val._returnval, True)


   def lockRead(self):
       req=IMedium_lockReadRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMedium_lockRead(req)
       
       return MediumState(self.mgr,val._returnval)


   def unlockRead(self):
       req=IMedium_unlockReadRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMedium_unlockRead(req)
       
       return MediumState(self.mgr,val._returnval)


   def lockWrite(self):
       req=IMedium_lockWriteRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMedium_lockWrite(req)
       
       return MediumState(self.mgr,val._returnval)


   def unlockWrite(self):
       req=IMedium_unlockWriteRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMedium_unlockWrite(req)
       
       return MediumState(self.mgr,val._returnval)


   def close(self):
       req=IMedium_closeRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMedium_close(req)
       
       return 


   def getProperty(self, _arg_name):
       req=IMedium_getPropertyRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IMedium_getProperty(req)
       
       return String(self.mgr,val._returnval)


   def setProperty(self, _arg_name, _arg_value):
       req=IMedium_setPropertyRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._value=_arg_value
       val=self.mgr.getPort().IMedium_setProperty(req)
       
       return 


   def getProperties(self, _arg_names):
       req=IMedium_getPropertiesRequestMsg()
       req._this=self.handle
       
       req._names=_arg_names
       val=self.mgr.getPort().IMedium_getProperties(req)
       
       return String(self.mgr,val._returnval, True), String(self.mgr,val._returnNames, True)


   def setProperties(self, _arg_names, _arg_values):
       req=IMedium_setPropertiesRequestMsg()
       req._this=self.handle
       
       req._names=_arg_names
       req._values=_arg_values
       val=self.mgr.getPort().IMedium_setProperties(req)
       
       return 


   def createBaseStorage(self, _arg_logicalSize, _arg_variant):
       req=IMedium_createBaseStorageRequestMsg()
       req._this=self.handle
       
       req._logicalSize=_arg_logicalSize
       req._variant=_arg_variant
       val=self.mgr.getPort().IMedium_createBaseStorage(req)
       
       return IProgress(self.mgr,val._returnval)


   def deleteStorage(self):
       req=IMedium_deleteStorageRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMedium_deleteStorage(req)
       
       return IProgress(self.mgr,val._returnval)


   def createDiffStorage(self, _arg_target, _arg_variant):
       req=IMedium_createDiffStorageRequestMsg()
       req._this=self.handle
       
       req._target=_arg_target
       req._variant=_arg_variant
       val=self.mgr.getPort().IMedium_createDiffStorage(req)
       
       return IProgress(self.mgr,val._returnval)


   def mergeTo(self, _arg_target):
       req=IMedium_mergeToRequestMsg()
       req._this=self.handle
       
       req._target=_arg_target
       val=self.mgr.getPort().IMedium_mergeTo(req)
       
       return IProgress(self.mgr,val._returnval)


   def cloneTo(self, _arg_target, _arg_variant, _arg_parent):
       req=IMedium_cloneToRequestMsg()
       req._this=self.handle
       
       req._target=_arg_target
       req._variant=_arg_variant
       req._parent=_arg_parent
       val=self.mgr.getPort().IMedium_cloneTo(req)
       
       return IProgress(self.mgr,val._returnval)


   def compact(self):
       req=IMedium_compactRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMedium_compact(req)
       
       return IProgress(self.mgr,val._returnval)


   def resize(self, _arg_logicalSize):
       req=IMedium_resizeRequestMsg()
       req._this=self.handle
       
       req._logicalSize=_arg_logicalSize
       val=self.mgr.getPort().IMedium_resize(req)
       
       return IProgress(self.mgr,val._returnval)


   def reset(self):
       req=IMedium_resetRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMedium_reset(req)
       
       return IProgress(self.mgr,val._returnval)


   def getId(self):
       req=IMedium_getIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getId(req)
       return  String(self.mgr,val._returnval)
   def getDescription(self):
       req=IMedium_getDescriptionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getDescription(req)
       return  String(self.mgr,val._returnval)
   def setDescription(self, value):
       req=IMedium_setDescriptionRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._description = value
       else:
            req._description = value.handle
       self.mgr.getPort().IMedium_setDescription(req)

   def getState(self):
       req=IMedium_getStateRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getState(req)
       return  MediumState(self.mgr,val._returnval)
   def getLocation(self):
       req=IMedium_getLocationRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getLocation(req)
       return  String(self.mgr,val._returnval)
   def setLocation(self, value):
       req=IMedium_setLocationRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._location = value
       else:
            req._location = value.handle
       self.mgr.getPort().IMedium_setLocation(req)

   def getName(self):
       req=IMedium_getNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getName(req)
       return  String(self.mgr,val._returnval)
   def getDeviceType(self):
       req=IMedium_getDeviceTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getDeviceType(req)
       return  DeviceType(self.mgr,val._returnval)
   def getHostDrive(self):
       req=IMedium_getHostDriveRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getHostDrive(req)
       return  Boolean(self.mgr,val._returnval)
   def getSize(self):
       req=IMedium_getSizeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getSize(req)
       return  UnsignedLong(self.mgr,val._returnval)
   def getFormat(self):
       req=IMedium_getFormatRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getFormat(req)
       return  String(self.mgr,val._returnval)
   def getMediumFormat(self):
       req=IMedium_getMediumFormatRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getMediumFormat(req)
       return  IMediumFormat(self.mgr,val._returnval)
   def getType(self):
       req=IMedium_getTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getType(req)
       return  MediumType(self.mgr,val._returnval)
   def setType(self, value):
       req=IMedium_setTypeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._type = value
       else:
            req._type = value.handle
       self.mgr.getPort().IMedium_setType(req)

   def getParent(self):
       req=IMedium_getParentRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getParent(req)
       return  IMedium(self.mgr,val._returnval)
   def getChildren(self):
       req=IMedium_getChildrenRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getChildren(req)
       return  IMedium(self.mgr,val._returnval, True)
   def getBase(self):
       req=IMedium_getBaseRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getBase(req)
       return  IMedium(self.mgr,val._returnval)
   def getReadOnly(self):
       req=IMedium_getReadOnlyRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getReadOnly(req)
       return  Boolean(self.mgr,val._returnval)
   def getLogicalSize(self):
       req=IMedium_getLogicalSizeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getLogicalSize(req)
       return  UnsignedLong(self.mgr,val._returnval)
   def getAutoReset(self):
       req=IMedium_getAutoResetRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getAutoReset(req)
       return  Boolean(self.mgr,val._returnval)
   def setAutoReset(self, value):
       req=IMedium_setAutoResetRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._autoReset = value
       else:
            req._autoReset = value.handle
       self.mgr.getPort().IMedium_setAutoReset(req)

   def getLastAccessError(self):
       req=IMedium_getLastAccessErrorRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getLastAccessError(req)
       return  String(self.mgr,val._returnval)
   def getMachineIds(self):
       req=IMedium_getMachineIdsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMedium_getMachineIds(req)
       return  String(self.mgr,val._returnval, True)


   _Attrs_={         'id':[getId,None],
         'description':[getDescription,setDescription,
        ],
         'state':[getState,None],
         'location':[getLocation,setLocation,
        ],
         'name':[getName,None],
         'deviceType':[getDeviceType,None],
         'hostDrive':[getHostDrive,None],
         'size':[getSize,None],
         'format':[getFormat,None],
         'mediumFormat':[getMediumFormat,None],
         'type':[getType,setType,
        ],
         'parent':[getParent,None],
         'children':[getChildren,None],
         'base':[getBase,None],
         'readOnly':[getReadOnly,None],
         'logicalSize':[getLogicalSize,None],
         'autoReset':[getAutoReset,setAutoReset,
        ],
         'lastAccessError':[getLastAccessError,None],
         'machineIds':[getMachineIds,None]}

class IMediumFormat(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IMediumFormat(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IMediumFormat._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IMediumFormat._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def describeProperties(self):
       req=IMediumFormat_describePropertiesRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IMediumFormat_describeProperties(req)
       
       return String(self.mgr,val._names, True), String(self.mgr,val._description, True), DataType(self.mgr,val._types, True), UnsignedInt(self.mgr,val._flags, True), String(self.mgr,val._defaults, True)


   def getId(self):
       req=IMediumFormat_getIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMediumFormat_getId(req)
       return  String(self.mgr,val._returnval)
   def getName(self):
       req=IMediumFormat_getNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMediumFormat_getName(req)
       return  String(self.mgr,val._returnval)
   def getFileExtensions(self):
       req=IMediumFormat_getFileExtensionsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMediumFormat_getFileExtensions(req)
       return  String(self.mgr,val._returnval, True)
   def getCapabilities(self):
       req=IMediumFormat_getCapabilitiesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMediumFormat_getCapabilities(req)
       return  UnsignedInt(self.mgr,val._returnval)


   _Attrs_={         'id':[getId,None],
         'name':[getName,None],
         'fileExtensions':[getFileExtensions,None],
         'capabilities':[getCapabilities,None]}

class IKeyboard(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IKeyboard(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IKeyboard._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IKeyboard._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def putScancode(self, _arg_scancode):
       req=IKeyboard_putScancodeRequestMsg()
       req._this=self.handle
       
       req._scancode=_arg_scancode
       val=self.mgr.getPort().IKeyboard_putScancode(req)
       
       return 


   def putScancodes(self, _arg_scancodes):
       req=IKeyboard_putScancodesRequestMsg()
       req._this=self.handle
       
       req._scancodes=_arg_scancodes
       val=self.mgr.getPort().IKeyboard_putScancodes(req)
       
       return UnsignedInt(self.mgr,val._returnval)


   def putCAD(self):
       req=IKeyboard_putCADRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IKeyboard_putCAD(req)
       
       return 




   _Attrs_={}

class IMouse(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IMouse(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IMouse._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IMouse._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def putMouseEvent(self, _arg_dx, _arg_dy, _arg_dz, _arg_dw, _arg_buttonState):
       req=IMouse_putMouseEventRequestMsg()
       req._this=self.handle
       
       req._dx=_arg_dx
       req._dy=_arg_dy
       req._dz=_arg_dz
       req._dw=_arg_dw
       req._buttonState=_arg_buttonState
       val=self.mgr.getPort().IMouse_putMouseEvent(req)
       
       return 


   def putMouseEventAbsolute(self, _arg_x, _arg_y, _arg_dz, _arg_dw, _arg_buttonState):
       req=IMouse_putMouseEventAbsoluteRequestMsg()
       req._this=self.handle
       
       req._x=_arg_x
       req._y=_arg_y
       req._dz=_arg_dz
       req._dw=_arg_dw
       req._buttonState=_arg_buttonState
       val=self.mgr.getPort().IMouse_putMouseEventAbsolute(req)
       
       return 


   def getAbsoluteSupported(self):
       req=IMouse_getAbsoluteSupportedRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMouse_getAbsoluteSupported(req)
       return  Boolean(self.mgr,val._returnval)
   def getRelativeSupported(self):
       req=IMouse_getRelativeSupportedRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMouse_getRelativeSupported(req)
       return  Boolean(self.mgr,val._returnval)
   def getNeedsHostCursor(self):
       req=IMouse_getNeedsHostCursorRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IMouse_getNeedsHostCursor(req)
       return  Boolean(self.mgr,val._returnval)


   _Attrs_={         'absoluteSupported':[getAbsoluteSupported,None],
         'relativeSupported':[getRelativeSupported,None],
         'needsHostCursor':[getNeedsHostCursor,None]}

class IDisplay(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IDisplay(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IDisplay._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IDisplay._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getScreenResolution(self, _arg_screenId):
       req=IDisplay_getScreenResolutionRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       val=self.mgr.getPort().IDisplay_getScreenResolution(req)
       
       return UnsignedInt(self.mgr,val._width), UnsignedInt(self.mgr,val._height), UnsignedInt(self.mgr,val._bitsPerPixel)


   def setFramebuffer(self, _arg_screenId, _arg_framebuffer):
       req=IDisplay_setFramebufferRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       req._framebuffer=_arg_framebuffer
       val=self.mgr.getPort().IDisplay_setFramebuffer(req)
       
       return 


   def getFramebuffer(self, _arg_screenId):
       req=IDisplay_getFramebufferRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       val=self.mgr.getPort().IDisplay_getFramebuffer(req)
       
       return IFramebuffer(self.mgr,val._framebuffer), Int(self.mgr,val._xOrigin), Int(self.mgr,val._yOrigin)


   def setVideoModeHint(self, _arg_width, _arg_height, _arg_bitsPerPixel, _arg_display):
       req=IDisplay_setVideoModeHintRequestMsg()
       req._this=self.handle
       
       req._width=_arg_width
       req._height=_arg_height
       req._bitsPerPixel=_arg_bitsPerPixel
       req._display=_arg_display
       val=self.mgr.getPort().IDisplay_setVideoModeHint(req)
       
       return 


   def setSeamlessMode(self, _arg_enabled):
       req=IDisplay_setSeamlessModeRequestMsg()
       req._this=self.handle
       
       req._enabled=_arg_enabled
       val=self.mgr.getPort().IDisplay_setSeamlessMode(req)
       
       return 


   def takeScreenShot(self, _arg_screenId, _arg_address, _arg_width, _arg_height):
       req=IDisplay_takeScreenShotRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       req._address=_arg_address
       req._width=_arg_width
       req._height=_arg_height
       val=self.mgr.getPort().IDisplay_takeScreenShot(req)
       
       return 


   def takeScreenShotToArray(self, _arg_screenId, _arg_width, _arg_height):
       req=IDisplay_takeScreenShotToArrayRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       req._width=_arg_width
       req._height=_arg_height
       val=self.mgr.getPort().IDisplay_takeScreenShotToArray(req)
       
       return Octet(self.mgr,val._returnval, True)


   def drawToScreen(self, _arg_screenId, _arg_address, _arg_x, _arg_y, _arg_width, _arg_height):
       req=IDisplay_drawToScreenRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       req._address=_arg_address
       req._x=_arg_x
       req._y=_arg_y
       req._width=_arg_width
       req._height=_arg_height
       val=self.mgr.getPort().IDisplay_drawToScreen(req)
       
       return 


   def invalidateAndUpdate(self):
       req=IDisplay_invalidateAndUpdateRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IDisplay_invalidateAndUpdate(req)
       
       return 


   def resizeCompleted(self, _arg_screenId):
       req=IDisplay_resizeCompletedRequestMsg()
       req._this=self.handle
       
       req._screenId=_arg_screenId
       val=self.mgr.getPort().IDisplay_resizeCompleted(req)
       
       return 


   def completeVHWACommand(self, _arg_command):
       req=IDisplay_completeVHWACommandRequestMsg()
       req._this=self.handle
       
       req._command=_arg_command
       val=self.mgr.getPort().IDisplay_completeVHWACommand(req)
       
       return 




   _Attrs_={}

class INetworkAdapter(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return INetworkAdapter(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = INetworkAdapter._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = INetworkAdapter._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def attachToNAT(self):
       req=INetworkAdapter_attachToNATRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().INetworkAdapter_attachToNAT(req)
       
       return 


   def attachToBridgedInterface(self):
       req=INetworkAdapter_attachToBridgedInterfaceRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().INetworkAdapter_attachToBridgedInterface(req)
       
       return 


   def attachToInternalNetwork(self):
       req=INetworkAdapter_attachToInternalNetworkRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().INetworkAdapter_attachToInternalNetwork(req)
       
       return 


   def attachToHostOnlyInterface(self):
       req=INetworkAdapter_attachToHostOnlyInterfaceRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().INetworkAdapter_attachToHostOnlyInterface(req)
       
       return 


   def attachToVDE(self):
       req=INetworkAdapter_attachToVDERequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().INetworkAdapter_attachToVDE(req)
       
       return 


   def detach(self):
       req=INetworkAdapter_detachRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().INetworkAdapter_detach(req)
       
       return 


   def getAdapterType(self):
       req=INetworkAdapter_getAdapterTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getAdapterType(req)
       return  NetworkAdapterType(self.mgr,val._returnval)
   def setAdapterType(self, value):
       req=INetworkAdapter_setAdapterTypeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._adapterType = value
       else:
            req._adapterType = value.handle
       self.mgr.getPort().INetworkAdapter_setAdapterType(req)

   def getSlot(self):
       req=INetworkAdapter_getSlotRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getSlot(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getEnabled(self):
       req=INetworkAdapter_getEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setEnabled(self, value):
       req=INetworkAdapter_setEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._enabled = value
       else:
            req._enabled = value.handle
       self.mgr.getPort().INetworkAdapter_setEnabled(req)

   def getMACAddress(self):
       req=INetworkAdapter_getMACAddressRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getMACAddress(req)
       return  String(self.mgr,val._returnval)
   def setMACAddress(self, value):
       req=INetworkAdapter_setMACAddressRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._MACAddress = value
       else:
            req._MACAddress = value.handle
       self.mgr.getPort().INetworkAdapter_setMACAddress(req)

   def getAttachmentType(self):
       req=INetworkAdapter_getAttachmentTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getAttachmentType(req)
       return  NetworkAttachmentType(self.mgr,val._returnval)
   def getHostInterface(self):
       req=INetworkAdapter_getHostInterfaceRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getHostInterface(req)
       return  String(self.mgr,val._returnval)
   def setHostInterface(self, value):
       req=INetworkAdapter_setHostInterfaceRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._hostInterface = value
       else:
            req._hostInterface = value.handle
       self.mgr.getPort().INetworkAdapter_setHostInterface(req)

   def getInternalNetwork(self):
       req=INetworkAdapter_getInternalNetworkRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getInternalNetwork(req)
       return  String(self.mgr,val._returnval)
   def setInternalNetwork(self, value):
       req=INetworkAdapter_setInternalNetworkRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._internalNetwork = value
       else:
            req._internalNetwork = value.handle
       self.mgr.getPort().INetworkAdapter_setInternalNetwork(req)

   def getNATNetwork(self):
       req=INetworkAdapter_getNATNetworkRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getNATNetwork(req)
       return  String(self.mgr,val._returnval)
   def setNATNetwork(self, value):
       req=INetworkAdapter_setNATNetworkRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._NATNetwork = value
       else:
            req._NATNetwork = value.handle
       self.mgr.getPort().INetworkAdapter_setNATNetwork(req)

   def getVDENetwork(self):
       req=INetworkAdapter_getVDENetworkRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getVDENetwork(req)
       return  String(self.mgr,val._returnval)
   def setVDENetwork(self, value):
       req=INetworkAdapter_setVDENetworkRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._VDENetwork = value
       else:
            req._VDENetwork = value.handle
       self.mgr.getPort().INetworkAdapter_setVDENetwork(req)

   def getCableConnected(self):
       req=INetworkAdapter_getCableConnectedRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getCableConnected(req)
       return  Boolean(self.mgr,val._returnval)
   def setCableConnected(self, value):
       req=INetworkAdapter_setCableConnectedRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._cableConnected = value
       else:
            req._cableConnected = value.handle
       self.mgr.getPort().INetworkAdapter_setCableConnected(req)

   def getLineSpeed(self):
       req=INetworkAdapter_getLineSpeedRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getLineSpeed(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setLineSpeed(self, value):
       req=INetworkAdapter_setLineSpeedRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._lineSpeed = value
       else:
            req._lineSpeed = value.handle
       self.mgr.getPort().INetworkAdapter_setLineSpeed(req)

   def getTraceEnabled(self):
       req=INetworkAdapter_getTraceEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getTraceEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setTraceEnabled(self, value):
       req=INetworkAdapter_setTraceEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._traceEnabled = value
       else:
            req._traceEnabled = value.handle
       self.mgr.getPort().INetworkAdapter_setTraceEnabled(req)

   def getTraceFile(self):
       req=INetworkAdapter_getTraceFileRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getTraceFile(req)
       return  String(self.mgr,val._returnval)
   def setTraceFile(self, value):
       req=INetworkAdapter_setTraceFileRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._traceFile = value
       else:
            req._traceFile = value.handle
       self.mgr.getPort().INetworkAdapter_setTraceFile(req)

   def getNatDriver(self):
       req=INetworkAdapter_getNatDriverRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getNatDriver(req)
       return  INATEngine(self.mgr,val._returnval)
   def getBootPriority(self):
       req=INetworkAdapter_getBootPriorityRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INetworkAdapter_getBootPriority(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setBootPriority(self, value):
       req=INetworkAdapter_setBootPriorityRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._bootPriority = value
       else:
            req._bootPriority = value.handle
       self.mgr.getPort().INetworkAdapter_setBootPriority(req)



   _Attrs_={         'adapterType':[getAdapterType,setAdapterType,
        ],
         'slot':[getSlot,None],
         'enabled':[getEnabled,setEnabled,
        ],
         'MACAddress':[getMACAddress,setMACAddress,
        ],
         'attachmentType':[getAttachmentType,None],
         'hostInterface':[getHostInterface,setHostInterface,
        ],
         'internalNetwork':[getInternalNetwork,setInternalNetwork,
        ],
         'NATNetwork':[getNATNetwork,setNATNetwork,
        ],
         'VDENetwork':[getVDENetwork,setVDENetwork,
        ],
         'cableConnected':[getCableConnected,setCableConnected,
        ],
         'lineSpeed':[getLineSpeed,setLineSpeed,
        ],
         'traceEnabled':[getTraceEnabled,setTraceEnabled,
        ],
         'traceFile':[getTraceFile,setTraceFile,
        ],
         'natDriver':[getNatDriver,None],
         'bootPriority':[getBootPriority,setBootPriority,
        ]}

class ISerialPort(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return ISerialPort(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = ISerialPort._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = ISerialPort._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getSlot(self):
       req=ISerialPort_getSlotRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISerialPort_getSlot(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getEnabled(self):
       req=ISerialPort_getEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISerialPort_getEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setEnabled(self, value):
       req=ISerialPort_setEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._enabled = value
       else:
            req._enabled = value.handle
       self.mgr.getPort().ISerialPort_setEnabled(req)

   def getIOBase(self):
       req=ISerialPort_getIOBaseRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISerialPort_getIOBase(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setIOBase(self, value):
       req=ISerialPort_setIOBaseRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._IOBase = value
       else:
            req._IOBase = value.handle
       self.mgr.getPort().ISerialPort_setIOBase(req)

   def getIRQ(self):
       req=ISerialPort_getIRQRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISerialPort_getIRQ(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setIRQ(self, value):
       req=ISerialPort_setIRQRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._IRQ = value
       else:
            req._IRQ = value.handle
       self.mgr.getPort().ISerialPort_setIRQ(req)

   def getHostMode(self):
       req=ISerialPort_getHostModeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISerialPort_getHostMode(req)
       return  PortMode(self.mgr,val._returnval)
   def setHostMode(self, value):
       req=ISerialPort_setHostModeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._hostMode = value
       else:
            req._hostMode = value.handle
       self.mgr.getPort().ISerialPort_setHostMode(req)

   def getServer(self):
       req=ISerialPort_getServerRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISerialPort_getServer(req)
       return  Boolean(self.mgr,val._returnval)
   def setServer(self, value):
       req=ISerialPort_setServerRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._server = value
       else:
            req._server = value.handle
       self.mgr.getPort().ISerialPort_setServer(req)

   def getPath(self):
       req=ISerialPort_getPathRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISerialPort_getPath(req)
       return  String(self.mgr,val._returnval)
   def setPath(self, value):
       req=ISerialPort_setPathRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._path = value
       else:
            req._path = value.handle
       self.mgr.getPort().ISerialPort_setPath(req)



   _Attrs_={         'slot':[getSlot,None],
         'enabled':[getEnabled,setEnabled,
        ],
         'IOBase':[getIOBase,setIOBase,
        ],
         'IRQ':[getIRQ,setIRQ,
        ],
         'hostMode':[getHostMode,setHostMode,
        ],
         'server':[getServer,setServer,
        ],
         'path':[getPath,setPath,
        ]}

class IParallelPort(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IParallelPort(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IParallelPort._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IParallelPort._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getSlot(self):
       req=IParallelPort_getSlotRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IParallelPort_getSlot(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getEnabled(self):
       req=IParallelPort_getEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IParallelPort_getEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setEnabled(self, value):
       req=IParallelPort_setEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._enabled = value
       else:
            req._enabled = value.handle
       self.mgr.getPort().IParallelPort_setEnabled(req)

   def getIOBase(self):
       req=IParallelPort_getIOBaseRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IParallelPort_getIOBase(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setIOBase(self, value):
       req=IParallelPort_setIOBaseRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._IOBase = value
       else:
            req._IOBase = value.handle
       self.mgr.getPort().IParallelPort_setIOBase(req)

   def getIRQ(self):
       req=IParallelPort_getIRQRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IParallelPort_getIRQ(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setIRQ(self, value):
       req=IParallelPort_setIRQRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._IRQ = value
       else:
            req._IRQ = value.handle
       self.mgr.getPort().IParallelPort_setIRQ(req)

   def getPath(self):
       req=IParallelPort_getPathRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IParallelPort_getPath(req)
       return  String(self.mgr,val._returnval)
   def setPath(self, value):
       req=IParallelPort_setPathRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._path = value
       else:
            req._path = value.handle
       self.mgr.getPort().IParallelPort_setPath(req)



   _Attrs_={         'slot':[getSlot,None],
         'enabled':[getEnabled,setEnabled,
        ],
         'IOBase':[getIOBase,setIOBase,
        ],
         'IRQ':[getIRQ,setIRQ,
        ],
         'path':[getPath,setPath,
        ]}

class IUSBController(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IUSBController(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IUSBController._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IUSBController._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def createDeviceFilter(self, _arg_name):
       req=IUSBController_createDeviceFilterRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().IUSBController_createDeviceFilter(req)
       
       return IUSBDeviceFilter(self.mgr,val._returnval)


   def insertDeviceFilter(self, _arg_position, _arg_filter):
       req=IUSBController_insertDeviceFilterRequestMsg()
       req._this=self.handle
       
       req._position=_arg_position
       req._filter=_arg_filter
       val=self.mgr.getPort().IUSBController_insertDeviceFilter(req)
       
       return 


   def removeDeviceFilter(self, _arg_position):
       req=IUSBController_removeDeviceFilterRequestMsg()
       req._this=self.handle
       
       req._position=_arg_position
       val=self.mgr.getPort().IUSBController_removeDeviceFilter(req)
       
       return IUSBDeviceFilter(self.mgr,val._returnval)


   def getEnabled(self):
       req=IUSBController_getEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBController_getEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setEnabled(self, value):
       req=IUSBController_setEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._enabled = value
       else:
            req._enabled = value.handle
       self.mgr.getPort().IUSBController_setEnabled(req)

   def getEnabledEhci(self):
       req=IUSBController_getEnabledEhciRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBController_getEnabledEhci(req)
       return  Boolean(self.mgr,val._returnval)
   def setEnabledEhci(self, value):
       req=IUSBController_setEnabledEhciRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._enabledEhci = value
       else:
            req._enabledEhci = value.handle
       self.mgr.getPort().IUSBController_setEnabledEhci(req)

   def getProxyAvailable(self):
       req=IUSBController_getProxyAvailableRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBController_getProxyAvailable(req)
       return  Boolean(self.mgr,val._returnval)
   def getUSBStandard(self):
       req=IUSBController_getUSBStandardRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBController_getUSBStandard(req)
       return  UnsignedShort(self.mgr,val._returnval)
   def getDeviceFilters(self):
       req=IUSBController_getDeviceFiltersRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBController_getDeviceFilters(req)
       return  IUSBDeviceFilter(self.mgr,val._returnval, True)


   _Attrs_={         'enabled':[getEnabled,setEnabled,
        ],
         'enabledEhci':[getEnabledEhci,setEnabledEhci,
        ],
         'proxyAvailable':[getProxyAvailable,None],
         'USBStandard':[getUSBStandard,None],
         'deviceFilters':[getDeviceFilters,None]}

class IUSBDevice(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IUSBDevice(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IUSBDevice._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IUSBDevice._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getId(self):
       req=IUSBDevice_getIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getId(req)
       return  String(self.mgr,val._returnval)
   def getVendorId(self):
       req=IUSBDevice_getVendorIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getVendorId(req)
       return  UnsignedShort(self.mgr,val._returnval)
   def getProductId(self):
       req=IUSBDevice_getProductIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getProductId(req)
       return  UnsignedShort(self.mgr,val._returnval)
   def getRevision(self):
       req=IUSBDevice_getRevisionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getRevision(req)
       return  UnsignedShort(self.mgr,val._returnval)
   def getManufacturer(self):
       req=IUSBDevice_getManufacturerRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getManufacturer(req)
       return  String(self.mgr,val._returnval)
   def getProduct(self):
       req=IUSBDevice_getProductRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getProduct(req)
       return  String(self.mgr,val._returnval)
   def getSerialNumber(self):
       req=IUSBDevice_getSerialNumberRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getSerialNumber(req)
       return  String(self.mgr,val._returnval)
   def getAddress(self):
       req=IUSBDevice_getAddressRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getAddress(req)
       return  String(self.mgr,val._returnval)
   def getPort(self):
       req=IUSBDevice_getPortRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getPort(req)
       return  UnsignedShort(self.mgr,val._returnval)
   def getVersion(self):
       req=IUSBDevice_getVersionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getVersion(req)
       return  UnsignedShort(self.mgr,val._returnval)
   def getPortVersion(self):
       req=IUSBDevice_getPortVersionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getPortVersion(req)
       return  UnsignedShort(self.mgr,val._returnval)
   def getRemote(self):
       req=IUSBDevice_getRemoteRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDevice_getRemote(req)
       return  Boolean(self.mgr,val._returnval)


   _Attrs_={         'id':[getId,None],
         'vendorId':[getVendorId,None],
         'productId':[getProductId,None],
         'revision':[getRevision,None],
         'manufacturer':[getManufacturer,None],
         'product':[getProduct,None],
         'serialNumber':[getSerialNumber,None],
         'address':[getAddress,None],
         'port':[getPort,None],
         'version':[getVersion,None],
         'portVersion':[getPortVersion,None],
         'remote':[getRemote,None]}

class IUSBDeviceFilter(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IUSBDeviceFilter(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IUSBDeviceFilter._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IUSBDeviceFilter._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getName(self):
       req=IUSBDeviceFilter_getNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getName(req)
       return  String(self.mgr,val._returnval)
   def setName(self, value):
       req=IUSBDeviceFilter_setNameRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._name = value
       else:
            req._name = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setName(req)

   def getActive(self):
       req=IUSBDeviceFilter_getActiveRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getActive(req)
       return  Boolean(self.mgr,val._returnval)
   def setActive(self, value):
       req=IUSBDeviceFilter_setActiveRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._active = value
       else:
            req._active = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setActive(req)

   def getVendorId(self):
       req=IUSBDeviceFilter_getVendorIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getVendorId(req)
       return  String(self.mgr,val._returnval)
   def setVendorId(self, value):
       req=IUSBDeviceFilter_setVendorIdRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._vendorId = value
       else:
            req._vendorId = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setVendorId(req)

   def getProductId(self):
       req=IUSBDeviceFilter_getProductIdRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getProductId(req)
       return  String(self.mgr,val._returnval)
   def setProductId(self, value):
       req=IUSBDeviceFilter_setProductIdRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._productId = value
       else:
            req._productId = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setProductId(req)

   def getRevision(self):
       req=IUSBDeviceFilter_getRevisionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getRevision(req)
       return  String(self.mgr,val._returnval)
   def setRevision(self, value):
       req=IUSBDeviceFilter_setRevisionRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._revision = value
       else:
            req._revision = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setRevision(req)

   def getManufacturer(self):
       req=IUSBDeviceFilter_getManufacturerRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getManufacturer(req)
       return  String(self.mgr,val._returnval)
   def setManufacturer(self, value):
       req=IUSBDeviceFilter_setManufacturerRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._manufacturer = value
       else:
            req._manufacturer = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setManufacturer(req)

   def getProduct(self):
       req=IUSBDeviceFilter_getProductRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getProduct(req)
       return  String(self.mgr,val._returnval)
   def setProduct(self, value):
       req=IUSBDeviceFilter_setProductRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._product = value
       else:
            req._product = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setProduct(req)

   def getSerialNumber(self):
       req=IUSBDeviceFilter_getSerialNumberRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getSerialNumber(req)
       return  String(self.mgr,val._returnval)
   def setSerialNumber(self, value):
       req=IUSBDeviceFilter_setSerialNumberRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._serialNumber = value
       else:
            req._serialNumber = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setSerialNumber(req)

   def getPort(self):
       req=IUSBDeviceFilter_getPortRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getPort(req)
       return  String(self.mgr,val._returnval)
   def setPort(self, value):
       req=IUSBDeviceFilter_setPortRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._port = value
       else:
            req._port = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setPort(req)

   def getRemote(self):
       req=IUSBDeviceFilter_getRemoteRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getRemote(req)
       return  String(self.mgr,val._returnval)
   def setRemote(self, value):
       req=IUSBDeviceFilter_setRemoteRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._remote = value
       else:
            req._remote = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setRemote(req)

   def getMaskedInterfaces(self):
       req=IUSBDeviceFilter_getMaskedInterfacesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IUSBDeviceFilter_getMaskedInterfaces(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setMaskedInterfaces(self, value):
       req=IUSBDeviceFilter_setMaskedInterfacesRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._maskedInterfaces = value
       else:
            req._maskedInterfaces = value.handle
       self.mgr.getPort().IUSBDeviceFilter_setMaskedInterfaces(req)



   _Attrs_={         'name':[getName,setName,
        ],
         'active':[getActive,setActive,
        ],
         'vendorId':[getVendorId,setVendorId,
        ],
         'productId':[getProductId,setProductId,
        ],
         'revision':[getRevision,setRevision,
        ],
         'manufacturer':[getManufacturer,setManufacturer,
        ],
         'product':[getProduct,setProduct,
        ],
         'serialNumber':[getSerialNumber,setSerialNumber,
        ],
         'port':[getPort,setPort,
        ],
         'remote':[getRemote,setRemote,
        ],
         'maskedInterfaces':[getMaskedInterfaces,setMaskedInterfaces,
        ]}

class IHostUSBDevice(IUSBDevice):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IHostUSBDevice(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IHostUSBDevice._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUSBDevice.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IHostUSBDevice._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getState(self):
       req=IHostUSBDevice_getStateRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostUSBDevice_getState(req)
       return  USBDeviceState(self.mgr,val._returnval)


   _Attrs_={         'state':[getState,None]}

class IHostUSBDeviceFilter(IUSBDeviceFilter):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IHostUSBDeviceFilter(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IHostUSBDeviceFilter._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUSBDeviceFilter.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IHostUSBDeviceFilter._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getAction(self):
       req=IHostUSBDeviceFilter_getActionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IHostUSBDeviceFilter_getAction(req)
       return  USBDeviceFilterAction(self.mgr,val._returnval)
   def setAction(self, value):
       req=IHostUSBDeviceFilter_setActionRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._action = value
       else:
            req._action = value.handle
       self.mgr.getPort().IHostUSBDeviceFilter_setAction(req)



   _Attrs_={         'action':[getAction,setAction,
        ]}

class IAudioAdapter(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IAudioAdapter(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IAudioAdapter._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IAudioAdapter._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getEnabled(self):
       req=IAudioAdapter_getEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IAudioAdapter_getEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setEnabled(self, value):
       req=IAudioAdapter_setEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._enabled = value
       else:
            req._enabled = value.handle
       self.mgr.getPort().IAudioAdapter_setEnabled(req)

   def getAudioController(self):
       req=IAudioAdapter_getAudioControllerRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IAudioAdapter_getAudioController(req)
       return  AudioControllerType(self.mgr,val._returnval)
   def setAudioController(self, value):
       req=IAudioAdapter_setAudioControllerRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._audioController = value
       else:
            req._audioController = value.handle
       self.mgr.getPort().IAudioAdapter_setAudioController(req)

   def getAudioDriver(self):
       req=IAudioAdapter_getAudioDriverRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IAudioAdapter_getAudioDriver(req)
       return  AudioDriverType(self.mgr,val._returnval)
   def setAudioDriver(self, value):
       req=IAudioAdapter_setAudioDriverRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._audioDriver = value
       else:
            req._audioDriver = value.handle
       self.mgr.getPort().IAudioAdapter_setAudioDriver(req)



   _Attrs_={         'enabled':[getEnabled,setEnabled,
        ],
         'audioController':[getAudioController,setAudioController,
        ],
         'audioDriver':[getAudioDriver,setAudioDriver,
        ]}

class IVRDPServer(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IVRDPServer(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IVRDPServer._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IVRDPServer._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getEnabled(self):
       req=IVRDPServer_getEnabledRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVRDPServer_getEnabled(req)
       return  Boolean(self.mgr,val._returnval)
   def setEnabled(self, value):
       req=IVRDPServer_setEnabledRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._enabled = value
       else:
            req._enabled = value.handle
       self.mgr.getPort().IVRDPServer_setEnabled(req)

   def getPorts(self):
       req=IVRDPServer_getPortsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVRDPServer_getPorts(req)
       return  String(self.mgr,val._returnval)
   def setPorts(self, value):
       req=IVRDPServer_setPortsRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._ports = value
       else:
            req._ports = value.handle
       self.mgr.getPort().IVRDPServer_setPorts(req)

   def getNetAddress(self):
       req=IVRDPServer_getNetAddressRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVRDPServer_getNetAddress(req)
       return  String(self.mgr,val._returnval)
   def setNetAddress(self, value):
       req=IVRDPServer_setNetAddressRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._netAddress = value
       else:
            req._netAddress = value.handle
       self.mgr.getPort().IVRDPServer_setNetAddress(req)

   def getAuthType(self):
       req=IVRDPServer_getAuthTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVRDPServer_getAuthType(req)
       return  VRDPAuthType(self.mgr,val._returnval)
   def setAuthType(self, value):
       req=IVRDPServer_setAuthTypeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._authType = value
       else:
            req._authType = value.handle
       self.mgr.getPort().IVRDPServer_setAuthType(req)

   def getAuthTimeout(self):
       req=IVRDPServer_getAuthTimeoutRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVRDPServer_getAuthTimeout(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setAuthTimeout(self, value):
       req=IVRDPServer_setAuthTimeoutRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._authTimeout = value
       else:
            req._authTimeout = value.handle
       self.mgr.getPort().IVRDPServer_setAuthTimeout(req)

   def getAllowMultiConnection(self):
       req=IVRDPServer_getAllowMultiConnectionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVRDPServer_getAllowMultiConnection(req)
       return  Boolean(self.mgr,val._returnval)
   def setAllowMultiConnection(self, value):
       req=IVRDPServer_setAllowMultiConnectionRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._allowMultiConnection = value
       else:
            req._allowMultiConnection = value.handle
       self.mgr.getPort().IVRDPServer_setAllowMultiConnection(req)

   def getReuseSingleConnection(self):
       req=IVRDPServer_getReuseSingleConnectionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVRDPServer_getReuseSingleConnection(req)
       return  Boolean(self.mgr,val._returnval)
   def setReuseSingleConnection(self, value):
       req=IVRDPServer_setReuseSingleConnectionRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._reuseSingleConnection = value
       else:
            req._reuseSingleConnection = value.handle
       self.mgr.getPort().IVRDPServer_setReuseSingleConnection(req)

   def getVideoChannel(self):
       req=IVRDPServer_getVideoChannelRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVRDPServer_getVideoChannel(req)
       return  Boolean(self.mgr,val._returnval)
   def setVideoChannel(self, value):
       req=IVRDPServer_setVideoChannelRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._videoChannel = value
       else:
            req._videoChannel = value.handle
       self.mgr.getPort().IVRDPServer_setVideoChannel(req)

   def getVideoChannelQuality(self):
       req=IVRDPServer_getVideoChannelQualityRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IVRDPServer_getVideoChannelQuality(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setVideoChannelQuality(self, value):
       req=IVRDPServer_setVideoChannelQualityRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._videoChannelQuality = value
       else:
            req._videoChannelQuality = value.handle
       self.mgr.getPort().IVRDPServer_setVideoChannelQuality(req)



   _Attrs_={         'enabled':[getEnabled,setEnabled,
        ],
         'ports':[getPorts,setPorts,
        ],
         'netAddress':[getNetAddress,setNetAddress,
        ],
         'authType':[getAuthType,setAuthType,
        ],
         'authTimeout':[getAuthTimeout,setAuthTimeout,
        ],
         'allowMultiConnection':[getAllowMultiConnection,setAllowMultiConnection,
        ],
         'reuseSingleConnection':[getReuseSingleConnection,setReuseSingleConnection,
        ],
         'videoChannel':[getVideoChannel,setVideoChannel,
        ],
         'videoChannelQuality':[getVideoChannelQuality,setVideoChannelQuality,
        ]}

class ISession(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return ISession(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = ISession._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = ISession._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def close(self):
       req=ISession_closeRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().ISession_close(req)
       
       return 


   def getState(self):
       req=ISession_getStateRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISession_getState(req)
       return  SessionState(self.mgr,val._returnval)
   def getType(self):
       req=ISession_getTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISession_getType(req)
       return  SessionType(self.mgr,val._returnval)
   def getMachine(self):
       req=ISession_getMachineRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISession_getMachine(req)
       return  IMachine(self.mgr,val._returnval)
   def getConsole(self):
       req=ISession_getConsoleRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().ISession_getConsole(req)
       return  IConsole(self.mgr,val._returnval)


   _Attrs_={         'state':[getState,None],
         'type':[getType,None],
         'machine':[getMachine,None],
         'console':[getConsole,None]}

class IStorageController(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IStorageController(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IStorageController._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IStorageController._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getIDEEmulationPort(self, _arg_devicePosition):
       req=IStorageController_getIDEEmulationPortRequestMsg()
       req._this=self.handle
       
       req._devicePosition=_arg_devicePosition
       val=self.mgr.getPort().IStorageController_getIDEEmulationPort(req)
       
       return Int(self.mgr,val._returnval)


   def setIDEEmulationPort(self, _arg_devicePosition, _arg_portNumber):
       req=IStorageController_setIDEEmulationPortRequestMsg()
       req._this=self.handle
       
       req._devicePosition=_arg_devicePosition
       req._portNumber=_arg_portNumber
       val=self.mgr.getPort().IStorageController_setIDEEmulationPort(req)
       
       return 


   def getName(self):
       req=IStorageController_getNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IStorageController_getName(req)
       return  String(self.mgr,val._returnval)
   def getMaxDevicesPerPortCount(self):
       req=IStorageController_getMaxDevicesPerPortCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IStorageController_getMaxDevicesPerPortCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMinPortCount(self):
       req=IStorageController_getMinPortCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IStorageController_getMinPortCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getMaxPortCount(self):
       req=IStorageController_getMaxPortCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IStorageController_getMaxPortCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getInstance(self):
       req=IStorageController_getInstanceRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IStorageController_getInstance(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setInstance(self, value):
       req=IStorageController_setInstanceRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._instance = value
       else:
            req._instance = value.handle
       self.mgr.getPort().IStorageController_setInstance(req)

   def getPortCount(self):
       req=IStorageController_getPortCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IStorageController_getPortCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setPortCount(self, value):
       req=IStorageController_setPortCountRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._portCount = value
       else:
            req._portCount = value.handle
       self.mgr.getPort().IStorageController_setPortCount(req)

   def getBus(self):
       req=IStorageController_getBusRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IStorageController_getBus(req)
       return  StorageBus(self.mgr,val._returnval)
   def getControllerType(self):
       req=IStorageController_getControllerTypeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IStorageController_getControllerType(req)
       return  StorageControllerType(self.mgr,val._returnval)
   def setControllerType(self, value):
       req=IStorageController_setControllerTypeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._controllerType = value
       else:
            req._controllerType = value.handle
       self.mgr.getPort().IStorageController_setControllerType(req)

   def getUseHostIOCache(self):
       req=IStorageController_getUseHostIOCacheRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IStorageController_getUseHostIOCache(req)
       return  Boolean(self.mgr,val._returnval)
   def setUseHostIOCache(self, value):
       req=IStorageController_setUseHostIOCacheRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._useHostIOCache = value
       else:
            req._useHostIOCache = value.handle
       self.mgr.getPort().IStorageController_setUseHostIOCache(req)



   _Attrs_={         'name':[getName,None],
         'maxDevicesPerPortCount':[getMaxDevicesPerPortCount,None],
         'minPortCount':[getMinPortCount,None],
         'maxPortCount':[getMaxPortCount,None],
         'instance':[getInstance,setInstance,
        ],
         'portCount':[getPortCount,setPortCount,
        ],
         'bus':[getBus,None],
         'controllerType':[getControllerType,setControllerType,
        ],
         'useHostIOCache':[getUseHostIOCache,setUseHostIOCache,
        ]}

class IManagedObjectRef(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IManagedObjectRef(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IManagedObjectRef._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IManagedObjectRef._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getInterfaceName(self):
       req=IManagedObjectRef_getInterfaceNameRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IManagedObjectRef_getInterfaceName(req)
       
       return String(self.mgr,val._returnval)


   def release(self):
       req=IManagedObjectRef_releaseRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().IManagedObjectRef_release(req)
       
       return 




   _Attrs_={}

class IWebsessionManager(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IWebsessionManager(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IWebsessionManager._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IWebsessionManager._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def logon(self, _arg_username, _arg_password):
       req=IWebsessionManager_logonRequestMsg()
       req._this=self.handle
       
       req._username=_arg_username
       req._password=_arg_password
       val=self.mgr.getPort().IWebsessionManager_logon(req)
       
       return IVirtualBox(self.mgr,val._returnval)


   def getSessionObject(self, _arg_refIVirtualBox):
       req=IWebsessionManager_getSessionObjectRequestMsg()
       req._this=self.handle
       
       req._refIVirtualBox=_arg_refIVirtualBox
       val=self.mgr.getPort().IWebsessionManager_getSessionObject(req)
       
       return ISession(self.mgr,val._returnval)


   def logoff(self, _arg_refIVirtualBox):
       req=IWebsessionManager_logoffRequestMsg()
       req._this=self.handle
       
       req._refIVirtualBox=_arg_refIVirtualBox
       val=self.mgr.getPort().IWebsessionManager_logoff(req)
       
       return 




   _Attrs_={}

class IPerformanceMetric(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IPerformanceMetric(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IPerformanceMetric._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IPerformanceMetric._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getMetricName(self):
       req=IPerformanceMetric_getMetricNameRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IPerformanceMetric_getMetricName(req)
       return  String(self.mgr,val._returnval)
   def getObject(self):
       req=IPerformanceMetric_getObjectRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IPerformanceMetric_getObject(req)
       return  IUnknown(self.mgr,val._returnval)
   def getDescription(self):
       req=IPerformanceMetric_getDescriptionRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IPerformanceMetric_getDescription(req)
       return  String(self.mgr,val._returnval)
   def getPeriod(self):
       req=IPerformanceMetric_getPeriodRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IPerformanceMetric_getPeriod(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getCount(self):
       req=IPerformanceMetric_getCountRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IPerformanceMetric_getCount(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def getUnit(self):
       req=IPerformanceMetric_getUnitRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IPerformanceMetric_getUnit(req)
       return  String(self.mgr,val._returnval)
   def getMinimumValue(self):
       req=IPerformanceMetric_getMinimumValueRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IPerformanceMetric_getMinimumValue(req)
       return  Int(self.mgr,val._returnval)
   def getMaximumValue(self):
       req=IPerformanceMetric_getMaximumValueRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IPerformanceMetric_getMaximumValue(req)
       return  Int(self.mgr,val._returnval)


   _Attrs_={         'metricName':[getMetricName,None],
         'object':[getObject,None],
         'description':[getDescription,None],
         'period':[getPeriod,None],
         'count':[getCount,None],
         'unit':[getUnit,None],
         'minimumValue':[getMinimumValue,None],
         'maximumValue':[getMaximumValue,None]}

class IPerformanceCollector(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return IPerformanceCollector(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = IPerformanceCollector._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = IPerformanceCollector._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def getMetrics(self, _arg_metricNames, _arg_objects):
       req=IPerformanceCollector_getMetricsRequestMsg()
       req._this=self.handle
       
       req._metricNames=_arg_metricNames
       req._objects=_arg_objects
       val=self.mgr.getPort().IPerformanceCollector_getMetrics(req)
       
       return IPerformanceMetric(self.mgr,val._returnval, True)


   def setupMetrics(self, _arg_metricNames, _arg_objects, _arg_period, _arg_count):
       req=IPerformanceCollector_setupMetricsRequestMsg()
       req._this=self.handle
       
       req._metricNames=_arg_metricNames
       req._objects=_arg_objects
       req._period=_arg_period
       req._count=_arg_count
       val=self.mgr.getPort().IPerformanceCollector_setupMetrics(req)
       
       return IPerformanceMetric(self.mgr,val._returnval, True)


   def enableMetrics(self, _arg_metricNames, _arg_objects):
       req=IPerformanceCollector_enableMetricsRequestMsg()
       req._this=self.handle
       
       req._metricNames=_arg_metricNames
       req._objects=_arg_objects
       val=self.mgr.getPort().IPerformanceCollector_enableMetrics(req)
       
       return IPerformanceMetric(self.mgr,val._returnval, True)


   def disableMetrics(self, _arg_metricNames, _arg_objects):
       req=IPerformanceCollector_disableMetricsRequestMsg()
       req._this=self.handle
       
       req._metricNames=_arg_metricNames
       req._objects=_arg_objects
       val=self.mgr.getPort().IPerformanceCollector_disableMetrics(req)
       
       return IPerformanceMetric(self.mgr,val._returnval, True)


   def queryMetricsData(self, _arg_metricNames, _arg_objects):
       req=IPerformanceCollector_queryMetricsDataRequestMsg()
       req._this=self.handle
       
       req._metricNames=_arg_metricNames
       req._objects=_arg_objects
       val=self.mgr.getPort().IPerformanceCollector_queryMetricsData(req)
       
       return Int(self.mgr,val._returnval, True), String(self.mgr,val._returnMetricNames, True), IUnknown(self.mgr,val._returnObjects, True), String(self.mgr,val._returnUnits, True), UnsignedInt(self.mgr,val._returnScales, True), UnsignedInt(self.mgr,val._returnSequenceNumbers, True), UnsignedInt(self.mgr,val._returnDataIndices, True), UnsignedInt(self.mgr,val._returnDataLengths, True)


   def getMetricNames(self):
       req=IPerformanceCollector_getMetricNamesRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().IPerformanceCollector_getMetricNames(req)
       return  String(self.mgr,val._returnval, True)


   _Attrs_={         'metricNames':[getMetricNames,None]}

class INATEngine(IUnknown):
   def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       if handle is None:
           raise Exception("bad handle: "+str(handle))
       self.handle = handle
       self.isarray = isarray

   def releaseRemote(self):
        try:
            req=IManagedObjectRef_releaseRequestMsg()
            req._this=handle
            self.mgr.getPort().IManagedObjectRef_release(req)
        except:
            pass

   def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

   def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

   def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

   def __getitem__(self, index):
      if self.isarray:
          return INATEngine(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"

   def __str__(self):
        return self.handle

   def isValid(self):
        return self.handle != None and self.handle != ''

   def __getattr__(self,name):
      hndl = INATEngine._Attrs_.get(name, None)
      if hndl != None:
         if hndl[0] != None:
           return hndl[0](self)
         else:
          raise AttributeError
      else:
         return IUnknown.__getattr__(self, name)

   def __setattr__(self, name, val):
      hndl = INATEngine._Attrs_.get(name, None)
      if (hndl != None and hndl[1] != None):
         hndl[1](self,val)
      else:
         self.__dict__[name] = val

   
   def setNetworkSettings(self, _arg_mtu, _arg_sockSnd, _arg_sockRcv, _arg_TcpWndSnd, _arg_TcpWndRcv):
       req=INATEngine_setNetworkSettingsRequestMsg()
       req._this=self.handle
       
       req._mtu=_arg_mtu
       req._sockSnd=_arg_sockSnd
       req._sockRcv=_arg_sockRcv
       req._TcpWndSnd=_arg_TcpWndSnd
       req._TcpWndRcv=_arg_TcpWndRcv
       val=self.mgr.getPort().INATEngine_setNetworkSettings(req)
       
       return 


   def getNetworkSettings(self):
       req=INATEngine_getNetworkSettingsRequestMsg()
       req._this=self.handle
       
       val=self.mgr.getPort().INATEngine_getNetworkSettings(req)
       
       return UnsignedInt(self.mgr,val._mtu), UnsignedInt(self.mgr,val._sockSnd), UnsignedInt(self.mgr,val._sockRcv), UnsignedInt(self.mgr,val._TcpWndSnd), UnsignedInt(self.mgr,val._TcpWndRcv)


   def addRedirect(self, _arg_name, _arg_proto, _arg_hostIp, _arg_hostPort, _arg_guestIp, _arg_guestPort):
       req=INATEngine_addRedirectRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       req._proto=_arg_proto
       req._hostIp=_arg_hostIp
       req._hostPort=_arg_hostPort
       req._guestIp=_arg_guestIp
       req._guestPort=_arg_guestPort
       val=self.mgr.getPort().INATEngine_addRedirect(req)
       
       return 


   def removeRedirect(self, _arg_name):
       req=INATEngine_removeRedirectRequestMsg()
       req._this=self.handle
       
       req._name=_arg_name
       val=self.mgr.getPort().INATEngine_removeRedirect(req)
       
       return 


   def getNetwork(self):
       req=INATEngine_getNetworkRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getNetwork(req)
       return  String(self.mgr,val._returnval)
   def setNetwork(self, value):
       req=INATEngine_setNetworkRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._network = value
       else:
            req._network = value.handle
       self.mgr.getPort().INATEngine_setNetwork(req)

   def getHostIP(self):
       req=INATEngine_getHostIPRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getHostIP(req)
       return  String(self.mgr,val._returnval)
   def setHostIP(self, value):
       req=INATEngine_setHostIPRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._hostIP = value
       else:
            req._hostIP = value.handle
       self.mgr.getPort().INATEngine_setHostIP(req)

   def getTftpPrefix(self):
       req=INATEngine_getTftpPrefixRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getTftpPrefix(req)
       return  String(self.mgr,val._returnval)
   def setTftpPrefix(self, value):
       req=INATEngine_setTftpPrefixRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._tftpPrefix = value
       else:
            req._tftpPrefix = value.handle
       self.mgr.getPort().INATEngine_setTftpPrefix(req)

   def getTftpBootFile(self):
       req=INATEngine_getTftpBootFileRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getTftpBootFile(req)
       return  String(self.mgr,val._returnval)
   def setTftpBootFile(self, value):
       req=INATEngine_setTftpBootFileRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._tftpBootFile = value
       else:
            req._tftpBootFile = value.handle
       self.mgr.getPort().INATEngine_setTftpBootFile(req)

   def getTftpNextServer(self):
       req=INATEngine_getTftpNextServerRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getTftpNextServer(req)
       return  String(self.mgr,val._returnval)
   def setTftpNextServer(self, value):
       req=INATEngine_setTftpNextServerRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._tftpNextServer = value
       else:
            req._tftpNextServer = value.handle
       self.mgr.getPort().INATEngine_setTftpNextServer(req)

   def getAliasMode(self):
       req=INATEngine_getAliasModeRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getAliasMode(req)
       return  UnsignedInt(self.mgr,val._returnval)
   def setAliasMode(self, value):
       req=INATEngine_setAliasModeRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._aliasMode = value
       else:
            req._aliasMode = value.handle
       self.mgr.getPort().INATEngine_setAliasMode(req)

   def getDnsPassDomain(self):
       req=INATEngine_getDnsPassDomainRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getDnsPassDomain(req)
       return  Boolean(self.mgr,val._returnval)
   def setDnsPassDomain(self, value):
       req=INATEngine_setDnsPassDomainRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._dnsPassDomain = value
       else:
            req._dnsPassDomain = value.handle
       self.mgr.getPort().INATEngine_setDnsPassDomain(req)

   def getDnsProxy(self):
       req=INATEngine_getDnsProxyRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getDnsProxy(req)
       return  Boolean(self.mgr,val._returnval)
   def setDnsProxy(self, value):
       req=INATEngine_setDnsProxyRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._dnsProxy = value
       else:
            req._dnsProxy = value.handle
       self.mgr.getPort().INATEngine_setDnsProxy(req)

   def getDnsUseHostResolver(self):
       req=INATEngine_getDnsUseHostResolverRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getDnsUseHostResolver(req)
       return  Boolean(self.mgr,val._returnval)
   def setDnsUseHostResolver(self, value):
       req=INATEngine_setDnsUseHostResolverRequestMsg()
       req._this=self.handle
       if type(value) in [int, bool, basestring, str]:
            req._dnsUseHostResolver = value
       else:
            req._dnsUseHostResolver = value.handle
       self.mgr.getPort().INATEngine_setDnsUseHostResolver(req)

   def getRedirects(self):
       req=INATEngine_getRedirectsRequestMsg()
       req._this=self.handle
       val=self.mgr.getPort().INATEngine_getRedirects(req)
       return  String(self.mgr,val._returnval, True)


   _Attrs_={         'network':[getNetwork,setNetwork,
        ],
         'hostIP':[getHostIP,setHostIP,
        ],
         'tftpPrefix':[getTftpPrefix,setTftpPrefix,
        ],
         'tftpBootFile':[getTftpBootFile,setTftpBootFile,
        ],
         'tftpNextServer':[getTftpNextServer,setTftpNextServer,
        ],
         'aliasMode':[getAliasMode,setAliasMode,
        ],
         'dnsPassDomain':[getDnsPassDomain,setDnsPassDomain,
        ],
         'dnsProxy':[getDnsProxy,setDnsProxy,
        ],
         'dnsUseHostResolver':[getDnsUseHostResolver,setDnsUseHostResolver,
        ],
         'redirects':[getRedirects,None]}
class IRemoteDisplayInfo:
    def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       self.isarray = isarray
       if isarray:
          self.handle = handle
       else:

          self.active = Boolean(self.mgr, handle._active)
       
          self.port = Int(self.mgr, handle._port)
       
          self.numberOfClients = UnsignedInt(self.mgr, handle._numberOfClients)
       
          self.beginTime = Long(self.mgr, handle._beginTime)
       
          self.endTime = Long(self.mgr, handle._endTime)
       
          self.bytesSent = UnsignedLong(self.mgr, handle._bytesSent)
       
          self.bytesSentTotal = UnsignedLong(self.mgr, handle._bytesSentTotal)
       
          self.bytesReceived = UnsignedLong(self.mgr, handle._bytesReceived)
       
          self.bytesReceivedTotal = UnsignedLong(self.mgr, handle._bytesReceivedTotal)
       
          self.user = String(self.mgr, handle._user)
       
          self.domain = String(self.mgr, handle._domain)
       
          self.clientName = String(self.mgr, handle._clientName)
       
          self.clientIP = String(self.mgr, handle._clientIP)
       
          self.clientVersion = UnsignedInt(self.mgr, handle._clientVersion)
       
          self.encryptionStyle = UnsignedInt(self.mgr, handle._encryptionStyle)
       
          pass

   
    def getActive(self):
       return self.active

    def setActive(self):
       raise Error, 'setters not supported'
    
    def getPort(self):
       return self.port

    def setPort(self):
       raise Error, 'setters not supported'
    
    def getNumberOfClients(self):
       return self.numberOfClients

    def setNumberOfClients(self):
       raise Error, 'setters not supported'
    
    def getBeginTime(self):
       return self.beginTime

    def setBeginTime(self):
       raise Error, 'setters not supported'
    
    def getEndTime(self):
       return self.endTime

    def setEndTime(self):
       raise Error, 'setters not supported'
    
    def getBytesSent(self):
       return self.bytesSent

    def setBytesSent(self):
       raise Error, 'setters not supported'
    
    def getBytesSentTotal(self):
       return self.bytesSentTotal

    def setBytesSentTotal(self):
       raise Error, 'setters not supported'
    
    def getBytesReceived(self):
       return self.bytesReceived

    def setBytesReceived(self):
       raise Error, 'setters not supported'
    
    def getBytesReceivedTotal(self):
       return self.bytesReceivedTotal

    def setBytesReceivedTotal(self):
       raise Error, 'setters not supported'
    
    def getUser(self):
       return self.user

    def setUser(self):
       raise Error, 'setters not supported'
    
    def getDomain(self):
       return self.domain

    def setDomain(self):
       raise Error, 'setters not supported'
    
    def getClientName(self):
       return self.clientName

    def setClientName(self):
       raise Error, 'setters not supported'
    
    def getClientIP(self):
       return self.clientIP

    def setClientIP(self):
       raise Error, 'setters not supported'
    
    def getClientVersion(self):
       return self.clientVersion

    def setClientVersion(self):
       raise Error, 'setters not supported'
    
    def getEncryptionStyle(self):
       return self.encryptionStyle

    def setEncryptionStyle(self):
       raise Error, 'setters not supported'
    

    def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

    def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

    def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

    def __getitem__(self, index):
      if self.isarray:
          return IRemoteDisplayInfo(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"


class IGuestOSType:
    def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       self.isarray = isarray
       if isarray:
          self.handle = handle
       else:

          self.familyId = String(self.mgr, handle._familyId)
       
          self.familyDescription = String(self.mgr, handle._familyDescription)
       
          self.id = String(self.mgr, handle._id)
       
          self.description = String(self.mgr, handle._description)
       
          self.is64Bit = Boolean(self.mgr, handle._is64Bit)
       
          self.recommendedIOAPIC = Boolean(self.mgr, handle._recommendedIOAPIC)
       
          self.recommendedVirtEx = Boolean(self.mgr, handle._recommendedVirtEx)
       
          self.recommendedRAM = UnsignedInt(self.mgr, handle._recommendedRAM)
       
          self.recommendedVRAM = UnsignedInt(self.mgr, handle._recommendedVRAM)
       
          self.recommendedHDD = UnsignedInt(self.mgr, handle._recommendedHDD)
       
          self.adapterType = NetworkAdapterType(self.mgr, handle._adapterType)
       
          self.recommendedPae = Boolean(self.mgr, handle._recommendedPae)
       
          self.recommendedDvdStorageController = StorageControllerType(self.mgr, handle._recommendedDvdStorageController)
       
          self.recommendedDvdStorageBus = StorageBus(self.mgr, handle._recommendedDvdStorageBus)
       
          self.recommendedHdStorageController = StorageControllerType(self.mgr, handle._recommendedHdStorageController)
       
          self.recommendedHdStorageBus = StorageBus(self.mgr, handle._recommendedHdStorageBus)
       
          self.recommendedFirmware = FirmwareType(self.mgr, handle._recommendedFirmware)
       
          self.recommendedUsbHid = Boolean(self.mgr, handle._recommendedUsbHid)
       
          self.recommendedHpet = Boolean(self.mgr, handle._recommendedHpet)
       
          self.recommendedUsbTablet = Boolean(self.mgr, handle._recommendedUsbTablet)
       
          self.recommendedRtcUseUtc = Boolean(self.mgr, handle._recommendedRtcUseUtc)
       
          pass

   
    def getFamilyId(self):
       return self.familyId

    def setFamilyId(self):
       raise Error, 'setters not supported'
    
    def getFamilyDescription(self):
       return self.familyDescription

    def setFamilyDescription(self):
       raise Error, 'setters not supported'
    
    def getId(self):
       return self.id

    def setId(self):
       raise Error, 'setters not supported'
    
    def getDescription(self):
       return self.description

    def setDescription(self):
       raise Error, 'setters not supported'
    
    def getIs64Bit(self):
       return self.is64Bit

    def setIs64Bit(self):
       raise Error, 'setters not supported'
    
    def getRecommendedIOAPIC(self):
       return self.recommendedIOAPIC

    def setRecommendedIOAPIC(self):
       raise Error, 'setters not supported'
    
    def getRecommendedVirtEx(self):
       return self.recommendedVirtEx

    def setRecommendedVirtEx(self):
       raise Error, 'setters not supported'
    
    def getRecommendedRAM(self):
       return self.recommendedRAM

    def setRecommendedRAM(self):
       raise Error, 'setters not supported'
    
    def getRecommendedVRAM(self):
       return self.recommendedVRAM

    def setRecommendedVRAM(self):
       raise Error, 'setters not supported'
    
    def getRecommendedHDD(self):
       return self.recommendedHDD

    def setRecommendedHDD(self):
       raise Error, 'setters not supported'
    
    def getAdapterType(self):
       return self.adapterType

    def setAdapterType(self):
       raise Error, 'setters not supported'
    
    def getRecommendedPae(self):
       return self.recommendedPae

    def setRecommendedPae(self):
       raise Error, 'setters not supported'
    
    def getRecommendedDvdStorageController(self):
       return self.recommendedDvdStorageController

    def setRecommendedDvdStorageController(self):
       raise Error, 'setters not supported'
    
    def getRecommendedDvdStorageBus(self):
       return self.recommendedDvdStorageBus

    def setRecommendedDvdStorageBus(self):
       raise Error, 'setters not supported'
    
    def getRecommendedHdStorageController(self):
       return self.recommendedHdStorageController

    def setRecommendedHdStorageController(self):
       raise Error, 'setters not supported'
    
    def getRecommendedHdStorageBus(self):
       return self.recommendedHdStorageBus

    def setRecommendedHdStorageBus(self):
       raise Error, 'setters not supported'
    
    def getRecommendedFirmware(self):
       return self.recommendedFirmware

    def setRecommendedFirmware(self):
       raise Error, 'setters not supported'
    
    def getRecommendedUsbHid(self):
       return self.recommendedUsbHid

    def setRecommendedUsbHid(self):
       raise Error, 'setters not supported'
    
    def getRecommendedHpet(self):
       return self.recommendedHpet

    def setRecommendedHpet(self):
       raise Error, 'setters not supported'
    
    def getRecommendedUsbTablet(self):
       return self.recommendedUsbTablet

    def setRecommendedUsbTablet(self):
       raise Error, 'setters not supported'
    
    def getRecommendedRtcUseUtc(self):
       return self.recommendedRtcUseUtc

    def setRecommendedRtcUseUtc(self):
       raise Error, 'setters not supported'
    

    def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

    def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

    def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

    def __getitem__(self, index):
      if self.isarray:
          return IGuestOSType(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"


class IMediumAttachment:
    def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       self.isarray = isarray
       if isarray:
          self.handle = handle
       else:

          self.medium = IMedium(self.mgr, handle._medium)
       
          self.controller = String(self.mgr, handle._controller)
       
          self.port = Int(self.mgr, handle._port)
       
          self.device = Int(self.mgr, handle._device)
       
          self.type = DeviceType(self.mgr, handle._type)
       
          self.passthrough = Boolean(self.mgr, handle._passthrough)
       
          pass

   
    def getMedium(self):
       return self.medium

    def setMedium(self):
       raise Error, 'setters not supported'
    
    def getController(self):
       return self.controller

    def setController(self):
       raise Error, 'setters not supported'
    
    def getPort(self):
       return self.port

    def setPort(self):
       raise Error, 'setters not supported'
    
    def getDevice(self):
       return self.device

    def setDevice(self):
       raise Error, 'setters not supported'
    
    def getType(self):
       return self.type

    def setType(self):
       raise Error, 'setters not supported'
    
    def getPassthrough(self):
       return self.passthrough

    def setPassthrough(self):
       raise Error, 'setters not supported'
    

    def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

    def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

    def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

    def __getitem__(self, index):
      if self.isarray:
          return IMediumAttachment(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"


class ISharedFolder:
    def __init__(self, mgr, handle, isarray = False):
       self.mgr = mgr
       self.isarray = isarray
       if isarray:
          self.handle = handle
       else:

          self.name = String(self.mgr, handle._name)
       
          self.hostPath = String(self.mgr, handle._hostPath)
       
          self.accessible = Boolean(self.mgr, handle._accessible)
       
          self.writable = Boolean(self.mgr, handle._writable)
       
          self.lastAccessError = String(self.mgr, handle._lastAccessError)
       
          pass

   
    def getName(self):
       return self.name

    def setName(self):
       raise Error, 'setters not supported'
    
    def getHostPath(self):
       return self.hostPath

    def setHostPath(self):
       raise Error, 'setters not supported'
    
    def getAccessible(self):
       return self.accessible

    def setAccessible(self):
       raise Error, 'setters not supported'
    
    def getWritable(self):
       return self.writable

    def setWritable(self):
       raise Error, 'setters not supported'
    
    def getLastAccessError(self):
       return self.lastAccessError

    def setLastAccessError(self):
       raise Error, 'setters not supported'
    

    def __next(self):
      if self.isarray:
          return self.handle.__next()
      raise TypeError, "iteration over non-sequence"

    def __size(self):
      if self.isarray:
          return self.handle.__size()
      raise TypeError, "iteration over non-sequence"

    def __len__(self):
      if self.isarray:
          return self.handle.__len__()
      raise TypeError, "iteration over non-sequence"

    def __getitem__(self, index):
      if self.isarray:
          return ISharedFolder(self.mgr, self.handle[index])
      raise TypeError, "iteration over non-sequence"


class SettingsVersion:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=SettingsVersion._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,SettingsVersion):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,SettingsVersion):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return SettingsVersion._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'v1_0',2:'v1_1',3:'v1_2',4:'v1_3pre',5:'v1_3',6:'v1_4',7:'v1_5',8:'v1_6',9:'v1_7',10:'v1_8',11:'v1_9',12:'v1_10',13:'Future'}
   _ValueMap={
              'Null':0,
              'v1_0':1,
              'v1_1':2,
              'v1_2':3,
              'v1_3pre':4,
              'v1_3':5,
              'v1_4':6,
              'v1_5':7,
              'v1_6':8,
              'v1_7':9,
              'v1_8':10,
              'v1_9':11,
              'v1_10':12,
              'Future':13}

   Null=0
   v1_0=1
   v1_1=2
   v1_2=3
   v1_3pre=4
   v1_3=5
   v1_4=6
   v1_5=7
   v1_6=8
   v1_7=9
   v1_8=10
   v1_9=11
   v1_10=12
   Future=13

class AccessMode:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=AccessMode._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,AccessMode):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,AccessMode):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return AccessMode._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={1:'ReadOnly',2:'ReadWrite'}
   _ValueMap={
              'ReadOnly':1,
              'ReadWrite':2}

   ReadOnly=1
   ReadWrite=2

class MachineState:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=MachineState._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,MachineState):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,MachineState):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return MachineState._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'PoweredOff',2:'Saved',3:'Teleported',4:'Aborted',5:'Running',6:'Paused',7:'Stuck',8:'Teleporting',9:'LiveSnapshotting',10:'Starting',11:'Stopping',12:'Saving',13:'Restoring',14:'TeleportingPausedVM',15:'TeleportingIn',16:'DeletingSnapshotOnline',17:'DeletingSnapshotPaused',18:'RestoringSnapshot',19:'DeletingSnapshot',20:'SettingUp',5:'FirstOnline',17:'LastOnline',8:'FirstTransient',20:'LastTransient'}
   _ValueMap={
              'Null':0,
              'PoweredOff':1,
              'Saved':2,
              'Teleported':3,
              'Aborted':4,
              'Running':5,
              'Paused':6,
              'Stuck':7,
              'Teleporting':8,
              'LiveSnapshotting':9,
              'Starting':10,
              'Stopping':11,
              'Saving':12,
              'Restoring':13,
              'TeleportingPausedVM':14,
              'TeleportingIn':15,
              'DeletingSnapshotOnline':16,
              'DeletingSnapshotPaused':17,
              'RestoringSnapshot':18,
              'DeletingSnapshot':19,
              'SettingUp':20,
              'FirstOnline':5,
              'LastOnline':17,
              'FirstTransient':8,
              'LastTransient':20}

   Null=0
   PoweredOff=1
   Saved=2
   Teleported=3
   Aborted=4
   Running=5
   Paused=6
   Stuck=7
   Teleporting=8
   LiveSnapshotting=9
   Starting=10
   Stopping=11
   Saving=12
   Restoring=13
   TeleportingPausedVM=14
   TeleportingIn=15
   DeletingSnapshotOnline=16
   DeletingSnapshotPaused=17
   RestoringSnapshot=18
   DeletingSnapshot=19
   SettingUp=20
   FirstOnline=5
   LastOnline=17
   FirstTransient=8
   LastTransient=20

class SessionState:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=SessionState._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,SessionState):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,SessionState):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return SessionState._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'Closed',2:'Open',3:'Spawning',4:'Closing'}
   _ValueMap={
              'Null':0,
              'Closed':1,
              'Open':2,
              'Spawning':3,
              'Closing':4}

   Null=0
   Closed=1
   Open=2
   Spawning=3
   Closing=4

class CPUPropertyType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=CPUPropertyType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,CPUPropertyType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,CPUPropertyType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return CPUPropertyType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'PAE',2:'Synthetic'}
   _ValueMap={
              'Null':0,
              'PAE':1,
              'Synthetic':2}

   Null=0
   PAE=1
   Synthetic=2

class HWVirtExPropertyType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=HWVirtExPropertyType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,HWVirtExPropertyType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,HWVirtExPropertyType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return HWVirtExPropertyType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'Enabled',2:'Exclusive',3:'VPID',4:'NestedPaging',5:'LargePages',6:'Force'}
   _ValueMap={
              'Null':0,
              'Enabled':1,
              'Exclusive':2,
              'VPID':3,
              'NestedPaging':4,
              'LargePages':5,
              'Force':6}

   Null=0
   Enabled=1
   Exclusive=2
   VPID=3
   NestedPaging=4
   LargePages=5
   Force=6

class SessionType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=SessionType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,SessionType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,SessionType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return SessionType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'Direct',2:'Remote',3:'Existing'}
   _ValueMap={
              'Null':0,
              'Direct':1,
              'Remote':2,
              'Existing':3}

   Null=0
   Direct=1
   Remote=2
   Existing=3

class DeviceType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=DeviceType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,DeviceType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,DeviceType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return DeviceType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'Floppy',2:'DVD',3:'HardDisk',4:'Network',5:'USB',6:'SharedFolder'}
   _ValueMap={
              'Null':0,
              'Floppy':1,
              'DVD':2,
              'HardDisk':3,
              'Network':4,
              'USB':5,
              'SharedFolder':6}

   Null=0
   Floppy=1
   DVD=2
   HardDisk=3
   Network=4
   USB=5
   SharedFolder=6

class DeviceActivity:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=DeviceActivity._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,DeviceActivity):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,DeviceActivity):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return DeviceActivity._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'Idle',2:'Reading',3:'Writing'}
   _ValueMap={
              'Null':0,
              'Idle':1,
              'Reading':2,
              'Writing':3}

   Null=0
   Idle=1
   Reading=2
   Writing=3

class ClipboardMode:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=ClipboardMode._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,ClipboardMode):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,ClipboardMode):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return ClipboardMode._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Disabled',1:'HostToGuest',2:'GuestToHost',3:'Bidirectional'}
   _ValueMap={
              'Disabled':0,
              'HostToGuest':1,
              'GuestToHost':2,
              'Bidirectional':3}

   Disabled=0
   HostToGuest=1
   GuestToHost=2
   Bidirectional=3

class Scope:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=Scope._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,Scope):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,Scope):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return Scope._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Global',1:'Machine',2:'Session'}
   _ValueMap={
              'Global':0,
              'Machine':1,
              'Session':2}

   Global=0
   Machine=1
   Session=2

class BIOSBootMenuMode:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=BIOSBootMenuMode._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,BIOSBootMenuMode):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,BIOSBootMenuMode):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return BIOSBootMenuMode._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Disabled',1:'MenuOnly',2:'MessageAndMenu'}
   _ValueMap={
              'Disabled':0,
              'MenuOnly':1,
              'MessageAndMenu':2}

   Disabled=0
   MenuOnly=1
   MessageAndMenu=2

class ProcessorFeature:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=ProcessorFeature._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,ProcessorFeature):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,ProcessorFeature):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return ProcessorFeature._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'HWVirtEx',1:'PAE',2:'LongMode',3:'NestedPaging'}
   _ValueMap={
              'HWVirtEx':0,
              'PAE':1,
              'LongMode':2,
              'NestedPaging':3}

   HWVirtEx=0
   PAE=1
   LongMode=2
   NestedPaging=3

class FirmwareType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=FirmwareType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,FirmwareType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,FirmwareType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return FirmwareType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={1:'BIOS',2:'EFI',3:'EFI32',4:'EFI64',5:'EFIDUAL'}
   _ValueMap={
              'BIOS':1,
              'EFI':2,
              'EFI32':3,
              'EFI64':4,
              'EFIDUAL':5}

   BIOS=1
   EFI=2
   EFI32=3
   EFI64=4
   EFIDUAL=5

class PointingHidType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=PointingHidType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,PointingHidType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,PointingHidType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return PointingHidType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={1:'None',2:'PS2Mouse',3:'USBMouse',4:'USBTablet',5:'ComboMouse'}
   _ValueMap={
              'None':1,
              'PS2Mouse':2,
              'USBMouse':3,
              'USBTablet':4,
              'ComboMouse':5}

   _None=1
   PS2Mouse=2
   USBMouse=3
   USBTablet=4
   ComboMouse=5

class KeyboardHidType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=KeyboardHidType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,KeyboardHidType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,KeyboardHidType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return KeyboardHidType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={1:'None',2:'PS2Keyboard',3:'USBKeyboard',4:'ComboKeyboard'}
   _ValueMap={
              'None':1,
              'PS2Keyboard':2,
              'USBKeyboard':3,
              'ComboKeyboard':4}

   _None=1
   PS2Keyboard=2
   USBKeyboard=3
   ComboKeyboard=4

class VFSType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=VFSType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,VFSType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,VFSType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return VFSType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={1:'File',2:'Cloud',3:'S3',4:'WebDav'}
   _ValueMap={
              'File':1,
              'Cloud':2,
              'S3':3,
              'WebDav':4}

   File=1
   Cloud=2
   S3=3
   WebDav=4

class VFSFileType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=VFSFileType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,VFSFileType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,VFSFileType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return VFSFileType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={1:'Unknown',2:'Fifo',3:'DevChar',4:'Directory',5:'DevBlock',6:'File',7:'SymLink',8:'Socket',9:'WhiteOut'}
   _ValueMap={
              'Unknown':1,
              'Fifo':2,
              'DevChar':3,
              'Directory':4,
              'DevBlock':5,
              'File':6,
              'SymLink':7,
              'Socket':8,
              'WhiteOut':9}

   Unknown=1
   Fifo=2
   DevChar=3
   Directory=4
   DevBlock=5
   File=6
   SymLink=7
   Socket=8
   WhiteOut=9

class VirtualSystemDescriptionType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=VirtualSystemDescriptionType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,VirtualSystemDescriptionType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,VirtualSystemDescriptionType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return VirtualSystemDescriptionType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={1:'Ignore',2:'OS',3:'Name',4:'Product',5:'Vendor',6:'Version',7:'ProductUrl',8:'VendorUrl',9:'Description',10:'License',11:'Miscellaneous',12:'CPU',13:'Memory',14:'HardDiskControllerIDE',15:'HardDiskControllerSATA',16:'HardDiskControllerSCSI',17:'HardDiskControllerSAS',18:'HardDiskImage',19:'Floppy',20:'CDROM',21:'NetworkAdapter',22:'USBController',23:'SoundCard'}
   _ValueMap={
              'Ignore':1,
              'OS':2,
              'Name':3,
              'Product':4,
              'Vendor':5,
              'Version':6,
              'ProductUrl':7,
              'VendorUrl':8,
              'Description':9,
              'License':10,
              'Miscellaneous':11,
              'CPU':12,
              'Memory':13,
              'HardDiskControllerIDE':14,
              'HardDiskControllerSATA':15,
              'HardDiskControllerSCSI':16,
              'HardDiskControllerSAS':17,
              'HardDiskImage':18,
              'Floppy':19,
              'CDROM':20,
              'NetworkAdapter':21,
              'USBController':22,
              'SoundCard':23}

   Ignore=1
   OS=2
   Name=3
   Product=4
   Vendor=5
   Version=6
   ProductUrl=7
   VendorUrl=8
   Description=9
   License=10
   Miscellaneous=11
   CPU=12
   Memory=13
   HardDiskControllerIDE=14
   HardDiskControllerSATA=15
   HardDiskControllerSCSI=16
   HardDiskControllerSAS=17
   HardDiskImage=18
   Floppy=19
   CDROM=20
   NetworkAdapter=21
   USBController=22
   SoundCard=23

class VirtualSystemDescriptionValueType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=VirtualSystemDescriptionValueType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,VirtualSystemDescriptionValueType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,VirtualSystemDescriptionValueType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return VirtualSystemDescriptionValueType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={1:'Reference',2:'Original',3:'Auto',4:'ExtraConfig'}
   _ValueMap={
              'Reference':1,
              'Original':2,
              'Auto':3,
              'ExtraConfig':4}

   Reference=1
   Original=2
   Auto=3
   ExtraConfig=4

class HostNetworkInterfaceMediumType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=HostNetworkInterfaceMediumType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,HostNetworkInterfaceMediumType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,HostNetworkInterfaceMediumType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return HostNetworkInterfaceMediumType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Unknown',1:'Ethernet',2:'PPP',3:'SLIP'}
   _ValueMap={
              'Unknown':0,
              'Ethernet':1,
              'PPP':2,
              'SLIP':3}

   Unknown=0
   Ethernet=1
   PPP=2
   SLIP=3

class HostNetworkInterfaceStatus:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=HostNetworkInterfaceStatus._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,HostNetworkInterfaceStatus):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,HostNetworkInterfaceStatus):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return HostNetworkInterfaceStatus._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Unknown',1:'Up',2:'Down'}
   _ValueMap={
              'Unknown':0,
              'Up':1,
              'Down':2}

   Unknown=0
   Up=1
   Down=2

class HostNetworkInterfaceType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=HostNetworkInterfaceType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,HostNetworkInterfaceType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,HostNetworkInterfaceType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return HostNetworkInterfaceType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={1:'Bridged',2:'HostOnly'}
   _ValueMap={
              'Bridged':1,
              'HostOnly':2}

   Bridged=1
   HostOnly=2

class MediumState:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=MediumState._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,MediumState):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,MediumState):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return MediumState._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'NotCreated',1:'Created',2:'LockedRead',3:'LockedWrite',4:'Inaccessible',5:'Creating',6:'Deleting'}
   _ValueMap={
              'NotCreated':0,
              'Created':1,
              'LockedRead':2,
              'LockedWrite':3,
              'Inaccessible':4,
              'Creating':5,
              'Deleting':6}

   NotCreated=0
   Created=1
   LockedRead=2
   LockedWrite=3
   Inaccessible=4
   Creating=5
   Deleting=6

class MediumType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=MediumType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,MediumType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,MediumType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return MediumType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Normal',1:'Immutable',2:'Writethrough',3:'Shareable'}
   _ValueMap={
              'Normal':0,
              'Immutable':1,
              'Writethrough':2,
              'Shareable':3}

   Normal=0
   Immutable=1
   Writethrough=2
   Shareable=3

class MediumVariant:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=MediumVariant._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,MediumVariant):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,MediumVariant):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return MediumVariant._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Standard',0x01:'VmdkSplit2G',0x04:'VmdkStreamOptimized',0x08:'VmdkESX',0x10000:'Fixed',0x20000:'Diff'}
   _ValueMap={
              'Standard':0,
              'VmdkSplit2G':0x01,
              'VmdkStreamOptimized':0x04,
              'VmdkESX':0x08,
              'Fixed':0x10000,
              'Diff':0x20000}

   Standard=0
   VmdkSplit2G=0x01
   VmdkStreamOptimized=0x04
   VmdkESX=0x08
   Fixed=0x10000
   Diff=0x20000

class DataType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=DataType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,DataType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,DataType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return DataType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Int32',1:'Int8',2:'String'}
   _ValueMap={
              'Int32':0,
              'Int8':1,
              'String':2}

   Int32=0
   Int8=1
   String=2

class DataFlags:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=DataFlags._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,DataFlags):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,DataFlags):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return DataFlags._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0x00:'None',0x01:'Mandatory',0x02:'Expert',0x04:'Array',0x07:'FlagMask'}
   _ValueMap={
              'None':0x00,
              'Mandatory':0x01,
              'Expert':0x02,
              'Array':0x04,
              'FlagMask':0x07}

   _None=0x00
   Mandatory=0x01
   Expert=0x02
   Array=0x04
   FlagMask=0x07

class MediumFormatCapabilities:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=MediumFormatCapabilities._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,MediumFormatCapabilities):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,MediumFormatCapabilities):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return MediumFormatCapabilities._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0x01:'Uuid',0x02:'CreateFixed',0x04:'CreateDynamic',0x08:'CreateSplit2G',0x10:'Differencing',0x20:'Asynchronous',0x40:'File',0x80:'Properties',0xFF:'CapabilityMask'}
   _ValueMap={
              'Uuid':0x01,
              'CreateFixed':0x02,
              'CreateDynamic':0x04,
              'CreateSplit2G':0x08,
              'Differencing':0x10,
              'Asynchronous':0x20,
              'File':0x40,
              'Properties':0x80,
              'CapabilityMask':0xFF}

   Uuid=0x01
   CreateFixed=0x02
   CreateDynamic=0x04
   CreateSplit2G=0x08
   Differencing=0x10
   Asynchronous=0x20
   File=0x40
   Properties=0x80
   CapabilityMask=0xFF

class MouseButtonState:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=MouseButtonState._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,MouseButtonState):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,MouseButtonState):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return MouseButtonState._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0x01:'LeftButton',0x02:'RightButton',0x04:'MiddleButton',0x08:'WheelUp',0x10:'WheelDown',0x20:'XButton1',0x40:'XButton2',0x7F:'MouseStateMask'}
   _ValueMap={
              'LeftButton':0x01,
              'RightButton':0x02,
              'MiddleButton':0x04,
              'WheelUp':0x08,
              'WheelDown':0x10,
              'XButton1':0x20,
              'XButton2':0x40,
              'MouseStateMask':0x7F}

   LeftButton=0x01
   RightButton=0x02
   MiddleButton=0x04
   WheelUp=0x08
   WheelDown=0x10
   XButton1=0x20
   XButton2=0x40
   MouseStateMask=0x7F

class FramebufferPixelFormat:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=FramebufferPixelFormat._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,FramebufferPixelFormat):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,FramebufferPixelFormat):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return FramebufferPixelFormat._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Opaque',0x32424752:'FOURCC_RGB'}
   _ValueMap={
              'Opaque':0,
              'FOURCC_RGB':0x32424752}

   Opaque=0
   FOURCC_RGB=0x32424752

class NetworkAttachmentType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=NetworkAttachmentType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,NetworkAttachmentType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,NetworkAttachmentType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return NetworkAttachmentType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'NAT',2:'Bridged',3:'Internal',4:'HostOnly',5:'VDE'}
   _ValueMap={
              'Null':0,
              'NAT':1,
              'Bridged':2,
              'Internal':3,
              'HostOnly':4,
              'VDE':5}

   Null=0
   NAT=1
   Bridged=2
   Internal=3
   HostOnly=4
   VDE=5

class NetworkAdapterType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=NetworkAdapterType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,NetworkAdapterType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,NetworkAdapterType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return NetworkAdapterType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'Am79C970A',2:'Am79C973',3:'I82540EM',4:'I82543GC',5:'I82545EM',6:'Virtio'}
   _ValueMap={
              'Null':0,
              'Am79C970A':1,
              'Am79C973':2,
              'I82540EM':3,
              'I82543GC':4,
              'I82545EM':5,
              'Virtio':6}

   Null=0
   Am79C970A=1
   Am79C973=2
   I82540EM=3
   I82543GC=4
   I82545EM=5
   Virtio=6

class PortMode:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=PortMode._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,PortMode):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,PortMode):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return PortMode._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Disconnected',1:'HostPipe',2:'HostDevice',3:'RawFile'}
   _ValueMap={
              'Disconnected':0,
              'HostPipe':1,
              'HostDevice':2,
              'RawFile':3}

   Disconnected=0
   HostPipe=1
   HostDevice=2
   RawFile=3

class USBDeviceState:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=USBDeviceState._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,USBDeviceState):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,USBDeviceState):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return USBDeviceState._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'NotSupported',1:'Unavailable',2:'Busy',3:'Available',4:'Held',5:'Captured'}
   _ValueMap={
              'NotSupported':0,
              'Unavailable':1,
              'Busy':2,
              'Available':3,
              'Held':4,
              'Captured':5}

   NotSupported=0
   Unavailable=1
   Busy=2
   Available=3
   Held=4
   Captured=5

class USBDeviceFilterAction:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=USBDeviceFilterAction._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,USBDeviceFilterAction):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,USBDeviceFilterAction):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return USBDeviceFilterAction._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'Ignore',2:'Hold'}
   _ValueMap={
              'Null':0,
              'Ignore':1,
              'Hold':2}

   Null=0
   Ignore=1
   Hold=2

class AudioDriverType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=AudioDriverType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,AudioDriverType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,AudioDriverType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return AudioDriverType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'WinMM',2:'OSS',3:'ALSA',4:'DirectSound',5:'CoreAudio',6:'MMPM',7:'Pulse',8:'SolAudio'}
   _ValueMap={
              'Null':0,
              'WinMM':1,
              'OSS':2,
              'ALSA':3,
              'DirectSound':4,
              'CoreAudio':5,
              'MMPM':6,
              'Pulse':7,
              'SolAudio':8}

   Null=0
   WinMM=1
   OSS=2
   ALSA=3
   DirectSound=4
   CoreAudio=5
   MMPM=6
   Pulse=7
   SolAudio=8

class AudioControllerType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=AudioControllerType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,AudioControllerType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,AudioControllerType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return AudioControllerType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'AC97',1:'SB16'}
   _ValueMap={
              'AC97':0,
              'SB16':1}

   AC97=0
   SB16=1

class VRDPAuthType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=VRDPAuthType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,VRDPAuthType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,VRDPAuthType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return VRDPAuthType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'External',2:'Guest'}
   _ValueMap={
              'Null':0,
              'External':1,
              'Guest':2}

   Null=0
   External=1
   Guest=2

class StorageBus:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=StorageBus._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,StorageBus):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,StorageBus):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return StorageBus._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'IDE',2:'SATA',3:'SCSI',4:'Floppy',5:'SAS'}
   _ValueMap={
              'Null':0,
              'IDE':1,
              'SATA':2,
              'SCSI':3,
              'Floppy':4,
              'SAS':5}

   Null=0
   IDE=1
   SATA=2
   SCSI=3
   Floppy=4
   SAS=5

class StorageControllerType:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=StorageControllerType._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,StorageControllerType):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,StorageControllerType):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return StorageControllerType._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'Null',1:'LsiLogic',2:'BusLogic',3:'IntelAhci',4:'PIIX3',5:'PIIX4',6:'ICH6',7:'I82078',8:'LsiLogicSas'}
   _ValueMap={
              'Null':0,
              'LsiLogic':1,
              'BusLogic':2,
              'IntelAhci':3,
              'PIIX3':4,
              'PIIX4':5,
              'ICH6':6,
              'I82078':7,
              'LsiLogicSas':8}

   Null=0
   LsiLogic=1
   BusLogic=2
   IntelAhci=3
   PIIX3=4
   PIIX4=5
   ICH6=6
   I82078=7
   LsiLogicSas=8

class NATAliasMode:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=NATAliasMode._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,NATAliasMode):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,NATAliasMode):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return NATAliasMode._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0x1:'AliasLog',0x02:'AliasProxyOnly',0x04:'AliasUseSamePorts'}
   _ValueMap={
              'AliasLog':0x1,
              'AliasProxyOnly':0x02,
              'AliasUseSamePorts':0x04}

   AliasLog=0x1
   AliasProxyOnly=0x02
   AliasUseSamePorts=0x04

class NATProtocol:
   def __init__(self,mgr,handle):
       self.mgr=mgr
       if isinstance(handle,basestring):
           self.handle=NATProtocol._ValueMap[handle]
       else:
           self.handle=handle

   def __eq__(self,other):
      if isinstance(other,NATProtocol):
         return self.handle == other.handle
      if isinstance(other,int):
         return self.handle == other
      if isinstance(other,basestring):
         return str(self) == other
      return False

   def __ne__(self,other):
      if isinstance(other,NATProtocol):
         return self.handle != other.handle
      if isinstance(other,int):
         return self.handle != other
      if isinstance(other,basestring):
         return str(self) != other
      return True

   def __str__(self):
        return NATProtocol._NameMap[self.handle]

   def __int__(self):
        return self.handle

   _NameMap={0:'UDP',1:'TCP'}
   _ValueMap={
              'UDP':0,
              'TCP':1}

   UDP=0
   TCP=1


class IWebsessionManager2(IWebsessionManager):
  def __init__(self, url):
       self.url = url
       self.port = None
       self.handle = None
       self.mgr = self

  def getPort(self):
      if self.port is None:
          self.port = vboxServiceLocator().getvboxPortType(self.url)
      return self.port

