Class MetricValue.Builder (1.6.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public MetricValue build()
Returns
TypeDescription
MetricValue

buildPartial()

public MetricValue buildPartial()
Returns
TypeDescription
MetricValue

clear()

public MetricValue.Builder clear()
Returns
TypeDescription
MetricValue.Builder
Overrides

clearBoolValue()

public MetricValue.Builder clearBoolValue()

A boolean value.

bool bool_value = 4;

Returns
TypeDescription
MetricValue.Builder

This builder for chaining.

clearDistributionValue()

public MetricValue.Builder clearDistributionValue()

A distribution value.

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

Returns
TypeDescription
MetricValue.Builder

clearDoubleValue()

public MetricValue.Builder clearDoubleValue()

A double precision floating point value.

double double_value = 6;

Returns
TypeDescription
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
TypeDescription
MetricValue.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearInt64Value()

public MetricValue.Builder clearInt64Value()

A signed 64-bit integer value.

int64 int64_value = 5;

Returns
TypeDescription
MetricValue.Builder

This builder for chaining.

clearLabels()

public MetricValue.Builder clearLabels()
Returns
TypeDescription
MetricValue.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearStringValue()

public MetricValue.Builder clearStringValue()

A text string value.

string string_value = 7;

Returns
TypeDescription
MetricValue.Builder

This builder for chaining.

clearValue()

public MetricValue.Builder clearValue()
Returns
TypeDescription
MetricValue.Builder

clone()

public MetricValue.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

getBoolValue()

public boolean getBoolValue()

A boolean value.

bool bool_value = 4;

Returns
TypeDescription
boolean

The boolValue.

getDefaultInstanceForType()

public MetricValue getDefaultInstanceForType()
Returns
TypeDescription
MetricValue

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDistributionValue()

public Distribution getDistributionValue()

A distribution value.

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

Returns
TypeDescription
Distribution

The distributionValue.

getDistributionValueBuilder()

public Distribution.Builder getDistributionValueBuilder()

A distribution value.

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

Returns
TypeDescription
Distribution.Builder

getDistributionValueOrBuilder()

public DistributionOrBuilder getDistributionValueOrBuilder()

A distribution value.

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

Returns
TypeDescription
DistributionOrBuilder

getDoubleValue()

public double getDoubleValue()

A double precision floating point value.

double double_value = 6;

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

getInt64Value()

public long getInt64Value()

A signed 64-bit integer value.

int64 int64_value = 5;

Returns
TypeDescription
long

The int64Value.

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

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

getStringValue()

public String getStringValue()

A text string value.

string string_value = 7;

Returns
TypeDescription
String

The stringValue.

getStringValueBytes()

public ByteString getStringValueBytes()

A text string value.

string string_value = 7;

Returns
TypeDescription
ByteString

The bytes for stringValue.

getValueCase()

public MetricValue.ValueCase getValueCase()
Returns
TypeDescription
MetricValue.ValueCase

hasBoolValue()

public boolean hasBoolValue()

A boolean value.

bool bool_value = 4;

Returns
TypeDescription
boolean

Whether the boolValue field is set.

hasDistributionValue()

public boolean hasDistributionValue()

A distribution value.

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

Returns
TypeDescription
boolean

Whether the distributionValue field is set.

hasDoubleValue()

public boolean hasDoubleValue()

A double precision floating point value.

double double_value = 6;

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

Whether the endTime field is set.

hasInt64Value()

public boolean hasInt64Value()

A signed 64-bit integer value.

int64 int64_value = 5;

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

Whether the startTime field is set.

hasStringValue()

public boolean hasStringValue()

A text string value.

string string_value = 7;

Returns
TypeDescription
boolean

Whether the stringValue field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDistributionValue(Distribution value)

public MetricValue.Builder mergeDistributionValue(Distribution value)

A distribution value.

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

Parameter
NameDescription
valueDistribution
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
MetricValue.Builder

mergeFrom(MetricValue other)

public MetricValue.Builder mergeFrom(MetricValue other)
Parameter
NameDescription
otherMetricValue
Returns
TypeDescription
MetricValue.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public MetricValue.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
MetricValue.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MetricValue.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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
NameDescription
keyString
valueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
MetricValue.Builder

setBoolValue(boolean value)

public MetricValue.Builder setBoolValue(boolean value)

A boolean value.

bool bool_value = 4;

Parameter
NameDescription
valueboolean

The boolValue to set.

Returns
TypeDescription
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
NameDescription
valueDistribution
Returns
TypeDescription
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
NameDescription
builderForValueDistribution.Builder
Returns
TypeDescription
MetricValue.Builder

setDoubleValue(double value)

public MetricValue.Builder setDoubleValue(double value)

A double precision floating point value.

double double_value = 6;

Parameter
NameDescription
valuedouble

The doubleValue to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
MetricValue.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setInt64Value(long value)

public MetricValue.Builder setInt64Value(long value)

A signed 64-bit integer value.

int64 int64_value = 5;

Parameter
NameDescription
valuelong

The int64Value to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
MetricValue.Builder

setStringValue(String value)

public MetricValue.Builder setStringValue(String value)

A text string value.

string string_value = 7;

Parameter
NameDescription
valueString

The stringValue to set.

Returns
TypeDescription
MetricValue.Builder

This builder for chaining.

setStringValueBytes(ByteString value)

public MetricValue.Builder setStringValueBytes(ByteString value)

A text string value.

string string_value = 7;

Parameter
NameDescription
valueByteString

The bytes for stringValue to set.

Returns
TypeDescription
MetricValue.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final MetricValue.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MetricValue.Builder
Overrides