Class MetricValue

  • All Implemented Interfaces:
    MetricValueOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class MetricValue
    extends com.google.protobuf.GeneratedMessageV3
    implements MetricValueOrBuilder
     Represents a single metric value.
     
    Protobuf type google.api.servicecontrol.v1.MetricValue
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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
      • 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
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static MetricValue parseFrom​(ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MetricValue parseFrom​(ByteBuffer data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MetricValue parseFrom​(com.google.protobuf.ByteString data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MetricValue parseFrom​(com.google.protobuf.ByteString data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MetricValue parseFrom​(byte[] data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MetricValue parseFrom​(byte[] data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static MetricValue parseFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

        protected MetricValue.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static MetricValue getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<MetricValue> parser()
      • getParserForType

        public com.google.protobuf.Parser<MetricValue> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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