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, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofmergeFrompublic 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.Builderclear in interface MessageLite.Builderclear in class GeneratedMessageV3.Builder<MetricRule.Builder>public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface Message.BuildergetDescriptorForType in interface MessageOrBuildergetDescriptorForType in class GeneratedMessageV3.Builder<MetricRule.Builder>public MetricRule getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilderpublic MetricRule build()
build in interface Message.Builderbuild in interface MessageLite.Builderpublic MetricRule buildPartial()
buildPartial in interface Message.BuilderbuildPartial in interface MessageLite.Builderpublic MetricRule.Builder clone()
clone in interface Message.Builderclone in interface MessageLite.Builderclone in class GeneratedMessageV3.Builder<MetricRule.Builder>public MetricRule.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField in interface Message.BuildersetField in class GeneratedMessageV3.Builder<MetricRule.Builder>public MetricRule.Builder clearField(Descriptors.FieldDescriptor field)
clearField in interface Message.BuilderclearField in class GeneratedMessageV3.Builder<MetricRule.Builder>public MetricRule.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof in interface Message.BuilderclearOneof in class GeneratedMessageV3.Builder<MetricRule.Builder>public MetricRule.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField in interface Message.BuildersetRepeatedField in class GeneratedMessageV3.Builder<MetricRule.Builder>public MetricRule.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField in interface Message.BuilderaddRepeatedField in class GeneratedMessageV3.Builder<MetricRule.Builder>public MetricRule.Builder mergeFrom(Message other)
mergeFrom in interface Message.BuildermergeFrom in class AbstractMessage.Builder<MetricRule.Builder>public MetricRule.Builder mergeFrom(MetricRule other)
public final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3.Builder<MetricRule.Builder>public MetricRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface Message.BuildermergeFrom in interface MessageLite.BuildermergeFrom in class AbstractMessage.Builder<MetricRule.Builder>java.io.IOExceptionpublic 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 MetricRuleOrBuilderpublic 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 MetricRuleOrBuilderpublic 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()
MetricRuleOrBuilderMetrics 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 MetricRuleOrBuilderpublic 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 MetricRuleOrBuilderpublic 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 MetricRuleOrBuilderpublic 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 MetricRuleOrBuilderpublic 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 MetricRuleOrBuilderpublic 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.BuildersetUnknownFields in class GeneratedMessageV3.Builder<MetricRule.Builder>public final MetricRule.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields in interface Message.BuildermergeUnknownFields in class GeneratedMessageV3.Builder<MetricRule.Builder>