

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

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

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

    // read/write attribute IISCSIHardDisk::server of type wstring
    public String getServer() {
        try {
            String retVal = port.iiscsiHardDiskGetServer(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setServer(String value) {
        try {
            port.iiscsiHardDiskSetServer(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute IISCSIHardDisk::port of type unsigned short
    public Integer getPort() {
        try {
            int retVal = port.iiscsiHardDiskGetPort(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setPort(int value) {
        try {
            port.iiscsiHardDiskSetPort(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute IISCSIHardDisk::target of type wstring
    public String getTarget() {
        try {
            String retVal = port.iiscsiHardDiskGetTarget(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setTarget(String value) {
        try {
            port.iiscsiHardDiskSetTarget(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute IISCSIHardDisk::lun of type unsigned long long
    public BigInteger getLun() {
        try {
            BigInteger retVal = port.iiscsiHardDiskGetLun(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setLun(BigInteger value) {
        try {
            port.iiscsiHardDiskSetLun(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute IISCSIHardDisk::userName of type wstring
    public String getUserName() {
        try {
            String retVal = port.iiscsiHardDiskGetUserName(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setUserName(String value) {
        try {
            port.iiscsiHardDiskSetUserName(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read/write attribute IISCSIHardDisk::password of type wstring
    public String getPassword() {
        try {
            String retVal = port.iiscsiHardDiskGetPassword(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
    public void setPassword(String value) {
        try {
            port.iiscsiHardDiskSetPassword(_this, value);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
