Class QuotaFailure.Builder (2.40.0)

public static final class QuotaFailure.Builder extends GeneratedMessageV3.Builder<QuotaFailure.Builder> implements QuotaFailureOrBuilder

Describes how a quota check failed.

For example if a daily limit was exceeded for the calling project, a service could respond with a QuotaFailure detail containing the project id and the description of the quota limit that was exceeded. If the calling project hasn't enabled the service in the developer console, then a service could respond with the project id and set service_disabled to true.

Also see RetryInfo and Help types for other details about handling a quota failure.

Protobuf type google.rpc.QuotaFailure

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllViolations(Iterable<? extends QuotaFailure.Violation> values)

public QuotaFailure.Builder addAllViolations(Iterable<? extends QuotaFailure.Violation> values)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameter
Name Description
values Iterable<? extends com.google.rpc.QuotaFailure.Violation>
Returns
Type Description
QuotaFailure.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public QuotaFailure.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
QuotaFailure.Builder
Overrides

addViolations(QuotaFailure.Violation value)

public QuotaFailure.Builder addViolations(QuotaFailure.Violation value)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameter
Name Description
value QuotaFailure.Violation
Returns
Type Description
QuotaFailure.Builder

addViolations(QuotaFailure.Violation.Builder builderForValue)

public QuotaFailure.Builder addViolations(QuotaFailure.Violation.Builder builderForValue)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameter
Name Description
builderForValue QuotaFailure.Violation.Builder
Returns
Type Description
QuotaFailure.Builder

addViolations(int index, QuotaFailure.Violation value)

public QuotaFailure.Builder addViolations(int index, QuotaFailure.Violation value)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameters
Name Description
index int
value QuotaFailure.Violation
Returns
Type Description
QuotaFailure.Builder

addViolations(int index, QuotaFailure.Violation.Builder builderForValue)

public QuotaFailure.Builder addViolations(int index, QuotaFailure.Violation.Builder builderForValue)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameters
Name Description
index int
builderForValue QuotaFailure.Violation.Builder
Returns
Type Description
QuotaFailure.Builder

addViolationsBuilder()

public QuotaFailure.Violation.Builder addViolationsBuilder()

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Returns
Type Description
QuotaFailure.Violation.Builder

addViolationsBuilder(int index)

public QuotaFailure.Violation.Builder addViolationsBuilder(int index)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameter
Name Description
index int
Returns
Type Description
QuotaFailure.Violation.Builder

build()

public QuotaFailure build()
Returns
Type Description
QuotaFailure

buildPartial()

public QuotaFailure buildPartial()
Returns
Type Description
QuotaFailure

clear()

public QuotaFailure.Builder clear()
Returns
Type Description
QuotaFailure.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public QuotaFailure.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
QuotaFailure.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public QuotaFailure.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
QuotaFailure.Builder
Overrides

clearViolations()

public QuotaFailure.Builder clearViolations()

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Returns
Type Description
QuotaFailure.Builder

clone()

public QuotaFailure.Builder clone()
Returns
Type Description
QuotaFailure.Builder
Overrides

getDefaultInstanceForType()

public QuotaFailure getDefaultInstanceForType()
Returns
Type Description
QuotaFailure

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getViolations(int index)

public QuotaFailure.Violation getViolations(int index)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameter
Name Description
index int
Returns
Type Description
QuotaFailure.Violation

getViolationsBuilder(int index)

public QuotaFailure.Violation.Builder getViolationsBuilder(int index)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameter
Name Description
index int
Returns
Type Description
QuotaFailure.Violation.Builder

getViolationsBuilderList()

public List<QuotaFailure.Violation.Builder> getViolationsBuilderList()

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Returns
Type Description
List<Builder>

getViolationsCount()

public int getViolationsCount()

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Returns
Type Description
int

getViolationsList()

public List<QuotaFailure.Violation> getViolationsList()

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Returns
Type Description
List<Violation>

getViolationsOrBuilder(int index)

public QuotaFailure.ViolationOrBuilder getViolationsOrBuilder(int index)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameter
Name Description
index int
Returns
Type Description
QuotaFailure.ViolationOrBuilder

getViolationsOrBuilderList()

public List<? extends QuotaFailure.ViolationOrBuilder> getViolationsOrBuilderList()

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Returns
Type Description
List<? extends com.google.rpc.QuotaFailure.ViolationOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public QuotaFailure.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
QuotaFailure.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public QuotaFailure.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
QuotaFailure.Builder
Overrides

mergeFrom(QuotaFailure other)

public QuotaFailure.Builder mergeFrom(QuotaFailure other)
Parameter
Name Description
other QuotaFailure
Returns
Type Description
QuotaFailure.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final QuotaFailure.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
QuotaFailure.Builder
Overrides

removeViolations(int index)

public QuotaFailure.Builder removeViolations(int index)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameter
Name Description
index int
Returns
Type Description
QuotaFailure.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public QuotaFailure.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
QuotaFailure.Builder
Overrides

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

public QuotaFailure.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
QuotaFailure.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final QuotaFailure.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
QuotaFailure.Builder
Overrides

setViolations(int index, QuotaFailure.Violation value)

public QuotaFailure.Builder setViolations(int index, QuotaFailure.Violation value)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameters
Name Description
index int
value QuotaFailure.Violation
Returns
Type Description
QuotaFailure.Builder

setViolations(int index, QuotaFailure.Violation.Builder builderForValue)

public QuotaFailure.Builder setViolations(int index, QuotaFailure.Violation.Builder builderForValue)

Describes all quota violations.

repeated .google.rpc.QuotaFailure.Violation violations = 1;

Parameters
Name Description
index int
builderForValue QuotaFailure.Violation.Builder
Returns
Type Description
QuotaFailure.Builder