Class Threshold.Builder (2.11.0)

Stay organized with collections Save and categorize content based on your preferences.
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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Threshold.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Threshold.Builder
Overrides

build()

public Threshold build()
Returns
TypeDescription
Threshold

buildPartial()

public Threshold buildPartial()
Returns
TypeDescription
Threshold

clear()

public Threshold.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Threshold.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Threshold.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Threshold.Builder
Overrides

clearLabel()

public Threshold.Builder clearLabel()

A label for the threshold.

string label = 1;

Returns
TypeDescription
Threshold.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Threshold.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Threshold.Builder

This builder for chaining.

clone()

public Threshold.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for color.

getDefaultInstanceForType()

public Threshold getDefaultInstanceForType()
Returns
TypeDescription
Threshold

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for direction.

getLabel()

public String getLabel()

A label for the threshold.

string label = 1;

Returns
TypeDescription
String

The label.

getLabelBytes()

public ByteString getLabelBytes()

A label for the threshold.

string label = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
double

The value.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Threshold other)

public Threshold.Builder mergeFrom(Threshold other)
Parameter
NameDescription
otherThreshold
Returns
TypeDescription
Threshold.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Threshold.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Threshold.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Threshold.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Threshold.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Threshold.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueThreshold.Color

The color to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueThreshold.Direction

The direction to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
Threshold.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Threshold.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Threshold.Builder
Overrides

setLabel(String value)

public Threshold.Builder setLabel(String value)

A label for the threshold.

string label = 1;

Parameter
NameDescription
valueString

The label to set.

Returns
TypeDescription
Threshold.Builder

This builder for chaining.

setLabelBytes(ByteString value)

public Threshold.Builder setLabelBytes(ByteString value)

A label for the threshold.

string label = 1;

Parameter
NameDescription
valueByteString

The bytes for label to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueThreshold.TargetAxis

The targetAxis to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
Threshold.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Threshold.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuedouble

The value to set.

Returns
TypeDescription
Threshold.Builder

This builder for chaining.