Class PredictiveResponseInner
java.lang.Object
com.azure.resourcemanager.monitor.fluent.models.PredictiveResponseInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PredictiveResponseInner>
public final class PredictiveResponseInner
extends Object
implements com.azure.json.JsonSerializable<PredictiveResponseInner>
The response to a metrics query.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PredictiveResponseInner class. -
Method Summary
Modifier and TypeMethodDescriptiondata()
Get the data property: the value of the collection.static PredictiveResponseInner
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of PredictiveResponseInner from the JsonReader.interval()
Get the interval property: The interval (window size) for which the metric data was returned in.Get the metricName property: The metrics being queried.Get the targetResourceId property: resource of the predictive metric.timespan()
Get the timespan property: The timespan for which the data was retrieved.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withData
(List<PredictiveValue> data) Set the data property: the value of the collection.withInterval
(Duration interval) Set the interval property: The interval (window size) for which the metric data was returned in.withMetricName
(String metricName) Set the metricName property: The metrics being queried.withTargetResourceId
(String targetResourceId) Set the targetResourceId property: resource of the predictive metric.withTimespan
(String timespan) Set the timespan property: The timespan for which the data was retrieved.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
PredictiveResponseInner
public PredictiveResponseInner()Creates an instance of PredictiveResponseInner class.
-
-
Method Details
-
timespan
Get the timespan property: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.- Returns:
- the timespan value.
-
withTimespan
Set the timespan property: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.- Parameters:
timespan
- the timespan value to set.- Returns:
- the PredictiveResponseInner object itself.
-
interval
Get the interval property: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.- Returns:
- the interval value.
-
withInterval
Set the interval property: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.- Parameters:
interval
- the interval value to set.- Returns:
- the PredictiveResponseInner object itself.
-
metricName
Get the metricName property: The metrics being queried.- Returns:
- the metricName value.
-
withMetricName
Set the metricName property: The metrics being queried.- Parameters:
metricName
- the metricName value to set.- Returns:
- the PredictiveResponseInner object itself.
-
targetResourceId
Get the targetResourceId property: resource of the predictive metric.- Returns:
- the targetResourceId value.
-
withTargetResourceId
Set the targetResourceId property: resource of the predictive metric.- Parameters:
targetResourceId
- the targetResourceId value to set.- Returns:
- the PredictiveResponseInner object itself.
-
data
Get the data property: the value of the collection.- Returns:
- the data value.
-
withData
Set the data property: the value of the collection.- Parameters:
data
- the data value to set.- Returns:
- the PredictiveResponseInner object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<PredictiveResponseInner>
- Throws:
IOException
-
fromJson
public static PredictiveResponseInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PredictiveResponseInner from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of PredictiveResponseInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the PredictiveResponseInner.
-