Class MetricValue.Builder (1.53.0)

public static final class MetricValue.Builder extends GeneratedMessageV3.Builder<MetricValue.Builder> implements MetricValueOrBuilder

Represents a single metric value.

Protobuf type google.api.servicecontrol.v1.MetricValue

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public MetricValue build()
Returns
Type Description
MetricValue

buildPartial()

public MetricValue buildPartial()
Returns
Type Description
MetricValue

clear()

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

clearBoolValue()

public MetricValue.Builder clearBoolValue()

A boolean value.

bool bool_value = 4;

Returns
Type Description
MetricValue.Builder

This builder for chaining.

clearDistributionValue()

public MetricValue.Builder clearDistributionValue()

A distribution value.

.google.api.servicecontrol.v1.Distribution distribution_value = 8;

Returns
Type Description
MetricValue.Builder

clearDoubleValue()

public MetricValue.Builder clearDoubleValue()

A double precision floating point value.

double double_value = 6;

Returns
Type Description
MetricValue.Builder

This builder for chaining.

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 will be used.

.google.protobuf.Timestamp end_time = 3;

Returns
Type Description
MetricValue.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearInt64Value()

public MetricValue.Builder clearInt64Value()

A signed 64-bit integer value.

int64 int64_value = 5;

Returns
Type Description
MetricValue.Builder

This builder for chaining.

clearLabels()

public MetricValue.Builder clearLabels()
Returns
Type Description
MetricValue.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

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 will be used.

.google.protobuf.Timestamp start_time = 2;

Returns
Type Description
MetricValue.Builder

clearStringValue()

public MetricValue.Builder clearStringValue()

A text string value.

string string_value = 7;

Returns
Type Description
MetricValue.Builder

This builder for chaining.

clearValue()

public MetricValue.Builder clearValue()
Returns
Type Description
MetricValue.Builder

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

The labels describing the metric value. See comments on 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;

Parameter
Name Description
key String
Returns
Type Description
boolean

getBoolValue()

public boolean getBoolValue()

A boolean value.

bool bool_value = 4;

Returns
Type Description
boolean

The boolValue.

getDefaultInstanceForType()

public MetricValue getDefaultInstanceForType()
Returns
Type Description
MetricValue

getDescriptorForType()

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

getDistributionValue()

public Distribution getDistributionValue()

A distribution value.

.google.api.servicecontrol.v1.Distribution distribution_value = 8;

Returns
Type Description
Distribution

The distributionValue.

getDistributionValueBuilder()

public Distribution.Builder getDistributionValueBuilder()

A distribution value.

.google.api.servicecontrol.v1.Distribution distribution_value = 8;

Returns
Type Description
Distribution.Builder

getDistributionValueOrBuilder()

public DistributionOrBuilder getDistributionValueOrBuilder()

A distribution value.

.google.api.servicecontrol.v1.Distribution distribution_value = 8;

Returns
Type Description
DistributionOrBuilder

getDoubleValue()

public double getDoubleValue()

A double precision floating point value.

double double_value = 6;

Returns
Type Description
double

The doubleValue.

getEndTime()

public 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 will be used.

.google.protobuf.Timestamp end_time = 3;

Returns
Type Description
Timestamp

The endTime.

getEndTimeBuilder()

public 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 will be used.

.google.protobuf.Timestamp end_time = 3;

Returns
Type Description
Builder

getEndTimeOrBuilder()

public 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 will be used.

.google.protobuf.Timestamp end_time = 3;

Returns
Type Description
TimestampOrBuilder

getInt64Value()

public long getInt64Value()

A signed 64-bit integer value.

int64 int64_value = 5;

Returns
Type Description
long

The int64Value.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

The labels describing the metric value. See comments on 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;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

The labels describing the metric value. See comments on 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;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

The labels describing the metric value. See comments on 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;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

The labels describing the metric value. See comments on 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;

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getStartTime()

public 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 will be used.

.google.protobuf.Timestamp start_time = 2;

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public 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 will be used.

.google.protobuf.Timestamp start_time = 2;

Returns
Type Description
Builder

getStartTimeOrBuilder()

public 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 will be used.

.google.protobuf.Timestamp start_time = 2;

Returns
Type Description
TimestampOrBuilder

getStringValue()

public String getStringValue()

A text string value.

string string_value = 7;

Returns
Type Description
String

The stringValue.

getStringValueBytes()

public ByteString getStringValueBytes()

A text string value.

string string_value = 7;

Returns
Type Description
ByteString

The bytes for stringValue.

getValueCase()

public MetricValue.ValueCase getValueCase()
Returns
Type Description
MetricValue.ValueCase

hasBoolValue()

public boolean hasBoolValue()

A boolean value.

bool bool_value = 4;

Returns
Type Description
boolean

Whether the boolValue field is set.

hasDistributionValue()

public boolean hasDistributionValue()

A distribution value.

.google.api.servicecontrol.v1.Distribution distribution_value = 8;

