Class ConsumerQuotaLimit.Builder (2.63.0)

publicstaticfinalclass ConsumerQuotaLimit.BuilderextendsGeneratedMessageV3.Builder<ConsumerQuotaLimit.Builder>implementsConsumerQuotaLimitOrBuilder

Consumer quota settings for a quota limit.

Protobuf type google.api.serviceusage.v1beta1.ConsumerQuotaLimit

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllQuotaBuckets(Iterable<? extends QuotaBucket> values)

publicConsumerQuotaLimit.BuilderaddAllQuotaBuckets(Iterable<?extendsQuotaBucket>values)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameter
Name Description
values Iterable<? extends com.google.api.serviceusage.v1beta1.QuotaBucket>
Returns
Type Description
ConsumerQuotaLimit.Builder

addAllSupportedLocations(Iterable<String> values)

publicConsumerQuotaLimit.BuilderaddAllSupportedLocations(Iterable<String>values)

List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.

repeated string supported_locations = 11;

Parameter
Name Description
values Iterable<String>

The supportedLocations to add.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

addQuotaBuckets(QuotaBucket value)

publicConsumerQuotaLimit.BuilderaddQuotaBuckets(QuotaBucketvalue)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameter
Name Description
value QuotaBucket
Returns
Type Description
ConsumerQuotaLimit.Builder

addQuotaBuckets(QuotaBucket.Builder builderForValue)

publicConsumerQuotaLimit.BuilderaddQuotaBuckets(QuotaBucket.BuilderbuilderForValue)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameter
Name Description
builderForValue QuotaBucket.Builder
Returns
Type Description
ConsumerQuotaLimit.Builder

addQuotaBuckets(int index, QuotaBucket value)

publicConsumerQuotaLimit.BuilderaddQuotaBuckets(intindex,QuotaBucketvalue)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameters
Name Description
index int
value QuotaBucket
Returns
Type Description
ConsumerQuotaLimit.Builder

addQuotaBuckets(int index, QuotaBucket.Builder builderForValue)

publicConsumerQuotaLimit.BuilderaddQuotaBuckets(intindex,QuotaBucket.BuilderbuilderForValue)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameters
Name Description
index int
builderForValue QuotaBucket.Builder
Returns
Type Description
ConsumerQuotaLimit.Builder

addQuotaBucketsBuilder()

publicQuotaBucket.BuilderaddQuotaBucketsBuilder()

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Returns
Type Description
QuotaBucket.Builder

addQuotaBucketsBuilder(int index)

publicQuotaBucket.BuilderaddQuotaBucketsBuilder(intindex)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameter
Name Description
index int
Returns
Type Description
QuotaBucket.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicConsumerQuotaLimit.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

addSupportedLocations(String value)

publicConsumerQuotaLimit.BuilderaddSupportedLocations(Stringvalue)

List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.

repeated string supported_locations = 11;

Parameter
Name Description
value String

The supportedLocations to add.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

addSupportedLocationsBytes(ByteString value)

publicConsumerQuotaLimit.BuilderaddSupportedLocationsBytes(ByteStringvalue)

List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.

repeated string supported_locations = 11;

Parameter
Name Description
value ByteString

The bytes of the supportedLocations to add.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

build()

publicConsumerQuotaLimitbuild()
Returns
Type Description
ConsumerQuotaLimit

buildPartial()

publicConsumerQuotaLimitbuildPartial()
Returns
Type Description
ConsumerQuotaLimit

clear()

publicConsumerQuotaLimit.Builderclear()
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

clearAllowsAdminOverrides()

publicConsumerQuotaLimit.BuilderclearAllowsAdminOverrides()

Whether admin overrides are allowed on this limit

bool allows_admin_overrides = 7;

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicConsumerQuotaLimit.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

clearIsPrecise()

publicConsumerQuotaLimit.BuilderclearIsPrecise()

Whether this limit is precise or imprecise.

bool is_precise = 3;

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

clearMetric()

publicConsumerQuotaLimit.BuilderclearMetric()

The name of the parent metric of this limit.

An example name would be: compute.googleapis.com/cpus

string metric = 8;

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

clearName()

publicConsumerQuotaLimit.BuilderclearName()

