Class TimeSeriesElement
java.lang.Object
com.azure.resourcemanager.monitor.models.TimeSeriesElement
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TimeSeriesElement>
public final class TimeSeriesElement
extends Object
implements com.azure.json.JsonSerializable<TimeSeriesElement>
A time series result type. The discriminator value is always TimeSeries in this case.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondata()
Get the data property: An array of data points representing the metric values.static TimeSeriesElement
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of TimeSeriesElement from the JsonReader.Get the metadatavalues property: the metadata values returned if $filter was specified in the call.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withData
(List<MetricValue> data) Set the data property: An array of data points representing the metric values.withMetadatavalues
(List<MetadataValueInner> metadatavalues) Set the metadatavalues property: the metadata values returned if $filter was specified in the call.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
-
TimeSeriesElement
public TimeSeriesElement()Creates an instance of TimeSeriesElement class.
-
-
Method Details
-
metadatavalues
Get the metadatavalues property: the metadata values returned if $filter was specified in the call.- Returns:
- the metadatavalues value.
-
withMetadatavalues
Set the metadatavalues property: the metadata values returned if $filter was specified in the call.- Parameters:
metadatavalues
- the metadatavalues value to set.- Returns:
- the TimeSeriesElement object itself.
-
data
Get the data property: An array of data points representing the metric values. This is only returned if a result type of data is specified.- Returns:
- the data value.
-
withData
Set the data property: An array of data points representing the metric values. This is only returned if a result type of data is specified.- Parameters:
data
- the data value to set.- Returns:
- the TimeSeriesElement 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<TimeSeriesElement>
- Throws:
IOException
-
fromJson
Reads an instance of TimeSeriesElement from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of TimeSeriesElement 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 TimeSeriesElement.
-