MetricInner Class

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

Implements

public final class MetricInner
implements JsonSerializable<MetricInner>

The result data of a query.

Constructor Summary

Constructor Description
MetricInner()

Creates an instance of MetricInner class.

Method Summary

Modifier and Type Method and Description
String displayDescription()

Get the displayDescription property: Detailed description of this metric.

String errorCode()

Get the errorCode property: 'Success' or the error details on query failures for this metric.

String errorMessage()

Get the errorMessage property: Error message encountered querying this specific metric.

static MetricInner fromJson(JsonReader jsonReader)

Reads an instance of MetricInner from the JsonReader.

String id()

Get the id property: the metric Id.

LocalizableStringInner name()

Get the name property: the name and the display name of the metric, i.e.

List<TimeSeriesElement> timeseries()

Get the timeseries property: the time series returned when a data query is performed.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: the resource type of the metric resource.

Unit unit()

Get the unit property: The unit of the metric.

void validate()

Validates the instance.

MetricInner withDisplayDescription(String displayDescription)

Set the displayDescription property: Detailed description of this metric.

MetricInner withErrorCode(String errorCode)

Set the errorCode property: 'Success' or the error details on query failures for this metric.

MetricInner withErrorMessage(String errorMessage)

Set the errorMessage property: Error message encountered querying this specific metric.

MetricInner withId(String id)

Set the id property: the metric Id.

MetricInner withName(LocalizableStringInner name)

Set the name property: the name and the display name of the metric, i.e.

MetricInner withTimeseries(List<TimeSeriesElement> timeseries)

Set the timeseries property: the time series returned when a data query is performed.

MetricInner withType(String type)

Set the type property: the resource type of the metric resource.

MetricInner withUnit(Unit unit)

Set the unit property: The unit of the metric.

Methods inherited from java.lang.Object

Constructor Details

MetricInner

public MetricInner()

Creates an instance of MetricInner class.

Method Details

displayDescription

public String displayDescription()

Get the displayDescription property: Detailed description of this metric.

Returns:

the displayDescription value.

errorCode

public String errorCode()

Get the errorCode property: 'Success' or the error details on query failures for this metric.

Returns:

the errorCode value.

errorMessage

public String errorMessage()

Get the errorMessage property: Error message encountered querying this specific metric.

Returns:

the errorMessage value.

fromJson

public static MetricInner fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

id

public String id()

Get the id property: the metric Id.

Returns:

the id value.

name

public LocalizableStringInner name()

Get the name property: the name and the display name of the metric, i.e. it is localizable string.

Returns:

the name value.

timeseries

public List timeseries()

Get the timeseries property: the time series returned when a data query is performed.

Returns:

the timeseries value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: the resource type of the metric resource.

Returns:

the type value.

unit

public Unit unit()

Get the unit property: The unit of the metric.

Returns:

the unit value.

validate

public void validate()

Validates the instance.

withDisplayDescription

public MetricInner withDisplayDescription(String displayDescription)

Set the displayDescription property: Detailed description of this metric.

Parameters:

displayDescription - the displayDescription value to set.

Returns:

the MetricInner object itself.

withErrorCode

public MetricInner withErrorCode(String errorCode)

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.

withErrorMessage

public MetricInner withErrorMessage(String errorMessage)

Set the errorMessage property: Error message encountered querying this specific metric.

Parameters:

errorMessage - the errorMessage value to set.

Returns:

the MetricInner object itself.

withId

public MetricInner withId(String id)

Set the id property: the metric Id.

Parameters:

id - the id value to set.

Returns:

the MetricInner object itself.

withName

public MetricInner withName(LocalizableStringInner name)

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.

withTimeseries

public MetricInner withTimeseries(List timeseries)

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.

withType

public MetricInner withType(String type)

Set the type property: the resource type of the metric resource.

Parameters:

type - the type value to set.

Returns:

the MetricInner object itself.

withUnit

public MetricInner withUnit(Unit unit)

Set the unit property: The unit of the metric.

Parameters:

unit - the unit value to set.

Returns:

the MetricInner object itself.

Applies to