Returns
Type Description
boolean

Whether the distributionValue field is set.

hasDoubleValue()

public boolean hasDoubleValue()

A double precision floating point value.

double double_value = 6;

Returns
Type Description
boolean

Whether the doubleValue field is set.

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 will be used.

.google.protobuf.Timestamp end_time = 3;

Returns
Type Description
boolean

Whether the endTime field is set.

hasInt64Value()

public boolean hasInt64Value()

A signed 64-bit integer value.

int64 int64_value = 5;

Returns
Type Description
boolean

Whether the int64Value field is set.

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 will be used.

.google.protobuf.Timestamp start_time = 2;

Returns
Type Description
boolean

Whether the startTime field is set.

hasStringValue()

public boolean hasStringValue()

A text string value.

string string_value = 7;

Returns
Type Description
boolean

Whether the stringValue field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDistributionValue(Distribution value)

public MetricValue.Builder mergeDistributionValue(Distribution value)

A distribution value.

.google.api.servicecontrol.v1.Distribution distribution_value = 8;

Parameter
Name Description
value Distribution
Returns
Type Description
MetricValue.Builder

mergeEndTime(Timestamp value)

public MetricValue.Builder mergeEndTime(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 will be used.

.google.protobuf.Timestamp end_time = 3;

Parameter
Name Description
value Timestamp
Returns
Type Description
MetricValue.Builder

mergeFrom(MetricValue other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeStartTime(Timestamp value)

public MetricValue.Builder mergeStartTime(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 will be used.

.google.protobuf.Timestamp start_time = 2;

Parameter
Name Description
value Timestamp
Returns
Type Description
MetricValue.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

public MetricValue.Builder putAllLabels(Map<String,String> values)

The labels describing the metric value. See comments on 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;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
MetricValue.Builder

putLabels(String key, String value)

public MetricValue.Builder putLabels(String key, String value)

The labels describing the metric value. See comments on 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;

Parameters
Name Description
key String
value String
Returns
Type Description
MetricValue.Builder

removeLabels(String key)

public MetricValue.Builder removeLabels(String key)

The labels describing the metric value. See comments on 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;

Parameter
Name Description
key String
Returns
Type Description
MetricValue.Builder

setBoolValue(boolean value)

public MetricValue.Builder setBoolValue(boolean value)

A boolean value.

bool bool_value = 4;

Parameter
Name Description
value boolean

The boolValue to set.

Returns
Type Description
MetricValue.Builder

This builder for chaining.

setDistributionValue(Distribution value)

public MetricValue.Builder setDistributionValue(Distribution value)

A distribution value.

.google.api.servicecontrol.v1.Distribution distribution_value = 8;

Parameter
Name Description
value Distribution
Returns
Type Description
MetricValue.Builder

setDistributionValue(Distribution.Builder builderForValue)

public MetricValue.Builder setDistributionValue(Distribution.Builder builderForValue)

A distribution value.

.google.api.servicecontrol.v1.Distribution distribution_value = 8;

Parameter
Name Description
builderForValue Distribution.Builder
Returns
Type Description
MetricValue.Builder

setDoubleValue(double value)

public MetricValue.Builder setDoubleValue(double value)

A double precision floating point value.

double double_value = 6;

Parameter
Name Description
value double

The doubleValue to set.

Returns
Type Description
MetricValue.Builder

This builder for chaining.

setEndTime(Timestamp value)

public MetricValue.Builder setEndTime(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 will be used.

.google.protobuf.Timestamp end_time = 3;

Parameter
Name Description
value Timestamp
Returns
Type Description
MetricValue.Builder

setEndTime(Timestamp.Builder builderForValue)

public MetricValue.Builder setEndTime(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 will be used.

.google.protobuf.Timestamp end_time = 3;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
MetricValue.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setInt64Value(long value)

public MetricValue.Builder setInt64Value(long value)

A signed 64-bit integer value.

int64 int64_value = 5;

Parameter
Name Description
value long

The int64Value to set.

Returns
Type Description
MetricValue.Builder

This builder for chaining.

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

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

setStartTime(Timestamp value)

public MetricValue.Builder setStartTime(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 will be used.

.google.protobuf.Timestamp start_time = 2;

Parameter
Name Description
value Timestamp
Returns
Type Description
MetricValue.Builder

setStartTime(Timestamp.Builder builderForValue)

public MetricValue.Builder setStartTime(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 will be used.

.google.protobuf.Timestamp start_time = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
MetricValue.Builder

setStringValue(String value)

public MetricValue.Builder setStringValue(String value)

A text string value.

string string_value = 7;

Parameter
Name Description
value String

The stringValue to set.

Returns
Type Description
MetricValue.Builder

This builder for chaining.

setStringValueBytes(ByteString value)

public MetricValue.Builder setStringValueBytes(ByteString value)

A text string value.

string string_value = 7;

Parameter
Name Description
value ByteString

The bytes for stringValue to set.

Returns
Type Description
MetricValue.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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