Class Threshold.Builder (2.44.0)

public static final class Threshold.Builder extends GeneratedMessageV3.Builder<Threshold.Builder> implements ThresholdOrBuilder

Defines a threshold for categorizing time series values.

Protobuf type google.monitoring.dashboard.v1.Threshold

Implements

ThresholdOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Threshold.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Threshold.Builder
Overrides

build()

public Threshold build()
Returns
Type Description
Threshold

buildPartial()

public Threshold buildPartial()
Returns
Type Description
Threshold

clear()

public Threshold.Builder clear()
Returns
Type Description
Threshold.Builder
Overrides

clearColor()

public Threshold.Builder clearColor()

The state color for this threshold. Color is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Color color = 3;

Returns
Type Description
Threshold.Builder

This builder for chaining.

clearDirection()

public Threshold.Builder clearDirection()

The direction for the current threshold. Direction is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Direction direction = 4;

Returns
Type Description
Threshold.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Threshold.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Threshold.Builder
Overrides

clearLabel()

public Threshold.Builder clearLabel()

A label for the threshold.

string label = 1;

Returns
Type Description
Threshold.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Threshold.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Threshold.Builder
Overrides

clearTargetAxis()

public Threshold.Builder clearTargetAxis()

The target axis to use for plotting the threshold. Target axis is not allowed in a Scorecard.

.google.monitoring.dashboard.v1.Threshold.TargetAxis target_axis = 5;

Returns
Type Description
Threshold.Builder

This builder for chaining.

clearValue()

public Threshold.Builder clearValue()

The value of the threshold. The value should be defined in the native scale of the metric.

double value = 2;

Returns
Type Description
Threshold.Builder

This builder for chaining.

clone()

public Threshold.Builder clone()
Returns
Type Description
Threshold.Builder
Overrides

getColor()

public Threshold.Color getColor()

The state color for this threshold. Color is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Color color = 3;

Returns
Type Description
Threshold.Color

The color.

getColorValue()

public int getColorValue()

The state color for this threshold. Color is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Color color = 3;

Returns
Type Description
int

The enum numeric value on the wire for color.

getDefaultInstanceForType()

public Threshold getDefaultInstanceForType()
Returns
Type Description
Threshold

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDirection()

public Threshold.Direction getDirection()

The direction for the current threshold. Direction is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Direction direction = 4;

Returns
Type Description
Threshold.Direction

The direction.

getDirectionValue()

public int getDirectionValue()

The direction for the current threshold. Direction is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Direction direction = 4;

Returns
Type Description
int

The enum numeric value on the wire for direction.

getLabel()

public String getLabel()

A label for the threshold.

string label = 1;

Returns
Type Description
String

The label.

getLabelBytes()

public ByteString getLabelBytes()

A label for the threshold.

string label = 1;

Returns
Type Description
ByteString

The bytes for label.

getTargetAxis()

public Threshold.TargetAxis getTargetAxis()

The target axis to use for plotting the threshold. Target axis is not allowed in a Scorecard.

.google.monitoring.dashboard.v1.Threshold.TargetAxis target_axis = 5;

Returns
Type Description
Threshold.TargetAxis

The targetAxis.

getTargetAxisValue()

public int getTargetAxisValue()

The target axis to use for plotting the threshold. Target axis is not allowed in a Scorecard.

.google.monitoring.dashboard.v1.Threshold.TargetAxis target_axis = 5;

Returns
Type Description
int

The enum numeric value on the wire for targetAxis.

getValue()

public double getValue()

The value of the threshold. The value should be defined in the native scale of the metric.

double value = 2;

Returns
Type Description
double

The value.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Threshold other)

public Threshold.Builder mergeFrom(Threshold other)
Parameter
Name Description
other Threshold
Returns
Type Description
Threshold.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Threshold.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Threshold.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Threshold.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Threshold.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Threshold.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Threshold.Builder
Overrides

setColor(Threshold.Color value)

public Threshold.Builder setColor(Threshold.Color value)

The state color for this threshold. Color is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Color color = 3;

Parameter
Name Description
value Threshold.Color

The color to set.

Returns
Type Description
Threshold.Builder

This builder for chaining.

setColorValue(int value)

public Threshold.Builder setColorValue(int value)

The state color for this threshold. Color is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Color color = 3;

Parameter
Name Description
value int

The enum numeric value on the wire for color to set.

Returns
Type Description
Threshold.Builder

This builder for chaining.

setDirection(Threshold.Direction value)

public Threshold.Builder setDirection(Threshold.Direction value)

The direction for the current threshold. Direction is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Direction direction = 4;

Parameter
Name Description
value Threshold.Direction

The direction to set.

Returns
Type Description
Threshold.Builder

This builder for chaining.

setDirectionValue(int value)

public Threshold.Builder setDirectionValue(int value)

The direction for the current threshold. Direction is not allowed in a XyChart.

.google.monitoring.dashboard.v1.Threshold.Direction direction = 4;

Parameter
Name Description
value int

The enum numeric value on the wire for direction to set.

Returns
Type Description
Threshold.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Threshold.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Threshold.Builder
Overrides

setLabel(String value)

public Threshold.Builder setLabel(String value)

A label for the threshold.

string label = 1;

Parameter
Name Description
value String

The label to set.

Returns
Type Description
Threshold.Builder

This builder for chaining.

setLabelBytes(ByteString value)

public Threshold.Builder setLabelBytes(ByteString value)

A label for the threshold.

string label = 1;

Parameter
Name Description
value ByteString

The bytes for label to set.

Returns
Type Description
Threshold.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Threshold.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Threshold.Builder
Overrides

setTargetAxis(Threshold.TargetAxis value)

public Threshold.Builder setTargetAxis(Threshold.TargetAxis value)

The target axis to use for plotting the threshold. Target axis is not allowed in a Scorecard.

.google.monitoring.dashboard.v1.Threshold.TargetAxis target_axis = 5;

Parameter
Name Description
value Threshold.TargetAxis

The targetAxis to set.

Returns
Type Description
Threshold.Builder

This builder for chaining.

setTargetAxisValue(int value)

public Threshold.Builder setTargetAxisValue(int value)

The target axis to use for plotting the threshold. Target axis is not allowed in a Scorecard.

.google.monitoring.dashboard.v1.Threshold.TargetAxis target_axis = 5;

Parameter
Name Description
value int

The enum numeric value on the wire for targetAxis to set.

Returns
Type Description
Threshold.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Threshold.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Threshold.Builder
Overrides

setValue(double value)

public Threshold.Builder setValue(double value)

The value of the threshold. The value should be defined in the native scale of the metric.

double value = 2;

Parameter
Name Description
value double

The value to set.

Returns
Type Description
Threshold.Builder

This builder for chaining.