

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

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

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

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

    // read/write attribute ISATAController::portCount of type unsigned long
    public Long getPortCount() {
        try {
            Long retVal = port.isataControllerGetPortCount(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setPortCount(Long value) {
        try {
            port.isataControllerSetPortCount(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method ISATAController::GetIDEEmulationPort(
            [in] long devicePosition,
            [return] long portNumber)
     */
    public Integer GetIDEEmulationPort(Integer devicePosition) {
        try {
            Integer retVal = port.isataControllerGetIDEEmulationPort(_this, devicePosition);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /* method ISATAController::SetIDEEmulationPort(
            [in] long devicePosition,
            [in] long portNumber)
     */
    public void SetIDEEmulationPort(Integer devicePosition, Integer portNumber) {
        try {
            port.isataControllerSetIDEEmulationPort(_this, devicePosition, portNumber);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
