Class PreconditionFailure.Builder (2.40.0)

public static final class PreconditionFailure.Builder extends GeneratedMessageV3.Builder<PreconditionFailure.Builder> implements PreconditionFailureOrBuilder

Describes what preconditions have failed.

For example, if an RPC failed because it required the Terms of Service to be acknowledged, it could list the terms of service violation in the PreconditionFailure message.

Protobuf type google.rpc.PreconditionFailure

Static Methods

getDescriptor()

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

Methods

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

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

Describes all precondition violations.

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

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addViolations(PreconditionFailure.Violation value)

public PreconditionFailure.Builder addViolations(PreconditionFailure.Violation value)

Describes all precondition violations.

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

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

addViolations(PreconditionFailure.Violation.Builder builderForValue)

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

Describes all precondition violations.

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

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

addViolations(int index, PreconditionFailure.Violation value)

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

Describes all precondition violations.

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

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

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

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

Describes all precondition violations.

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

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

addViolationsBuilder()

public PreconditionFailure.Violation.Builder addViolationsBuilder()

Describes all precondition violations.

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

Returns
Type Description
PreconditionFailure.Violation.Builder

addViolationsBuilder(int index)

public PreconditionFailure.Violation.Builder addViolationsBuilder(int index)

Describes all precondition violations.

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

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

build()

public PreconditionFailure build()
Returns
Type Description
PreconditionFailure

buildPartial()

public PreconditionFailure buildPartial()
Returns
Type Description
PreconditionFailure

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearViolations()

public PreconditionFailure.Builder clearViolations()

Describes all precondition violations.

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

Returns
Type Description
PreconditionFailure.Builder

clone()

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

getDefaultInstanceForType()

public PreconditionFailure getDefaultInstanceForType()
Returns
Type Description
PreconditionFailure

getDescriptorForType()

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

getViolations(int index)

public PreconditionFailure.Violation getViolations(int index)

Describes all precondition violations.

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

Parameter
Name Description
index int
Returns
Type Description
PreconditionFailure.Violation

getViolationsBuilder(int index)

public PreconditionFailure.Violation.Builder getViolationsBuilder(int index)

Describes all precondition violations.

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

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

getViolationsBuilderList()

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

Describes all precondition violations.

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

Returns
Type Description
List<Builder>

getViolationsCount()

public int getViolationsCount()

Describes all precondition violations.

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

Returns
Type Description
int

getViolationsList()

public List<PreconditionFailure.Violation> getViolationsList()

Describes all precondition violations.

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

Returns
Type Description
List<Violation>

getViolationsOrBuilder(int index)

public PreconditionFailure.ViolationOrBuilder getViolationsOrBuilder(int index)

Describes all precondition violations.

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

Parameter
Name Description
index int
Returns
Type Description
PreconditionFailure.ViolationOrBuilder

getViolationsOrBuilderList()

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

Describes all precondition violations.

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

Returns
Type Description
List<? extends com.google.rpc.PreconditionFailure.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 PreconditionFailure.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PreconditionFailure.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(PreconditionFailure other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeViolations(int index)

public PreconditionFailure.Builder removeViolations(int index)

Describes all precondition violations.

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

Parameter
Name Description
index int
Returns
Type Description
PreconditionFailure.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setViolations(int index, PreconditionFailure.Violation value)

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

Describes all precondition violations.

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

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

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

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

Describes all precondition violations.

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

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