Class MetricValue
- java.lang.Object
-
- software.amazon.awssdk.services.ec2.model.MetricValue
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<MetricValue.Builder,MetricValue>
@Generated("software.amazon.awssdk:codegen") public final class MetricValue extends Object implements SdkPojo, Serializable, ToCopyableBuilder<MetricValue.Builder,MetricValue>
Represents a single metric value with its associated statistic, such as the sum or average of unused capacity hours.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMetricValue.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetricValue.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Metricmetric()The name of the metric.StringmetricAsString()The name of the metric.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends MetricValue.Builder>serializableBuilderClass()MetricValue.BuildertoBuilder()StringtoString()Returns a string representation of this object.Doublevalue()The numerical value of the metric for the specified statistic and time period.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
metric
public final Metric metric()
The name of the metric.
If the service returns an enum value that is not available in the current SDK version,
metricwill returnMetric.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frommetricAsString().- Returns:
- The name of the metric.
- See Also:
Metric
-
metricAsString
public final String metricAsString()
The name of the metric.
If the service returns an enum value that is not available in the current SDK version,
metricwill returnMetric.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frommetricAsString().- Returns:
- The name of the metric.
- See Also:
Metric
-
value
public final Double value()
The numerical value of the metric for the specified statistic and time period.
- Returns:
- The numerical value of the metric for the specified statistic and time period.
-
toBuilder
public MetricValue.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<MetricValue.Builder,MetricValue>
-
builder
public static MetricValue.Builder builder()
-
serializableBuilderClass
public static Class<? extends MetricValue.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-