DiagnosticMetricSample Class

  • java.lang.Object
    • com.azure.resourcemanager.appservice.models.DiagnosticMetricSample

Implements

public final class DiagnosticMetricSample
implements JsonSerializable<DiagnosticMetricSample>

Class representing Diagnostic Metric.

Constructor Summary

Constructor Description
DiagnosticMetricSample()

Creates an instance of DiagnosticMetricSample class.

Method Summary

Modifier and Type Method and Description
static DiagnosticMetricSample fromJson(JsonReader jsonReader)

Reads an instance of DiagnosticMetricSample from the JsonReader.

Boolean isAggregated()

Get the isAggregated property: Whether the values are aggregates across all workers or not.

Double maximum()

Get the maximum property: Maximum of the metric sampled during the time period.

Double minimum()

Get the minimum property: Minimum of the metric sampled during the time period.

String roleInstance()

Get the roleInstance property: Role Instance.

OffsetDateTime timestamp()

Get the timestamp property: Time at which metric is measured.

JsonWriter toJson(JsonWriter jsonWriter)
Double total()

Get the total property: Total value of the metric.

void validate()

Validates the instance.

DiagnosticMetricSample withIsAggregated(Boolean isAggregated)

Set the isAggregated property: Whether the values are aggregates across all workers or not.

DiagnosticMetricSample withMaximum(Double maximum)

Set the maximum property: Maximum of the metric sampled during the time period.

DiagnosticMetricSample withMinimum(Double minimum)

Set the minimum property: Minimum of the metric sampled during the time period.

DiagnosticMetricSample withRoleInstance(String roleInstance)

Set the roleInstance property: Role Instance.

DiagnosticMetricSample withTimestamp(OffsetDateTime timestamp)

Set the timestamp property: Time at which metric is measured.

DiagnosticMetricSample withTotal(Double total)

Set the total property: Total value of the metric.

Methods inherited from java.lang.Object

Constructor Details

DiagnosticMetricSample

public DiagnosticMetricSample()

Creates an instance of DiagnosticMetricSample class.

Method Details

fromJson

public static DiagnosticMetricSample fromJson(JsonReader jsonReader)

Reads an instance of DiagnosticMetricSample from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DiagnosticMetricSample 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 DiagnosticMetricSample.

isAggregated

public Boolean isAggregated()

Get the isAggregated property: Whether the values are aggregates across all workers or not.

Returns:

the isAggregated value.

maximum

public Double maximum()

Get the maximum property: Maximum of the metric sampled during the time period.

Returns:

the maximum value.

minimum

public Double minimum()

Get the minimum property: Minimum of the metric sampled during the time period.

Returns:

the minimum value.

roleInstance

public String roleInstance()

Get the roleInstance property: Role Instance. Null if this counter is not per instance This is returned and should be whichever instance name we desire to be returned i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) where RDWORKERNAME is Machine name below and RoleInstance name in parenthesis.

Returns:

the roleInstance value.

timestamp

public OffsetDateTime timestamp()

Get the timestamp property: Time at which metric is measured.

Returns:

the timestamp value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

total

public Double total()

Get the total property: Total value of the metric. If multiple measurements are made this will have sum of all.

Returns:

the total value.

validate

public void validate()

Validates the instance.

withIsAggregated

public DiagnosticMetricSample withIsAggregated(Boolean isAggregated)

Set the isAggregated property: Whether the values are aggregates across all workers or not.

Parameters:

isAggregated - the isAggregated value to set.

Returns:

the DiagnosticMetricSample object itself.

withMaximum

public DiagnosticMetricSample withMaximum(Double maximum)

Set the maximum property: Maximum of the metric sampled during the time period.

Parameters:

maximum - the maximum value to set.

Returns:

the DiagnosticMetricSample object itself.

withMinimum

public DiagnosticMetricSample withMinimum(Double minimum)

Set the minimum property: Minimum of the metric sampled during the time period.

Parameters:

minimum - the minimum value to set.

Returns:

the DiagnosticMetricSample object itself.

withRoleInstance

public DiagnosticMetricSample withRoleInstance(String roleInstance)

Set the roleInstance property: Role Instance. Null if this counter is not per instance This is returned and should be whichever instance name we desire to be returned i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) where RDWORKERNAME is Machine name below and RoleInstance name in parenthesis.

Parameters:

roleInstance - the roleInstance value to set.

Returns:

the DiagnosticMetricSample object itself.

withTimestamp

public DiagnosticMetricSample withTimestamp(OffsetDateTime timestamp)

Set the timestamp property: Time at which metric is measured.

Parameters:

timestamp - the timestamp value to set.

Returns:

the DiagnosticMetricSample object itself.

withTotal

public DiagnosticMetricSample withTotal(Double total)

Set the total property: Total value of the metric. If multiple measurements are made this will have sum of all.

Parameters:

total - the total value to set.

Returns:

the DiagnosticMetricSample object itself.

Applies to