The resource name of the quota limit.

An example name would be: projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion

The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.

string name = 1;

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicConsumerQuotaLimit.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

clearQuotaBuckets()

publicConsumerQuotaLimit.BuilderclearQuotaBuckets()

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Returns
Type Description
ConsumerQuotaLimit.Builder

clearSupportedLocations()

publicConsumerQuotaLimit.BuilderclearSupportedLocations()

List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.

repeated string supported_locations = 11;

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

clearUnit()

publicConsumerQuotaLimit.BuilderclearUnit()

The limit unit.

An example unit would be 1/{project}/{region} Note that {project} and {region} are not placeholders in this example; the literal characters { and } occur in the string.

string unit = 2;

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

clone()

publicConsumerQuotaLimit.Builderclone()
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

getAllowsAdminOverrides()

publicbooleangetAllowsAdminOverrides()

Whether admin overrides are allowed on this limit

bool allows_admin_overrides = 7;

Returns
Type Description
boolean

The allowsAdminOverrides.

getDefaultInstanceForType()

publicConsumerQuotaLimitgetDefaultInstanceForType()
Returns
Type Description
ConsumerQuotaLimit

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getIsPrecise()

publicbooleangetIsPrecise()

Whether this limit is precise or imprecise.

bool is_precise = 3;

Returns
Type Description
boolean

The isPrecise.

getMetric()

publicStringgetMetric()

The name of the parent metric of this limit.

An example name would be: compute.googleapis.com/cpus

string metric = 8;

Returns
Type Description
String

The metric.

getMetricBytes()

publicByteStringgetMetricBytes()

The name of the parent metric of this limit.

An example name would be: compute.googleapis.com/cpus

string metric = 8;

Returns
Type Description
ByteString

The bytes for metric.

getName()

publicStringgetName()

The resource name of the quota limit.

An example name would be: projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion

The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

The resource name of the quota limit.

An example name would be: projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion

The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getQuotaBuckets(int index)

publicQuotaBucketgetQuotaBuckets(intindex)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameter
Name Description
index int
Returns
Type Description
QuotaBucket

getQuotaBucketsBuilder(int index)

publicQuotaBucket.BuildergetQuotaBucketsBuilder(intindex)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameter
Name Description
index int
Returns
Type Description
QuotaBucket.Builder

getQuotaBucketsBuilderList()

publicList<QuotaBucket.Builder>getQuotaBucketsBuilderList()

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Returns
Type Description
List<Builder>

getQuotaBucketsCount()

publicintgetQuotaBucketsCount()

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Returns
Type Description
int

getQuotaBucketsList()

publicList<QuotaBucket>getQuotaBucketsList()

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Returns
Type Description
List<QuotaBucket>

getQuotaBucketsOrBuilder(int index)

publicQuotaBucketOrBuildergetQuotaBucketsOrBuilder(intindex)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameter
Name Description
index int
Returns
Type Description
QuotaBucketOrBuilder

getQuotaBucketsOrBuilderList()

publicList<?extendsQuotaBucketOrBuilder>getQuotaBucketsOrBuilderList()

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Returns
Type Description
List<? extends com.google.api.serviceusage.v1beta1.QuotaBucketOrBuilder>

getSupportedLocations(int index)

publicStringgetSupportedLocations(intindex)

List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.

repeated string supported_locations = 11;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The supportedLocations at the given index.

getSupportedLocationsBytes(int index)

publicByteStringgetSupportedLocationsBytes(intindex)

List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.

repeated string supported_locations = 11;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the supportedLocations at the given index.

getSupportedLocationsCount()

publicintgetSupportedLocationsCount()

List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.

repeated string supported_locations = 11;

Returns
Type Description
int

The count of supportedLocations.

getSupportedLocationsList()

publicProtocolStringListgetSupportedLocationsList()

List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.

repeated string supported_locations = 11;

Returns
Type Description
ProtocolStringList

A list containing the supportedLocations.

getUnit()

publicStringgetUnit()

The limit unit.

An example unit would be 1/{project}/{region} Note that {project} and {region} are not placeholders in this example; the literal characters { and } occur in the string.

string unit = 2;

Returns
Type Description
String

