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, 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, waitpublic 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.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>public MetricRule getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic MetricRule build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic MetricRule buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic MetricRule.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone 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.BuildersetField 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.BuilderclearField 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.BuilderclearOneof 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.BuildersetRepeatedField 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.BuilderaddRepeatedField 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.BuildermergeFrom 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.MessageLiteOrBuilderisInitialized 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.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.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 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 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(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()
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(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields 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.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MetricRule.Builder>