Class Threshold.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Threshold.Builder>
com.google.monitoring.dashboard.v1.Threshold.Builder
All Implemented Interfaces:
ThresholdOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Threshold

public static final class Threshold.Builder extends com.google.protobuf.GeneratedMessage.Builder<Threshold.Builder> implements ThresholdOrBuilder
 Defines a threshold for categorizing time series values.
 
Protobuf type google.monitoring.dashboard.v1.Threshold
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Threshold.Builder>
    • clear

      public Threshold.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Threshold.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Threshold.Builder>
    • getDefaultInstanceForType

      public Threshold getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Threshold build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Threshold buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Threshold.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Threshold.Builder>
    • mergeFrom

      public Threshold.Builder mergeFrom(Threshold other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Threshold.Builder>
    • mergeFrom

      public Threshold.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Threshold.Builder>
      Throws:
      IOException
    • getLabel

      public String getLabel()
       A label for the threshold.
       
      string label = 1;
      Specified by:
      getLabel in interface ThresholdOrBuilder
      Returns:
      The label.
    • getLabelBytes

      public com.google.protobuf.ByteString getLabelBytes()
       A label for the threshold.
       
      string label = 1;
      Specified by:
      getLabelBytes in interface ThresholdOrBuilder
      Returns:
      The bytes for label.
    • setLabel

      public Threshold.Builder setLabel(String value)
       A label for the threshold.
       
      string label = 1;
      Parameters:
      value - The label to set.
      Returns:
      This builder for chaining.
    • clearLabel

      public Threshold.Builder clearLabel()
       A label for the threshold.
       
      string label = 1;
      Returns:
      This builder for chaining.
    • setLabelBytes

      public Threshold.Builder setLabelBytes(com.google.protobuf.ByteString value)
       A label for the threshold.
       
      string label = 1;
      Parameters:
      value - The bytes for label to set.
      Returns:
      This builder for chaining.
    • getValue

      public double getValue()
       The value of the threshold. The value should be defined in the native scale
       of the metric.
       
      double value = 2;
      Specified by:
      getValue in interface ThresholdOrBuilder
      Returns:
      The value.
    • setValue

      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;
      Parameters:
      value - The value to set.
      Returns:
      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:
      This builder for chaining.
    • 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;
      Specified by:
      getColorValue in interface ThresholdOrBuilder
      Returns:
      The enum numeric value on the wire for color.
    • setColorValue

      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;
      Parameters:
      value - The enum numeric value on the wire for color to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getColor in interface ThresholdOrBuilder
      Returns:
      The color.
    • setColor

      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;
      Parameters:
      value - The color to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • 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;
      Specified by:
      getDirectionValue in interface ThresholdOrBuilder
      Returns:
      The enum numeric value on the wire for direction.
    • setDirectionValue

      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;
      Parameters:
      value - The enum numeric value on the wire for direction to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getDirection in interface ThresholdOrBuilder
      Returns:
      The direction.
    • setDirection

      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;
      Parameters:
      value - The direction to set.
      Returns:
      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:
      This builder for chaining.
    • 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;
      Specified by:
      getTargetAxisValue in interface ThresholdOrBuilder
      Returns:
      The enum numeric value on the wire for targetAxis.
    • setTargetAxisValue

      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;
      Parameters:
      value - The enum numeric value on the wire for targetAxis to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getTargetAxis in interface ThresholdOrBuilder
      Returns:
      The targetAxis.
    • setTargetAxis

      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;
      Parameters:
      value - The targetAxis to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.