The unit.

getUnitBytes()

publicByteStringgetUnitBytes()

The limit unit.

An example unit would be 1/{project}/{region} Note that {project} and {region} are not placeholders in this example; the literal characters { and } occur in the string.

string unit = 2;

Returns
Type Description
ByteString

The bytes for unit.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ConsumerQuotaLimit other)

publicConsumerQuotaLimit.BuildermergeFrom(ConsumerQuotaLimitother)
Parameter
Name Description
other ConsumerQuotaLimit
Returns
Type Description
ConsumerQuotaLimit.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicConsumerQuotaLimit.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicConsumerQuotaLimit.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalConsumerQuotaLimit.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

removeQuotaBuckets(int index)

publicConsumerQuotaLimit.BuilderremoveQuotaBuckets(intindex)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameter
Name Description
index int
Returns
Type Description
ConsumerQuotaLimit.Builder

setAllowsAdminOverrides(boolean value)

publicConsumerQuotaLimit.BuildersetAllowsAdminOverrides(booleanvalue)

Whether admin overrides are allowed on this limit

bool allows_admin_overrides = 7;

Parameter
Name Description
value boolean

The allowsAdminOverrides to set.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicConsumerQuotaLimit.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

setIsPrecise(boolean value)

publicConsumerQuotaLimit.BuildersetIsPrecise(booleanvalue)

Whether this limit is precise or imprecise.

bool is_precise = 3;

Parameter
Name Description
value boolean

The isPrecise to set.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

setMetric(String value)

publicConsumerQuotaLimit.BuildersetMetric(Stringvalue)

The name of the parent metric of this limit.

An example name would be: compute.googleapis.com/cpus

string metric = 8;

Parameter
Name Description
value String

The metric to set.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

setMetricBytes(ByteString value)

publicConsumerQuotaLimit.BuildersetMetricBytes(ByteStringvalue)

The name of the parent metric of this limit.

An example name would be: compute.googleapis.com/cpus

string metric = 8;

Parameter
Name Description
value ByteString

The bytes for metric to set.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

setName(String value)

publicConsumerQuotaLimit.BuildersetName(Stringvalue)

The resource name of the quota limit.

An example name would be: projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion

The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

setNameBytes(ByteString value)

publicConsumerQuotaLimit.BuildersetNameBytes(ByteStringvalue)

The resource name of the quota limit.

An example name would be: projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion

The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

setQuotaBuckets(int index, QuotaBucket value)

publicConsumerQuotaLimit.BuildersetQuotaBuckets(intindex,QuotaBucketvalue)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameters
Name Description
index int
value QuotaBucket
Returns
Type Description
ConsumerQuotaLimit.Builder

setQuotaBuckets(int index, QuotaBucket.Builder builderForValue)

publicConsumerQuotaLimit.BuildersetQuotaBuckets(intindex,QuotaBucket.BuilderbuilderForValue)

Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).

repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;

Parameters
Name Description
index int
builderForValue QuotaBucket.Builder
Returns
Type Description
ConsumerQuotaLimit.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicConsumerQuotaLimit.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

setSupportedLocations(int index, String value)

publicConsumerQuotaLimit.BuildersetSupportedLocations(intindex,Stringvalue)

List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.

repeated string supported_locations = 11;

Parameters
Name Description
index int

The index to set the value at.

value String

The supportedLocations to set.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

setUnit(String value)

publicConsumerQuotaLimit.BuildersetUnit(Stringvalue)

The limit unit.

An example unit would be 1/{project}/{region} Note that {project} and {region} are not placeholders in this example; the literal characters { and } occur in the string.

string unit = 2;

Parameter
Name Description
value String

The unit to set.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

setUnitBytes(ByteString value)

publicConsumerQuotaLimit.BuildersetUnitBytes(ByteStringvalue)

The limit unit.

An example unit would be 1/{project}/{region} Note that {project} and {region} are not placeholders in this example; the literal characters { and } occur in the string.

string unit = 2;

Parameter
Name Description
value ByteString

The bytes for unit to set.

Returns
Type Description
ConsumerQuotaLimit.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalConsumerQuotaLimit.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ConsumerQuotaLimit.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.