

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

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

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

    // read/write attribute INetworkAdapter::adapterType of type NetworkAdapterType
    public org.virtualbox.NetworkAdapterType getAdapterType() {
        try {
            org.virtualbox.NetworkAdapterType retVal = port.iNetworkAdapterGetAdapterType(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setAdapterType(org.virtualbox.NetworkAdapterType value) {
        try {
            port.iNetworkAdapterSetAdapterType(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

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

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

    // read/write attribute INetworkAdapter::MACAddress of type wstring
    public String getMACAddress() {
        try {
            String retVal = port.iNetworkAdapterGetMACAddress(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setMACAddress(String value) {
        try {
            port.iNetworkAdapterSetMACAddress(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute INetworkAdapter::attachmentType of type NetworkAttachmentType
    public org.virtualbox.NetworkAttachmentType getAttachmentType() {
        try {
            org.virtualbox.NetworkAttachmentType retVal = port.iNetworkAdapterGetAttachmentType(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute INetworkAdapter::hostInterface of type wstring
    public String getHostInterface() {
        try {
            String retVal = port.iNetworkAdapterGetHostInterface(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setHostInterface(String value) {
        try {
            port.iNetworkAdapterSetHostInterface(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute INetworkAdapter::internalNetwork of type wstring
    public String getInternalNetwork() {
        try {
            String retVal = port.iNetworkAdapterGetInternalNetwork(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setInternalNetwork(String value) {
        try {
            port.iNetworkAdapterSetInternalNetwork(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute INetworkAdapter::NATNetwork of type wstring
    public String getNATNetwork() {
        try {
            String retVal = port.iNetworkAdapterGetNATNetwork(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setNATNetwork(String value) {
        try {
            port.iNetworkAdapterSetNATNetwork(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute INetworkAdapter::cableConnected of type boolean
    public Boolean getCableConnected() {
        try {
            Boolean retVal = port.iNetworkAdapterGetCableConnected(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setCableConnected(Boolean value) {
        try {
            port.iNetworkAdapterSetCableConnected(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute INetworkAdapter::lineSpeed of type unsigned long
    public Long getLineSpeed() {
        try {
            Long retVal = port.iNetworkAdapterGetLineSpeed(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setLineSpeed(Long value) {
        try {
            port.iNetworkAdapterSetLineSpeed(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute INetworkAdapter::traceEnabled of type boolean
    public Boolean getTraceEnabled() {
        try {
            Boolean retVal = port.iNetworkAdapterGetTraceEnabled(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setTraceEnabled(Boolean value) {
        try {
            port.iNetworkAdapterSetTraceEnabled(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute INetworkAdapter::traceFile of type wstring
    public String getTraceFile() {
        try {
            String retVal = port.iNetworkAdapterGetTraceFile(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setTraceFile(String value) {
        try {
            port.iNetworkAdapterSetTraceFile(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method INetworkAdapter::attachToNAT()
     */
    public void attachToNAT() {
        try {
            port.iNetworkAdapterAttachToNAT(_this);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method INetworkAdapter::attachToHostInterface()
     */
    public void attachToHostInterface() {
        try {
            port.iNetworkAdapterAttachToHostInterface(_this);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method INetworkAdapter::attachToInternalNetwork()
     */
    public void attachToInternalNetwork() {
        try {
            port.iNetworkAdapterAttachToInternalNetwork(_this);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method INetworkAdapter::detach()
     */
    public void detach() {
        try {
            port.iNetworkAdapterDetach(_this);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
