PassFailServerMetric Class

  • java.lang.Object
    • com.azure.developer.loadtesting.models.PassFailServerMetric

Implements

public final class PassFailServerMetric
implements JsonSerializable<PassFailServerMetric>

Pass fail server metric.

Constructor Summary

Constructor Description
PassFailServerMetric()

Creates an instance of PassFailServerMetric class.

Method Summary

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

Reads an instance of PassFailServerMetric from the JsonReader.

PassFailAction getAction()

Get the action property: Action taken after the threshold is met.

Double getActualValue()

Get the actualValue property: The actual value of the server metric.

String getAggregation()

Get the aggregation property: Aggregation Type.

String getCondition()

Get the condition property: The comparison operator.

String getMetricName()

Get the metricName property: The server metric name.

String getMetricNamespace()

Get the metricNamespace property: The server metric namespace.

String getResourceId()

Get the resourceId property: The resource id of the resource emitting the metric.

PassFailResult getResult()

Get the result property: Outcome of the test run.

double getValue()

Get the value property: The value to compare with the server metric.

PassFailServerMetric setAction(PassFailAction action)

Set the action property: Action taken after the threshold is met.

PassFailServerMetric setAggregation(String aggregation)

Set the aggregation property: Aggregation Type.

PassFailServerMetric setCondition(String condition)

Set the condition property: The comparison operator.

PassFailServerMetric setMetricName(String metricName)

Set the metricName property: The server metric name.

PassFailServerMetric setMetricNamespace(String metricNamespace)

Set the metricNamespace property: The server metric namespace.

PassFailServerMetric setResourceId(String resourceId)

Set the resourceId property: The resource id of the resource emitting the metric.

PassFailServerMetric setValue(double value)

Set the value property: The value to compare with the server metric.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

PassFailServerMetric

public PassFailServerMetric()

Creates an instance of PassFailServerMetric class.

Method Details

fromJson

public static PassFailServerMetric fromJson(JsonReader jsonReader)

Reads an instance of PassFailServerMetric from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getAction

public PassFailAction getAction()

Get the action property: Action taken after the threshold is met. Default is ‘continue’.

Returns:

the action value.

getActualValue

public Double getActualValue()

Get the actualValue property: The actual value of the server metric.

Returns:

the actualValue value.

getAggregation

public String getAggregation()

Get the aggregation property: Aggregation Type.

Returns:

the aggregation value.

getCondition

public String getCondition()

Get the condition property: The comparison operator. Supported types ‘>’, ‘<’.

Returns:

the condition value.

getMetricName

public String getMetricName()

Get the metricName property: The server metric name.

Returns:

the metricName value.

getMetricNamespace

public String getMetricNamespace()

Get the metricNamespace property: The server metric namespace.

Returns:

the metricNamespace value.

getResourceId

public String getResourceId()

Get the resourceId property: The resource id of the resource emitting the metric.

Returns:

the resourceId value.

getResult

public PassFailResult getResult()

Get the result property: Outcome of the test run.

Returns:

the result value.

getValue

public double getValue()

Get the value property: The value to compare with the server metric.

Returns:

the value value.

setAction

public PassFailServerMetric setAction(PassFailAction action)

Set the action property: Action taken after the threshold is met. Default is ‘continue’.

Parameters:

action - the action value to set.

Returns:

the PassFailServerMetric object itself.

setAggregation

public PassFailServerMetric setAggregation(String aggregation)

Set the aggregation property: Aggregation Type.

Required when create the resource.

Parameters:

aggregation - the aggregation value to set.

Returns:

the PassFailServerMetric object itself.

setCondition

public PassFailServerMetric setCondition(String condition)

Set the condition property: The comparison operator. Supported types ‘>’, ‘<’.

Required when create the resource.

Parameters:

condition - the condition value to set.

Returns:

the PassFailServerMetric object itself.

setMetricName

public PassFailServerMetric setMetricName(String metricName)

Set the metricName property: The server metric name.

Required when create the resource.

Parameters:

metricName - the metricName value to set.

Returns:

the PassFailServerMetric object itself.

setMetricNamespace

public PassFailServerMetric setMetricNamespace(String metricNamespace)

Set the metricNamespace property: The server metric namespace.

Required when create the resource.

Parameters:

metricNamespace - the metricNamespace value to set.

Returns:

the PassFailServerMetric object itself.

setResourceId

public PassFailServerMetric setResourceId(String resourceId)

Set the resourceId property: The resource id of the resource emitting the metric.

Required when create the resource.

Parameters:

resourceId - the resourceId value to set.

Returns:

the PassFailServerMetric object itself.

setValue

public PassFailServerMetric setValue(double value)

Set the value property: The value to compare with the server metric.

Required when create the resource.

Parameters:

value - the value value to set.

Returns:

the PassFailServerMetric object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to