

/**
 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
 * 
 * Sun Microsystems, Inc. confidential
 * All rights reserved
 *
 * This file is autogenerated by glue-jaxws.xsl, DO NOT EDIT! 
 */

package com.sun.xml.ws.commons.virtualbox;

import java.math.BigInteger;
import java.util.List;
import java.util.UUID;
import javax.xml.ws.Holder;
import javax.xml.ws.WebServiceException;
import com.sun.xml.ws.commons.virtualbox.IUnknown;

import org.virtualbox.service.InvalidObjectFaultMsg;
import org.virtualbox.service.RuntimeFaultMsg;
import org.virtualbox.service.VboxService;
import org.virtualbox.service.VboxPortType;

public class IHost extends IUnknown {

    public static IHost cast(IUnknown other) {
        return new IHost(other.getRef(), other.getRemoteWSPort());
    }

    public IHost(String _this, VboxPortType port) {
        super(_this,port);
    }

    // read-only attribute IHost::DVDDrives of type IHostDVDDriveCollection
    public List<com.sun.xml.ws.commons.virtualbox.IHostDVDDrive> getDVDDrives() {
        try {
            org.virtualbox.ArrayOfIHostDVDDrive retVal = port.iHostGetDVDDrives(_this);
            return Helper.wrap(IHostDVDDrive.class, port, ((retVal == null)?null:retVal.getArray()));
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::floppyDrives of type IHostFloppyDriveCollection
    public List<com.sun.xml.ws.commons.virtualbox.IHostFloppyDrive> getFloppyDrives() {
        try {
            org.virtualbox.ArrayOfIHostFloppyDrive retVal = port.iHostGetFloppyDrives(_this);
            return Helper.wrap(IHostFloppyDrive.class, port, ((retVal == null)?null:retVal.getArray()));
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::USBDevices of type IHostUSBDeviceCollection
    public List<com.sun.xml.ws.commons.virtualbox.IHostUSBDevice> getUSBDevices() {
        try {
            org.virtualbox.ArrayOfIHostUSBDevice retVal = port.iHostGetUSBDevices(_this);
            return Helper.wrap(IHostUSBDevice.class, port, ((retVal == null)?null:retVal.getArray()));
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::USBDeviceFilters of type IHostUSBDeviceFilterCollection
    public List<com.sun.xml.ws.commons.virtualbox.IHostUSBDeviceFilter> getUSBDeviceFilters() {
        try {
            org.virtualbox.ArrayOfIHostUSBDeviceFilter retVal = port.iHostGetUSBDeviceFilters(_this);
            return Helper.wrap(IHostUSBDeviceFilter.class, port, ((retVal == null)?null:retVal.getArray()));
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::networkInterfaces of type IHostNetworkInterfaceCollection
    public List<com.sun.xml.ws.commons.virtualbox.IHostNetworkInterface> getNetworkInterfaces() {
        try {
            org.virtualbox.ArrayOfIHostNetworkInterface retVal = port.iHostGetNetworkInterfaces(_this);
            return Helper.wrap(IHostNetworkInterface.class, port, ((retVal == null)?null:retVal.getArray()));
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::processorCount of type unsigned long
    public Long getProcessorCount() {
        try {
            Long retVal = port.iHostGetProcessorCount(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::processorOnlineCount of type unsigned long
    public Long getProcessorOnlineCount() {
        try {
            Long retVal = port.iHostGetProcessorOnlineCount(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::memorySize of type unsigned long
    public Long getMemorySize() {
        try {
            Long retVal = port.iHostGetMemorySize(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::memoryAvailable of type unsigned long
    public Long getMemoryAvailable() {
        try {
            Long retVal = port.iHostGetMemoryAvailable(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::operatingSystem of type wstring
    public String getOperatingSystem() {
        try {
            String retVal = port.iHostGetOperatingSystem(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::OSVersion of type wstring
    public String getOSVersion() {
        try {
            String retVal = port.iHostGetOSVersion(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IHost::UTCTime of type long long
    public Long getUTCTime() {
        try {
            Long retVal = port.iHostGetUTCTime(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method IHost::getProcessorSpeed(
            [in] unsigned long cpuId,
            [return] unsigned long speed)
     */
    public Long getProcessorSpeed(Long cpuId) {
        try {
            Long retVal = port.iHostGetProcessorSpeed(_this, cpuId);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method IHost::getProcessorDescription(
            [in] unsigned long cpuId,
            [return] wstring description)
     */
    public String getProcessorDescription(Long cpuId) {
        try {
            String retVal = port.iHostGetProcessorDescription(_this, cpuId);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method IHost::createUSBDeviceFilter(
            [in] wstring name,
            [return] IHostUSBDeviceFilter filter)
     */
    public com.sun.xml.ws.commons.virtualbox.IHostUSBDeviceFilter createUSBDeviceFilter(String name) {
        try {
            String retVal = port.iHostCreateUSBDeviceFilter(_this, name);
            return new com.sun.xml.ws.commons.virtualbox.IHostUSBDeviceFilter(retVal, port);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method IHost::insertUSBDeviceFilter(
            [in] unsigned long position,
            [in] IHostUSBDeviceFilter filter)
     */
    public void insertUSBDeviceFilter(Long position, com.sun.xml.ws.commons.virtualbox.IHostUSBDeviceFilter filter) {
        try {
            port.iHostInsertUSBDeviceFilter(_this, position, ((filter == null)?null:filter.getRef()));
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method IHost::removeUSBDeviceFilter(
            [in] unsigned long position,
            [return] IHostUSBDeviceFilter filter)
     */
    public com.sun.xml.ws.commons.virtualbox.IHostUSBDeviceFilter removeUSBDeviceFilter(Long position) {
        try {
            String retVal = port.iHostRemoveUSBDeviceFilter(_this, position);
            return new com.sun.xml.ws.commons.virtualbox.IHostUSBDeviceFilter(retVal, port);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
