Class MetricDataResult
- java.lang.Object
-
- software.amazon.awssdk.services.ec2.model.MetricDataResult
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<MetricDataResult.Builder,MetricDataResult>
@Generated("software.amazon.awssdk:codegen") public final class MetricDataResult extends Object implements SdkPojo, Serializable, ToCopyableBuilder<MetricDataResult.Builder,MetricDataResult>
Contains a single data point from a capacity metrics query, including the dimension values, timestamp, and metric values for that specific combination.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMetricDataResult.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetricDataResult.Builderbuilder()CapacityManagerDimensiondimension()The dimension values that identify this specific data point, such as account ID, region, and instance family.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasMetricValues()For responses, this returns true if the service returned a value for the MetricValues property.List<MetricValue>metricValues()The metric values and statistics for this data point, containing the actual capacity usage numbers.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends MetricDataResult.Builder>serializableBuilderClass()Instanttimestamp()The timestamp for this data point, indicating when the capacity usage occurred.MetricDataResult.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
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
-
dimension
public final CapacityManagerDimension dimension()
The dimension values that identify this specific data point, such as account ID, region, and instance family.
- Returns:
- The dimension values that identify this specific data point, such as account ID, region, and instance family.
-
timestamp
public final Instant timestamp()
The timestamp for this data point, indicating when the capacity usage occurred.
- Returns:
- The timestamp for this data point, indicating when the capacity usage occurred.
-
hasMetricValues
public final boolean hasMetricValues()
For responses, this returns true if the service returned a value for the MetricValues property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
metricValues
public final List<MetricValue> metricValues()
The metric values and statistics for this data point, containing the actual capacity usage numbers.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasMetricValues()method.- Returns:
- The metric values and statistics for this data point, containing the actual capacity usage numbers.
-
toBuilder
public MetricDataResult.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<MetricDataResult.Builder,MetricDataResult>
-
builder
public static MetricDataResult.Builder builder()
-
serializableBuilderClass
public static Class<? extends MetricDataResult.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
-
-