

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

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

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

    // read-only attribute ISerialPort::slot of type unsigned long
    public Long getSlot() {
        try {
            Long retVal = port.iSerialPortGetSlot(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute ISerialPort::enabled of type boolean
    public Boolean getEnabled() {
        try {
            Boolean retVal = port.iSerialPortGetEnabled(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setEnabled(Boolean value) {
        try {
            port.iSerialPortSetEnabled(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute ISerialPort::IOBase of type unsigned long
    public Long getIOBase() {
        try {
            Long retVal = port.iSerialPortGetIOBase(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setIOBase(Long value) {
        try {
            port.iSerialPortSetIOBase(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute ISerialPort::IRQ of type unsigned long
    public Long getIRQ() {
        try {
            Long retVal = port.iSerialPortGetIRQ(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setIRQ(Long value) {
        try {
            port.iSerialPortSetIRQ(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute ISerialPort::hostMode of type PortMode
    public org.virtualbox.PortMode getHostMode() {
        try {
            org.virtualbox.PortMode retVal = port.iSerialPortGetHostMode(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setHostMode(org.virtualbox.PortMode value) {
        try {
            port.iSerialPortSetHostMode(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute ISerialPort::server of type boolean
    public Boolean getServer() {
        try {
            Boolean retVal = port.iSerialPortGetServer(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setServer(Boolean value) {
        try {
            port.iSerialPortSetServer(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute ISerialPort::path of type wstring
    public String getPath() {
        try {
            String retVal = port.iSerialPortGetPath(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setPath(String value) {
        try {
            port.iSerialPortSetPath(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
