public static final class MetricRule.Builder extends com.google.protobuf.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(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
MetricRule |
build() |
MetricRule |
buildPartial() |
MetricRule.Builder |
clear() |
MetricRule.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
MetricRule.Builder |
clearMetricCosts() |
MetricRule.Builder |
clearOneof(com.google.protobuf.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 com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.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.
|
com.google.protobuf.ByteString |
getSelectorBytes()
Selects the methods to which this rule applies.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
protected com.google.protobuf.MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
MetricRule.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
MetricRule.Builder |
mergeFrom(com.google.protobuf.Message other) |
MetricRule.Builder |
mergeFrom(MetricRule other) |
MetricRule.Builder |
mergeUnknownFields(com.google.protobuf.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(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
MetricRule.Builder |
setRepeatedField(com.google.protobuf.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(com.google.protobuf.ByteString value)
Selects the methods to which this rule applies.
|
MetricRule.Builder |
setUnknownFields(com.google.protobuf.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
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder clear()
clear
in interface com.google.protobuf.Message.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public MetricRule build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public MetricRule buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public MetricRule.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface com.google.protobuf.Message.Builder
setField
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField
in interface com.google.protobuf.Message.Builder
clearField
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof
in interface com.google.protobuf.Message.Builder
clearOneof
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface com.google.protobuf.Message.Builder
setRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface com.google.protobuf.Message.Builder
addRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<MetricRule.Builder>
public MetricRule.Builder mergeFrom(MetricRule other)
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public MetricRule.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.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 com.google.protobuf.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(com.google.protobuf.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(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields
in interface com.google.protobuf.Message.Builder
setUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>
public final MetricRule.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields
in interface com.google.protobuf.Message.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>