Class MetricsQueryTimeInterval
java.lang.Object
com.azure.monitor.query.metrics.models.MetricsQueryTimeInterval
Class to represent a time interval.
Time intervals are inclusive at the start time and exclusive at the end time.
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsQueryTimeInterval
(OffsetDateTime startTime, OffsetDateTime endTime) Creates an instance ofMetricsQueryTimeInterval
using the start and endOffsetDateTimes
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the end time of thisMetricsQueryTimeInterval
instance.Returns the start time of thisMetricsQueryTimeInterval
instance.int
hashCode()
static MetricsQueryTimeInterval
This method takes an ISO 8601 formatted time interval string and returns an instance ofMetricsQueryTimeInterval
.toString()
-
Constructor Details
-
MetricsQueryTimeInterval
Creates an instance ofMetricsQueryTimeInterval
using the start and endOffsetDateTimes
.- Parameters:
startTime
- The start time of the interval.endTime
- The end time of the interval.
-
-
Method Details
-
getStartTime
Returns the start time of thisMetricsQueryTimeInterval
instance.- Returns:
- the start time of this
MetricsQueryTimeInterval
instance.
-
getEndTime
Returns the end time of thisMetricsQueryTimeInterval
instance.- Returns:
- the end time of this
MetricsQueryTimeInterval
instance.
-
parse
This method takes an ISO 8601 formatted time interval string and returns an instance ofMetricsQueryTimeInterval
.- Parameters:
value
- The ISO 8601 formatted time interval string.- Returns:
- An instance of
MetricsQueryTimeInterval
. - Throws:
IllegalArgumentException
- ifvalue
is not in the correct format.
-
toString
-
equals
-
hashCode
public int hashCode()
-