

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

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

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

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

    // read/write attribute IAudioAdapter::audioController of type AudioControllerType
    public org.virtualbox.AudioControllerType getAudioController() {
        try {
            org.virtualbox.AudioControllerType retVal = port.iAudioAdapterGetAudioController(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setAudioController(org.virtualbox.AudioControllerType value) {
        try {
            port.iAudioAdapterSetAudioController(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute IAudioAdapter::audioDriver of type AudioDriverType
    public org.virtualbox.AudioDriverType getAudioDriver() {
        try {
            org.virtualbox.AudioDriverType retVal = port.iAudioAdapterGetAudioDriver(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setAudioDriver(org.virtualbox.AudioDriverType value) {
        try {
            port.iAudioAdapterSetAudioDriver(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
