- 2.65.0 (latest)
- 2.64.1
- 2.63.2
- 2.62.0
- 2.61.3
- 2.60.0
- 2.59.2
- 2.58.0
- 2.57.0
- 2.56.0
- 2.54.1
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.1
- 2.49.0
- 2.48.0
- 2.46.0
- 2.45.1
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.1
- 2.38.0
- 2.37.1
- 2.36.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.1
- 2.24.0
- 2.23.1
- 2.22.1
- 2.21.1
- 2.15.0
- 2.14.3
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.6
- 2.8.4
- 2.7.4
public static final class MetricRule.Builder extends GeneratedMessage.Builder<MetricRule.Builder> implements MetricRuleOrBuilderBind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.
Protobuf type google.api.MetricRule
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > MetricRule.BuilderImplements
MetricRuleOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public MetricRule build()| Returns | |
|---|---|
| Type | Description |
MetricRule |
|
buildPartial()
public MetricRule buildPartial()| Returns | |
|---|---|
| Type | Description |
MetricRule |
|
clear()
public MetricRule.Builder clear()| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
|
clearMetricCosts()
public MetricRule.Builder clearMetricCosts()| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
|
clearSelector()
public MetricRule.Builder clearSelector()Selects the methods to which this rule applies.
Refer to selector for syntax details.
string selector = 1;
| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
This builder for chaining. |
containsMetricCosts(String key)
public boolean containsMetricCosts(String key)Metrics to update when the selected methods are called, and the associated cost applied to each metric.
The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.
map<string, int64> metric_costs = 2;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getDefaultInstanceForType()
public MetricRule getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
MetricRule |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getMetricCosts() (deprecated)
public Map<String,Long> getMetricCosts()Use #getMetricCostsMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,Long> |
|
getMetricCostsCount()
public int getMetricCostsCount()Metrics to update when the selected methods are called, and the associated cost applied to each metric.
The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.
map<string, int64> metric_costs = 2;
| Returns | |
|---|---|
| Type | Description |
int |
|
getMetricCostsMap()
public Map<String,Long> getMetricCostsMap()Metrics to update when the selected methods are called, and the associated cost applied to each metric.
The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.
map<string, int64> metric_costs = 2;
| Returns | |
|---|---|
| Type | Description |
Map<String,Long> |
|
getMetricCostsOrDefault(String key, long defaultValue)
public long getMetricCostsOrDefault(String key, long defaultValue)Metrics to update when the selected methods are called, and the associated cost applied to each metric.
The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.
map<string, int64> metric_costs = 2;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
long |
| Returns | |
|---|---|
| Type | Description |
long |
|
getMetricCostsOrThrow(String key)
public long getMetricCostsOrThrow(String key)Metrics to update when the selected methods are called, and the associated cost applied to each metric.
The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.
map<string, int64> metric_costs = 2;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
long |
|
getMutableMetricCosts() (deprecated)
public Map<String,Long> getMutableMetricCosts()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,Long> |
|
getSelector()
public String getSelector()Selects the methods to which this rule applies.
Refer to selector for syntax details.
string selector = 1;
| Returns | |
|---|---|
| Type | Description |
String |
The selector. |
getSelectorBytes()
public ByteString getSelectorBytes()Selects the methods to which this rule applies.
Refer to selector for syntax details.
string selector = 1;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for selector. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(MetricRule other)
public MetricRule.Builder mergeFrom(MetricRule other)| Parameter | |
|---|---|
| Name | Description |
other |
MetricRule |
| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public MetricRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public MetricRule.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
|
putAllMetricCosts(Map<String,Long> values)
public MetricRule.Builder putAllMetricCosts(Map<String,Long> values)Metrics to update when the selected methods are called, and the associated cost applied to each metric.
The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.
map<string, int64> metric_costs = 2;
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,Long> |
| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
|
putMetricCosts(String key, long value)
public MetricRule.Builder putMetricCosts(String key, long value)Metrics to update when the selected methods are called, and the associated cost applied to each metric.
The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.
map<string, int64> metric_costs = 2;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
long |
| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
|
removeMetricCosts(String key)
public MetricRule.Builder removeMetricCosts(String key)Metrics to update when the selected methods are called, and the associated cost applied to each metric.
The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.
map<string, int64> metric_costs = 2;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
|
setSelector(String value)
public MetricRule.Builder setSelector(String value)Selects the methods to which this rule applies.
Refer to selector for syntax details.
string selector = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe selector to set. |
| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
This builder for chaining. |
setSelectorBytes(ByteString value)
public MetricRule.Builder setSelectorBytes(ByteString value)Selects the methods to which this rule applies.
Refer to selector for syntax details.
string selector = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for selector to set. |
| Returns | |
|---|---|
| Type | Description |
MetricRule.Builder |
This builder for chaining. |