Class MetricValue.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<MetricValue.Builder>
com.google.api.servicecontrol.v1.MetricValue.Builder
All Implemented Interfaces:
MetricValueOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
MetricValue

public static final class MetricValue.Builder extends com.google.protobuf.GeneratedMessage.Builder<MetricValue.Builder> implements MetricValueOrBuilder
 Represents a single metric value.
 
Protobuf type google.api.servicecontrol.v1.MetricValue
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<MetricValue.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<MetricValue.Builder>
    • internalGetFieldAccessorTable

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

      public MetricValue.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<MetricValue.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<MetricValue.Builder>
    • getDefaultInstanceForType

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

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

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

      public MetricValue.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<MetricValue.Builder>
    • mergeFrom

      public MetricValue.Builder mergeFrom(MetricValue other)
    • isInitialized

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

      public MetricValue.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<MetricValue.Builder>
      Throws:
      IOException
    • getValueCase

      public MetricValue.ValueCase getValueCase()
      Specified by:
      getValueCase in interface MetricValueOrBuilder
    • clearValue

      public MetricValue.Builder clearValue()
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: MetricValueOrBuilder
       The labels describing the metric value.
       See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
       the overriding relationship.
       Note that this map must not contain monitored resource labels.
       
      map<string, string> labels = 1;
      Specified by:
      getLabelsCount in interface MetricValueOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       The labels describing the metric value.
       See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
       the overriding relationship.
       Note that this map must not contain monitored resource labels.
       
      map<string, string> labels = 1;
      Specified by:
      containsLabels in interface MetricValueOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface MetricValueOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       The labels describing the metric value.
       See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
       the overriding relationship.
       Note that this map must not contain monitored resource labels.
       
      map<string, string> labels = 1;
      Specified by:
      getLabelsMap in interface MetricValueOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       The labels describing the metric value.
       See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
       the overriding relationship.
       Note that this map must not contain monitored resource labels.
       
      map<string, string> labels = 1;
      Specified by:
      getLabelsOrDefault in interface MetricValueOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       The labels describing the metric value.
       See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
       the overriding relationship.
       Note that this map must not contain monitored resource labels.
       
      map<string, string> labels = 1;
      Specified by:
      getLabelsOrThrow in interface MetricValueOrBuilder
    • clearLabels

      public MetricValue.Builder clearLabels()
    • removeLabels

      public MetricValue.Builder removeLabels(String key)
       The labels describing the metric value.
       See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
       the overriding relationship.
       Note that this map must not contain monitored resource labels.
       
      map<string, string> labels = 1;
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public MetricValue.Builder putLabels(String key, String value)
       The labels describing the metric value.
       See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
       the overriding relationship.
       Note that this map must not contain monitored resource labels.
       
      map<string, string> labels = 1;
    • putAllLabels

      public MetricValue.Builder putAllLabels(Map<String,String> values)
       The labels describing the metric value.
       See comments on [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] for
       the overriding relationship.
       Note that this map must not contain monitored resource labels.
       
      map<string, string> labels = 1;
    • hasStartTime

      public boolean hasStartTime()
       The start of the time period over which this metric value's measurement
       applies. The time period has different semantics for different metric
       types (cumulative, delta, and gauge). See the metric definition
       documentation in the service configuration for details. If not specified,
       [google.api.servicecontrol.v1.Operation.start_time][google.api.servicecontrol.v1.Operation.start_time] will be used.
       
      .google.protobuf.Timestamp start_time = 2;
      Specified by:
      hasStartTime in interface MetricValueOrBuilder
      Returns:
      Whether the startTime field is set.
    • getStartTime

      public com.google.protobuf.Timestamp getStartTime()
       The start of the time period over which this metric value's measurement
       applies. The time period has different semantics for different metric
       types (cumulative, delta, and gauge). See the metric definition
       documentation in the service configuration for details. If not specified,
       [google.api.servicecontrol.v1.Operation.start_time][google.api.servicecontrol.v1.Operation.start_time] will be used.
       
      .google.protobuf.Timestamp start_time = 2;
      Specified by:
      getStartTime in interface MetricValueOrBuilder
      Returns:
      The startTime.
    • setStartTime

      public MetricValue.Builder setStartTime(com.google.protobuf.Timestamp value)
       The start of the time period over which this metric value's measurement
       applies. The time period has different semantics for different metric
       types (cumulative, delta, and gauge). See the metric definition
       documentation in the service configuration for details. If not specified,
       [google.api.servicecontrol.v1.Operation.start_time][google.api.servicecontrol.v1.Operation.start_time] will be used.
       
      .google.protobuf.Timestamp start_time = 2;
    • setStartTime

      public MetricValue.Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
       The start of the time period over which this metric value's measurement
       applies. The time period has different semantics for different metric
       types (cumulative, delta, and gauge). See the metric definition
       documentation in the service configuration for details. If not specified,
       [google.api.servicecontrol.v1.Operation.start_time][google.api.servicecontrol.v1.Operation.start_time] will be used.
       
      .google.protobuf.Timestamp start_time = 2;
    • mergeStartTime

      public MetricValue.Builder mergeStartTime(com.google.protobuf.Timestamp value)
       The start of the time period over which this metric value's measurement
       applies. The time period has different semantics for different metric
       types (cumulative, delta, and gauge). See the metric definition
       documentation in the service configuration for details. If not specified,
       [google.api.servicecontrol.v1.Operation.start_time][google.api.servicecontrol.v1.Operation.start_time] will be used.
       
      .google.protobuf.Timestamp start_time = 2;
    • clearStartTime

      public MetricValue.Builder clearStartTime()
       The start of the time period over which this metric value's measurement
       applies. The time period has different semantics for different metric
       types (cumulative, delta, and gauge). See the metric definition
       documentation in the service configuration for details. If not specified,
       [google.api.servicecontrol.v1.Operation.start_time][google.api.servicecontrol.v1.Operation.start_time] will be used.
       
      .google.protobuf.Timestamp start_time = 2;
    • getStartTimeBuilder

      public com.google.protobuf.Timestamp.Builder getStartTimeBuilder()
       The start of the time period over which this metric value's measurement
       applies. The time period has different semantics for different metric
       types (cumulative, delta, and gauge). See the metric definition
       documentation in the service configuration for details. If not specified,
       [google.api.servicecontrol.v1.Operation.start_time][google.api.servicecontrol.v1.Operation.start_time] will be used.
       
      .google.protobuf.Timestamp start_time = 2;
    • getStartTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder()
       The start of the time period over which this metric value's measurement
       applies. The time period has different semantics for different metric
       types (cumulative, delta, and gauge). See the metric definition
       documentation in the service configuration for details. If not specified,
       [google.api.servicecontrol.v1.Operation.start_time][google.api.servicecontrol.v1.Operation.start_time] will be used.
       
      .google.protobuf.Timestamp start_time = 2;
      Specified by:
      getStartTimeOrBuilder in interface MetricValueOrBuilder
    • hasEndTime

      public boolean hasEndTime()
       The end of the time period over which this metric value's measurement
       applies.  If not specified,
       [google.api.servicecontrol.v1.Operation.end_time][google.api.servicecontrol.v1.Operation.end_time] will be used.
       
      .google.protobuf.Timestamp end_time = 3;
      Specified by:
      hasEndTime in interface MetricValueOrBuilder
      Returns:
      Whether the endTime field is set.
    • getEndTime

      public com.google.protobuf.Timestamp getEndTime()
       The end of the time period over which this metric value's measurement
       applies.  If not specified,
       [google.api.servicecontrol.v1.Operation.end_time][google.api.servicecontrol.v1.Operation.end_time] will be used.
       
      .google.protobuf.Timestamp end_time = 3;
      Specified by:
      getEndTime in interface MetricValueOrBuilder
      Returns:
      The endTime.
    • setEndTime

      public MetricValue.Builder setEndTime(com.google.protobuf.Timestamp value)
       The end of the time period over which this metric value's measurement
       applies.  If not specified,
       [google.api.servicecontrol.v1.Operation.end_time][google.api.servicecontrol.v1.Operation.end_time] will be used.
       
      .google.protobuf.Timestamp end_time = 3;
    • setEndTime

      public MetricValue.Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
       The end of the time period over which this metric value's measurement
       applies.  If not specified,
       [google.api.servicecontrol.v1.Operation.end_time][google.api.servicecontrol.v1.Operation.end_time] will be used.
       
      .google.protobuf.Timestamp end_time = 3;
    • mergeEndTime

      public MetricValue.Builder mergeEndTime(com.google.protobuf.Timestamp value)
       The end of the time period over which this metric value's measurement
       applies.  If not specified,
       [google.api.servicecontrol.v1.Operation.end_time][google.api.servicecontrol.v1.Operation.end_time] will be used.
       
      .google.protobuf.Timestamp end_time = 3;
    • clearEndTime

      public MetricValue.Builder clearEndTime()
       The end of the time period over which this metric value's measurement
       applies.  If not specified,
       [google.api.servicecontrol.v1.Operation.end_time][google.api.servicecontrol.v1.Operation.end_time] will be used.
       
      .google.protobuf.Timestamp end_time = 3;
    • getEndTimeBuilder

      public com.google.protobuf.Timestamp.Builder getEndTimeBuilder()
       The end of the time period over which this metric value's measurement
       applies.  If not specified,
       [google.api.servicecontrol.v1.Operation.end_time][google.api.servicecontrol.v1.Operation.end_time] will be used.
       
      .google.protobuf.Timestamp end_time = 3;
    • getEndTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
       The end of the time period over which this metric value's measurement
       applies.  If not specified,
       [google.api.servicecontrol.v1.Operation.end_time][google.api.servicecontrol.v1.Operation.end_time] will be used.
       
      .google.protobuf.Timestamp end_time = 3;
      Specified by:
      getEndTimeOrBuilder in interface MetricValueOrBuilder
    • hasBoolValue

      public boolean hasBoolValue()
       A boolean value.
       
      bool bool_value = 4;
      Specified by:
      hasBoolValue in interface MetricValueOrBuilder
      Returns:
      Whether the boolValue field is set.
    • getBoolValue

      public boolean getBoolValue()
       A boolean value.
       
      bool bool_value = 4;
      Specified by:
      getBoolValue in interface MetricValueOrBuilder
      Returns:
      The boolValue.
    • setBoolValue

      public MetricValue.Builder setBoolValue(boolean value)
       A boolean value.
       
      bool bool_value = 4;
      Parameters:
      value - The boolValue to set.
      Returns:
      This builder for chaining.
    • clearBoolValue

      public MetricValue.Builder clearBoolValue()
       A boolean value.
       
      bool bool_value = 4;
      Returns:
      This builder for chaining.
    • hasInt64Value

      public boolean hasInt64Value()
       A signed 64-bit integer value.
       
      int64 int64_value = 5;
      Specified by:
      hasInt64Value in interface MetricValueOrBuilder
      Returns:
      Whether the int64Value field is set.
    • getInt64Value

      public long getInt64Value()
       A signed 64-bit integer value.
       
      int64 int64_value = 5;
      Specified by:
      getInt64Value in interface MetricValueOrBuilder
      Returns:
      The int64Value.
    • setInt64Value

      public MetricValue.Builder setInt64Value(long value)
       A signed 64-bit integer value.
       
      int64 int64_value = 5;
      Parameters:
      value - The int64Value to set.
      Returns:
      This builder for chaining.
    • clearInt64Value

      public MetricValue.Builder clearInt64Value()
       A signed 64-bit integer value.
       
      int64 int64_value = 5;
      Returns:
      This builder for chaining.
    • hasDoubleValue

      public boolean hasDoubleValue()
       A double precision floating point value.
       
      double double_value = 6;
      Specified by:
      hasDoubleValue in interface MetricValueOrBuilder
      Returns:
      Whether the doubleValue field is set.
    • getDoubleValue

      public double getDoubleValue()
       A double precision floating point value.
       
      double double_value = 6;
      Specified by:
      getDoubleValue in interface MetricValueOrBuilder
      Returns:
      The doubleValue.
    • setDoubleValue

      public MetricValue.Builder setDoubleValue(double value)
       A double precision floating point value.
       
      double double_value = 6;
      Parameters:
      value - The doubleValue to set.
      Returns:
      This builder for chaining.
    • clearDoubleValue

      public MetricValue.Builder clearDoubleValue()
       A double precision floating point value.
       
      double double_value = 6;
      Returns:
      This builder for chaining.
    • hasStringValue

      public boolean hasStringValue()
       A text string value.
       
      string string_value = 7;
      Specified by:
      hasStringValue in interface MetricValueOrBuilder
      Returns:
      Whether the stringValue field is set.
    • getStringValue

      public String getStringValue()
       A text string value.
       
      string string_value = 7;
      Specified by:
      getStringValue in interface MetricValueOrBuilder
      Returns:
      The stringValue.
    • getStringValueBytes

      public com.google.protobuf.ByteString getStringValueBytes()
       A text string value.
       
      string string_value = 7;
      Specified by:
      getStringValueBytes in interface MetricValueOrBuilder
      Returns:
      The bytes for stringValue.
    • setStringValue

      public MetricValue.Builder setStringValue(String value)
       A text string value.
       
      string string_value = 7;
      Parameters:
      value - The stringValue to set.
      Returns:
      This builder for chaining.
    • clearStringValue

      public MetricValue.Builder clearStringValue()
       A text string value.
       
      string string_value = 7;
      Returns:
      This builder for chaining.
    • setStringValueBytes

      public MetricValue.Builder setStringValueBytes(com.google.protobuf.ByteString value)
       A text string value.
       
      string string_value = 7;
      Parameters:
      value - The bytes for stringValue to set.
      Returns:
      This builder for chaining.
    • hasDistributionValue

      public boolean hasDistributionValue()
       A distribution value.
       
      .google.api.servicecontrol.v1.Distribution distribution_value = 8;
      Specified by:
      hasDistributionValue in interface MetricValueOrBuilder
      Returns:
      Whether the distributionValue field is set.
    • getDistributionValue

      public Distribution getDistributionValue()
       A distribution value.
       
      .google.api.servicecontrol.v1.Distribution distribution_value = 8;
      Specified by:
      getDistributionValue in interface MetricValueOrBuilder
      Returns:
      The distributionValue.
    • setDistributionValue

      public MetricValue.Builder setDistributionValue(Distribution value)
       A distribution value.
       
      .google.api.servicecontrol.v1.Distribution distribution_value = 8;
    • setDistributionValue

      public MetricValue.Builder setDistributionValue(Distribution.Builder builderForValue)
       A distribution value.
       
      .google.api.servicecontrol.v1.Distribution distribution_value = 8;
    • mergeDistributionValue

      public MetricValue.Builder mergeDistributionValue(Distribution value)
       A distribution value.
       
      .google.api.servicecontrol.v1.Distribution distribution_value = 8;
    • clearDistributionValue

      public MetricValue.Builder clearDistributionValue()
       A distribution value.
       
      .google.api.servicecontrol.v1.Distribution distribution_value = 8;
    • getDistributionValueBuilder

      public Distribution.Builder getDistributionValueBuilder()
       A distribution value.
       
      .google.api.servicecontrol.v1.Distribution distribution_value = 8;
    • getDistributionValueOrBuilder

      public DistributionOrBuilder getDistributionValueOrBuilder()
       A distribution value.
       
      .google.api.servicecontrol.v1.Distribution distribution_value = 8;
      Specified by:
      getDistributionValueOrBuilder in interface MetricValueOrBuilder