public static final class MetricRule.Builder extends GeneratedMessageV3.Builder<MetricRule.Builder> implements MetricRuleOrBuilder
Bind 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
Modifier and Type | Method and Description |
---|---|
MetricRule.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
MetricRule |
build() |
MetricRule |
buildPartial() |
MetricRule.Builder |
clear() |
MetricRule.Builder |
clearField(Descriptors.FieldDescriptor field) |
MetricRule.Builder |
clearMetricCosts() |
MetricRule.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
MetricRule.Builder |
clearSelector()
Selects the methods to which this rule applies.
|
MetricRule.Builder |
clone() |
boolean |
containsMetricCosts(java.lang.String key)
Metrics to update when the selected methods are called, and the associated
cost applied to each metric.
|
MetricRule |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
java.util.Map<java.lang.String,java.lang.Long> |
getMetricCosts()
Deprecated.
|
int |
getMetricCostsCount()
Metrics to update when the selected methods are called, and the associated
cost applied to each metric.
|
java.util.Map<java.lang.String,java.lang.Long> |
getMetricCostsMap()
Metrics to update when the selected methods are called, and the associated
cost applied to each metric.
|
long |
getMetricCostsOrDefault(java.lang.String key,
long defaultValue)
Metrics to update when the selected methods are called, and the associated
cost applied to each metric.
|
long |
getMetricCostsOrThrow(java.lang.String key)
Metrics to update when the selected methods are called, and the associated
cost applied to each metric.
|
java.util.Map<java.lang.String,java.lang.Long> |
getMutableMetricCosts()
Deprecated.
|
java.lang.String |
getSelector()
Selects the methods to which this rule applies.
|
ByteString |
getSelectorBytes()
Selects the methods to which this rule applies.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected MapField |
internalGetMapField(int number) |
protected MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
MetricRule.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
MetricRule.Builder |
mergeFrom(Message other) |
MetricRule.Builder |
mergeFrom(MetricRule other) |
MetricRule.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
MetricRule.Builder |
putAllMetricCosts(java.util.Map<java.lang.String,java.lang.Long> values)
Metrics to update when the selected methods are called, and the associated
cost applied to each metric.
|
MetricRule.Builder |
putMetricCosts(java.lang.String key,
long value)
Metrics to update when the selected methods are called, and the associated
cost applied to each metric.
|
MetricRule.Builder |
removeMetricCosts(java.lang.String key)
Metrics to update when the selected methods are called, and the associated
cost applied to each metric.
|
MetricRule.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
MetricRule.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
MetricRule.Builder |
setSelector(java.lang.String value)
Selects the methods to which this rule applies.
|
MetricRule.Builder |
setSelectorBytes(ByteString value)
Selects the methods to which this rule applies.
|
MetricRule.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField
in class GeneratedMessageV3.Builder<MetricRule.Builder>
protected MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class GeneratedMessageV3.Builder<MetricRule.Builder>
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public MetricRule build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public MetricRule buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public MetricRule.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<MetricRule.Builder>
public MetricRule.Builder mergeFrom(MetricRule other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<MetricRule.Builder>
java.io.IOException
public java.lang.String getSelector()
Selects the methods to which this rule applies. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
getSelector
in interface MetricRuleOrBuilder
public ByteString getSelectorBytes()
Selects the methods to which this rule applies. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
getSelectorBytes
in interface MetricRuleOrBuilder
public MetricRule.Builder setSelector(java.lang.String value)
Selects the methods to which this rule applies. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
public MetricRule.Builder clearSelector()
Selects the methods to which this rule applies. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
public MetricRule.Builder setSelectorBytes(ByteString value)
Selects the methods to which this rule applies. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
string selector = 1;
public int getMetricCostsCount()
MetricRuleOrBuilder
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;
getMetricCostsCount
in interface MetricRuleOrBuilder
public boolean containsMetricCosts(java.lang.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;
containsMetricCosts
in interface MetricRuleOrBuilder
@Deprecated public java.util.Map<java.lang.String,java.lang.Long> getMetricCosts()
getMetricCostsMap()
instead.getMetricCosts
in interface MetricRuleOrBuilder
public java.util.Map<java.lang.String,java.lang.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;
getMetricCostsMap
in interface MetricRuleOrBuilder
public long getMetricCostsOrDefault(java.lang.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;
getMetricCostsOrDefault
in interface MetricRuleOrBuilder
public long getMetricCostsOrThrow(java.lang.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;
getMetricCostsOrThrow
in interface MetricRuleOrBuilder
public MetricRule.Builder clearMetricCosts()
public MetricRule.Builder removeMetricCosts(java.lang.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;
@Deprecated public java.util.Map<java.lang.String,java.lang.Long> getMutableMetricCosts()
public MetricRule.Builder putMetricCosts(java.lang.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;
public MetricRule.Builder putAllMetricCosts(java.util.Map<java.lang.String,java.lang.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;
public final MetricRule.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<MetricRule.Builder>
public final MetricRule.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<MetricRule.Builder>