

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

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

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

    // read-only attribute IFloppyImage::id of type uuid
    public UUID getId() {
        try {
            String retVal = port.iFloppyImageGetId(_this);
            return UUID.fromString(retVal);
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IFloppyImage::filePath of type wstring
    public String getFilePath() {
        try {
            String retVal = port.iFloppyImageGetFilePath(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IFloppyImage::accessible of type boolean
    public Boolean getAccessible() {
        try {
            Boolean retVal = port.iFloppyImageGetAccessible(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IFloppyImage::size of type unsigned long
    public Long getSize() {
        try {
            Long retVal = port.iFloppyImageGetSize(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
