
org.xlcloud.openstack.model.ceilometer.Meter Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2012 AMG.lab, a Bull Group Company
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.xlcloud.openstack.model.ceilometer;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* @author Andrzej Stasiak, AMG.net
*
*/
public class Meter {
public enum Type {
@XmlEnumValue("gauge") GAUGE("gauge"),
@XmlEnumValue("delta") DELTA("delta"),
@XmlEnumValue("cumulative") CUMULATIVE("cumulative");
private final String value;
private Type(String v) {
value = v;
}
@JsonValue
public String value() {
return value;
}
public static Type fromValue(String v) {
for (Type c: Type.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
public String toString() {
return value;
}
}
@XmlAttribute
private String meter_id;
@XmlAttribute
private String name;
@XmlAttribute
private String project_id;
@XmlAttribute
private String resource_id;
@XmlAttribute
private String source;
@XmlAttribute
private Type type;
@XmlAttribute
private String unit;
@XmlAttribute
private String user_id;
/**
* @return the meter_id
*/
public String getMeter_id() {
return meter_id;
}
/**
* @param meter_id the meter_id to set
*/
public void setMeter_id(String meter_id) {
this.meter_id = meter_id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the project_id
*/
public String getProject_id() {
return project_id;
}
/**
* @param project_id the project_id to set
*/
public void setProject_id(String project_id) {
this.project_id = project_id;
}
/**
* @return the resource_id
*/
public String getResource_id() {
return resource_id;
}
/**
* @param resource_id the resource_id to set
*/
public void setResource_id(String resource_id) {
this.resource_id = resource_id;
}
/**
* @return the source
*/
public String getSource() {
return source;
}
/**
* @param source the source to set
*/
public void setSource(String source) {
this.source = source;
}
/**
* @return the type
*/
public Type getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(Type type) {
this.type = type;
}
/**
* @return the unit
*/
public String getUnit() {
return unit;
}
/**
* @param unit the unit to set
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* @return the user_id
*/
public String getUser_id() {
return user_id;
}
/**
* @param user_id the user_id to set
*/
public void setUser_id(String user_id) {
this.user_id = user_id;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy