PredictiveResponseInner Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.fluent.models.PredictiveResponseInner

Implements

public final class PredictiveResponseInner
implements JsonSerializable<PredictiveResponseInner>

The response to a metrics query.

Constructor Summary

Constructor Description
PredictiveResponseInner()

Creates an instance of PredictiveResponseInner class.

Method Summary

Modifier and Type Method and Description
List<PredictiveValue> data()

Get the data property: the value of the collection.

static PredictiveResponseInner fromJson(JsonReader jsonReader)

Reads an instance of PredictiveResponseInner from the JsonReader.

Duration interval()

Get the interval property: The interval (window size) for which the metric data was returned in.

String metricName()

Get the metricName property: The metrics being queried.

String targetResourceId()

Get the targetResourceId property: resource of the predictive metric.

String timespan()

Get the timespan property: The timespan for which the data was retrieved.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

PredictiveResponseInner withData(List<PredictiveValue> data)

Set the data property: the value of the collection.

PredictiveResponseInner withInterval(Duration interval)

Set the interval property: The interval (window size) for which the metric data was returned in.

PredictiveResponseInner withMetricName(String metricName)

Set the metricName property: The metrics being queried.

PredictiveResponseInner withTargetResourceId(String targetResourceId)

Set the targetResourceId property: resource of the predictive metric.

PredictiveResponseInner withTimespan(String timespan)

Set the timespan property: The timespan for which the data was retrieved.

Methods inherited from java.lang.Object

Constructor Details

PredictiveResponseInner

public PredictiveResponseInner()

Creates an instance of PredictiveResponseInner class.

Method Details

data

public List data()

Get the data property: the value of the collection.

Returns:

the data value.

fromJson

public static PredictiveResponseInner fromJson(JsonReader jsonReader)

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.

interval

public Duration 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.

metricName

public String metricName()

Get the metricName property: The metrics being queried.

Returns:

the metricName value.

targetResourceId

public String targetResourceId()

Get the targetResourceId property: resource of the predictive metric.

Returns:

the targetResourceId value.

timespan

public String 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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withData

public PredictiveResponseInner withData(List data)

Set the data property: the value of the collection.

Parameters:

data - the data value to set.

Returns:

the PredictiveResponseInner object itself.

withInterval

public PredictiveResponseInner withInterval(Duration interval)

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.

withMetricName

public PredictiveResponseInner withMetricName(String metricName)

Set the metricName property: The metrics being queried.

Parameters:

metricName - the metricName value to set.

Returns:

the PredictiveResponseInner object itself.

withTargetResourceId

public PredictiveResponseInner withTargetResourceId(String targetResourceId)

Set the targetResourceId property: resource of the predictive metric.

Parameters:

targetResourceId - the targetResourceId value to set.

Returns:

the PredictiveResponseInner object itself.

withTimespan

public PredictiveResponseInner withTimespan(String timespan)

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.

Applies to