

/**
 * 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 IUSBDevice extends IUnknown {

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

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

    // read-only attribute IUSBDevice::id of type uuid
    public UUID getId() {
        try {
            String retVal = port.iusbDeviceGetId(_this);
            return UUID.fromString(retVal);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::vendorId of type unsigned short
    public Integer getVendorId() {
        try {
            int retVal = port.iusbDeviceGetVendorId(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::productId of type unsigned short
    public Integer getProductId() {
        try {
            int retVal = port.iusbDeviceGetProductId(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::revision of type unsigned short
    public Integer getRevision() {
        try {
            int retVal = port.iusbDeviceGetRevision(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::manufacturer of type wstring
    public String getManufacturer() {
        try {
            String retVal = port.iusbDeviceGetManufacturer(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::product of type wstring
    public String getProduct() {
        try {
            String retVal = port.iusbDeviceGetProduct(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::serialNumber of type wstring
    public String getSerialNumber() {
        try {
            String retVal = port.iusbDeviceGetSerialNumber(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::address of type wstring
    public String getAddress() {
        try {
            String retVal = port.iusbDeviceGetAddress(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::port of type unsigned short
    public Integer getPort() {
        try {
            int retVal = port.iusbDeviceGetPort(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::version of type unsigned short
    public Integer getVersion() {
        try {
            int retVal = port.iusbDeviceGetVersion(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::portVersion of type unsigned short
    public Integer getPortVersion() {
        try {
            int retVal = port.iusbDeviceGetPortVersion(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IUSBDevice::remote of type boolean
    public Boolean getRemote() {
        try {
            Boolean retVal = port.iusbDeviceGetRemote(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
