|
16 | 16 |
|
17 | 17 | package software.amazon.cloudwatchlogs.emf.model;
|
18 | 18 |
|
19 |
| -import com.fasterxml.jackson.annotation.JsonIgnore; |
20 | 19 | import com.fasterxml.jackson.annotation.JsonInclude;
|
21 | 20 | import com.fasterxml.jackson.annotation.JsonProperty;
|
22 | 21 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
23 | 22 | import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
| 23 | + |
24 | 24 | import lombok.Getter;
|
25 | 25 | import software.amazon.cloudwatchlogs.emf.serializers.StorageResolutionFilter;
|
26 | 26 | import software.amazon.cloudwatchlogs.emf.serializers.StorageResolutionSerializer;
|
@@ -48,7 +48,13 @@ public abstract class Metric {
|
48 | 48 | @JsonSerialize(using = StorageResolutionSerializer.class)
|
49 | 49 | protected StorageResolution storageResolution;
|
50 | 50 |
|
51 |
| - @JsonIgnore @Getter protected Object values; |
| 51 | + /** @return the values stored by this metric. */ |
| 52 | + abstract Object getValues(); |
| 53 | + |
| 54 | + /** @return a simplified representation of the values of this metric. */ |
| 55 | + protected Object getFormattedValues() { |
| 56 | + return this.getValues(); |
| 57 | + } |
52 | 58 |
|
53 | 59 | /**
|
54 | 60 | * Change the name of this metric. Should only be used within this package in MetricContext when
|
@@ -80,7 +86,4 @@ protected void setName(String name) {
|
80 | 86 | * metric. If there are less than {@code size} values, null is returned.
|
81 | 87 | */
|
82 | 88 | protected abstract Metric getMetricValuesOverSize(int size);
|
83 |
| - |
84 |
| - /** @return a simplified representation of the values of this metric. */ |
85 |
| - protected abstract Object getSimplifiedValues(); |
86 | 89 | }
|
0 commit comments