summaryrefslogtreecommitdiffstats
path: root/ceilometer-model/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'ceilometer-model/src/main')
-rw-r--r--ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java54
-rw-r--r--ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java50
-rw-r--r--ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java94
-rw-r--r--ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java88
4 files changed, 286 insertions, 0 deletions
diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java
new file mode 100644
index 0000000..df9182f
--- /dev/null
+++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java
@@ -0,0 +1,54 @@
+package com.woorea.openstack.ceilometer.v2.model;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class Meter {
+
+ @JsonProperty("user_id")
+ private String user;
+
+
+ private String name;
+
+ @JsonProperty("resource_id")
+ private String resource;
+
+ @JsonProperty("project_id")
+ private String project;
+
+ private String type;
+
+ private String unit;
+
+ public String getUser() {
+ return user;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getResource() {
+ return resource;
+ }
+
+ public String getProject() {
+ return project;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public String getUnit() {
+ return unit;
+ }
+
+ @Override
+ public String toString() {
+ return "Meter [user=" + user + ", name=" + name + ", resource="
+ + resource + ", project=" + project + ", type=" + type
+ + ", unit=" + unit + "]";
+ }
+
+}
diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java
new file mode 100644
index 0000000..24e14aa
--- /dev/null
+++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java
@@ -0,0 +1,50 @@
+package com.woorea.openstack.ceilometer.v2.model;
+
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class Resource {
+ //{"resource_id": "23b55841eedd41e99d5f3f32149ca086", "timestamp": "2013-03-03T15:19:00", "project_id": "23b55841eedd41e99d5f3f32149ca086", "user_id": null, "metadata": {}}
+
+ @JsonProperty("resource_id")
+ private String resource;
+
+ private String timestamp;
+
+ @JsonProperty("project_id")
+ private String project;
+
+ @JsonProperty("user_id")
+ private String user;
+
+ private Map<String, Object> metadata;
+
+ public String getResource() {
+ return resource;
+ }
+
+ public String getTimestamp() {
+ return timestamp;
+ }
+
+ public String getProject() {
+ return project;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public Map<String, Object> getMetadata() {
+ return metadata;
+ }
+
+ @Override
+ public String toString() {
+ return "Resource [resource=" + resource + ", timestamp=" + timestamp
+ + ", project=" + project + ", user=" + user + ", metadata="
+ + metadata + "]";
+ }
+
+}
diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java
new file mode 100644
index 0000000..8827de4
--- /dev/null
+++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java
@@ -0,0 +1,94 @@
+package com.woorea.openstack.ceilometer.v2.model;
+
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class Sample {
+
+ @JsonProperty("counter_type")
+ private String counterType;
+
+ @JsonProperty("counter_name")
+ private String counterName;
+
+ @JsonProperty("counter_unit")
+ private String counterUnit;
+
+ @JsonProperty("counter_volume")
+ private String counterVolume;
+
+ private String source;
+
+ @JsonProperty("project_id")
+ private String project;
+
+ @JsonProperty("user_id")
+ private String user;
+
+ @JsonProperty("resource_id")
+ private String resource;
+
+ private String timestamp;
+
+ @JsonProperty("message_id")
+ private String message;
+
+ @JsonProperty("resource_metadata")
+ private Map<String, Object> metadata;
+
+ public String getCounterType() {
+ return counterType;
+ }
+
+ public String getCounterName() {
+ return counterName;
+ }
+
+ public String getCounterUnit() {
+ return counterUnit;
+ }
+
+ public String getCounterVolume() {
+ return counterVolume;
+ }
+
+ public String getSource() {
+ return source;
+ }
+
+ public String getProject() {
+ return project;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public String getResource() {
+ return resource;
+ }
+
+ public String getTimestamp() {
+ return timestamp;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public Map<String, Object> getMetadata() {
+ return metadata;
+ }
+
+ @Override
+ public String toString() {
+ return "Sample [counterType=" + counterType + ", counterName="
+ + counterName + ", counterUnit=" + counterUnit
+ + ", counterVolume=" + counterVolume + ", source=" + source
+ + ", project=" + project + ", user=" + user + ", resource="
+ + resource + ", timestamp=" + timestamp + ", message="
+ + message + ", metadata=" + metadata + "]";
+ }
+
+}
diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java
new file mode 100644
index 0000000..5a34fe5
--- /dev/null
+++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java
@@ -0,0 +1,88 @@
+package com.woorea.openstack.ceilometer.v2.model;
+
+import java.math.BigDecimal;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class Statistics {
+
+ private BigDecimal avg;
+
+ private BigDecimal count;
+
+ private BigDecimal duration;
+
+ @JsonProperty("duration_start")
+ private String durationStart;
+
+ @JsonProperty("duration_end")
+ private String durationEnd;
+
+ private BigDecimal max;
+
+ private BigDecimal min;
+
+ private BigDecimal period;
+
+ @JsonProperty("period_start")
+ private String periodStart;
+
+ @JsonProperty("period_end")
+ private String periodEnd;
+
+ private BigDecimal sum;
+
+ public BigDecimal getAvg() {
+ return avg;
+ }
+
+ public BigDecimal getCount() {
+ return count;
+ }
+
+ public BigDecimal getDuration() {
+ return duration;
+ }
+
+ public String getDurationStart() {
+ return durationStart;
+ }
+
+ public String getDurationEnd() {
+ return durationEnd;
+ }
+
+ public BigDecimal getMax() {
+ return max;
+ }
+
+ public BigDecimal getMin() {
+ return min;
+ }
+
+ public BigDecimal getPeriod() {
+ return period;
+ }
+
+ public String getPeriodStart() {
+ return periodStart;
+ }
+
+ public String getPeriodEnd() {
+ return periodEnd;
+ }
+
+ public BigDecimal getSum() {
+ return sum;
+ }
+
+ @Override
+ public String toString() {
+ return "Statistics [avg=" + avg + ", count=" + count + ", duration="
+ + duration + ", durationStart=" + durationStart
+ + ", durationEnd=" + durationEnd + ", max=" + max + ", min="
+ + min + ", period=" + period + ", periodStart=" + periodStart
+ + ", periodEnd=" + periodEnd + ", sum=" + sum + "]";
+ }
+
+}