

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

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

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

    // read-only attribute IPerformanceMetric::metricName of type wstring
    public String getMetricName() {
        try {
            String retVal = port.iPerformanceMetricGetMetricName(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // Skipping attribute $unknown for it is of suppressed type $unknown

    // read-only attribute IPerformanceMetric::description of type wstring
    public String getDescription() {
        try {
            String retVal = port.iPerformanceMetricGetDescription(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IPerformanceMetric::period of type unsigned long
    public Long getPeriod() {
        try {
            Long retVal = port.iPerformanceMetricGetPeriod(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IPerformanceMetric::count of type unsigned long
    public Long getCount() {
        try {
            Long retVal = port.iPerformanceMetricGetCount(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IPerformanceMetric::unit of type wstring
    public String getUnit() {
        try {
            String retVal = port.iPerformanceMetricGetUnit(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IPerformanceMetric::minimumValue of type long
    public Integer getMinimumValue() {
        try {
            Integer retVal = port.iPerformanceMetricGetMinimumValue(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    // read-only attribute IPerformanceMetric::maximumValue of type long
    public Integer getMaximumValue() {
        try {
            Integer retVal = port.iPerformanceMetricGetMaximumValue(_this);
            return retVal;
        } catch (InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }
}
