Class MetricInner
java.lang.Object
com.azure.resourcemanager.monitor.fluent.models.MetricInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MetricInner>
public final class MetricInner
extends Object
implements com.azure.json.JsonSerializable<MetricInner>
The result data of a query.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the displayDescription property: Detailed description of this metric.Get the errorCode property: 'Success' or the error details on query failures for this metric.Get the errorMessage property: Error message encountered querying this specific metric.static MetricInner
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MetricInner from the JsonReader.id()
Get the id property: the metric Id.name()
Get the name property: the name and the display name of the metric, i.e. it is localizable string.Get the timeseries property: the time series returned when a data query is performed.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) type()
Get the type property: the resource type of the metric resource.unit()
Get the unit property: The unit of the metric.void
validate()
Validates the instance.withDisplayDescription
(String displayDescription) Set the displayDescription property: Detailed description of this metric.withErrorCode
(String errorCode) Set the errorCode property: 'Success' or the error details on query failures for this metric.withErrorMessage
(String errorMessage) Set the errorMessage property: Error message encountered querying this specific metric.Set the id property: the metric Id.Set the name property: the name and the display name of the metric, i.e. it is localizable string.withTimeseries
(List<TimeSeriesElement> timeseries) Set the timeseries property: the time series returned when a data query is performed.Set the type property: the resource type of the metric resource.Set the unit property: The unit of the metric.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
-
MetricInner
public MetricInner()Creates an instance of MetricInner class.
-
-
Method Details
-
id
Get the id property: the metric Id.- Returns:
- the id value.
-
withId
Set the id property: the metric Id.- Parameters:
id
- the id value to set.- Returns:
- the MetricInner object itself.
-
type
Get the type property: the resource type of the metric resource.- Returns:
- the type value.
-
withType
Set the type property: the resource type of the metric resource.- Parameters:
type
- the type value to set.- Returns:
- the MetricInner object itself.
-
name
Get the name property: the name and the display name of the metric, i.e. it is localizable string.- Returns:
- the name value.
-
withName
Set the name property: the name and the display name of the metric, i.e. it is localizable string.- Parameters:
name
- the name value to set.- Returns:
- the MetricInner object itself.
-
displayDescription
Get the displayDescription property: Detailed description of this metric.- Returns:
- the displayDescription value.
-
withDisplayDescription
Set the displayDescription property: Detailed description of this metric.- Parameters:
displayDescription
- the displayDescription value to set.- Returns:
- the MetricInner object itself.
-
errorCode
Get the errorCode property: 'Success' or the error details on query failures for this metric.- Returns:
- the errorCode value.
-
withErrorCode
Set the errorCode property: 'Success' or the error details on query failures for this metric.- Parameters:
errorCode
- the errorCode value to set.- Returns:
- the MetricInner object itself.
-
errorMessage
Get the errorMessage property: Error message encountered querying this specific metric.- Returns:
- the errorMessage value.
-
withErrorMessage
Set the errorMessage property: Error message encountered querying this specific metric.- Parameters:
errorMessage
- the errorMessage value to set.- Returns:
- the MetricInner object itself.
-
unit
Get the unit property: The unit of the metric.- Returns:
- the unit value.
-
withUnit
Set the unit property: The unit of the metric.- Parameters:
unit
- the unit value to set.- Returns:
- the MetricInner object itself.
-
timeseries
Get the timeseries property: the time series returned when a data query is performed.- Returns:
- the timeseries value.
-
withTimeseries
Set the timeseries property: the time series returned when a data query is performed.- Parameters:
timeseries
- the timeseries value to set.- Returns:
- the MetricInner 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<MetricInner>
- Throws:
IOException
-
fromJson
Reads an instance of MetricInner from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of MetricInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the MetricInner.
-