Class PreconditionFailure.Builder (2.24.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.rpc.PreconditionFailure.Violation>
Returns
TypeDescription
PreconditionFailure.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PreconditionFailure.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valuePreconditionFailure.Violation
Returns
TypeDescription
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
NameDescription
builderForValuePreconditionFailure.Violation.Builder
Returns
TypeDescription
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
NameDescription
indexint
valuePreconditionFailure.Violation
Returns
TypeDescription
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
NameDescription
indexint
builderForValuePreconditionFailure.Violation.Builder
Returns
TypeDescription
PreconditionFailure.Builder

addViolationsBuilder()

public PreconditionFailure.Violation.Builder addViolationsBuilder()

Describes all precondition violations.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
PreconditionFailure.Violation.Builder

build()

public PreconditionFailure build()
Returns
TypeDescription
PreconditionFailure

buildPartial()

public PreconditionFailure buildPartial()
Returns
TypeDescription
PreconditionFailure

clear()

public PreconditionFailure.Builder clear()
Returns
TypeDescription
PreconditionFailure.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public PreconditionFailure.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
PreconditionFailure.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public PreconditionFailure.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
PreconditionFailure.Builder
Overrides

clearViolations()

public PreconditionFailure.Builder clearViolations()

Describes all precondition violations.

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

Returns
TypeDescription
PreconditionFailure.Builder

clone()

public PreconditionFailure.Builder clone()
Returns
TypeDescription
PreconditionFailure.Builder
Overrides

getDefaultInstanceForType()

public PreconditionFailure getDefaultInstanceForType()
Returns
TypeDescription
PreconditionFailure

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getViolations(int index)

public PreconditionFailure.Violation getViolations(int index)

Describes all precondition violations.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
PreconditionFailure.Violation

getViolationsBuilder(int index)

public PreconditionFailure.Violation.Builder getViolationsBuilder(int index)

Describes all precondition violations.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
PreconditionFailure.Violation.Builder

getViolationsBuilderList()

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

Describes all precondition violations.

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

Returns
TypeDescription
List<Builder>

getViolationsCount()

public int getViolationsCount()

Describes all precondition violations.

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

Returns
TypeDescription
int

getViolationsList()

public List<PreconditionFailure.Violation> getViolationsList()

Describes all precondition violations.

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

Returns
TypeDescription
List<Violation>

getViolationsOrBuilder(int index)

public PreconditionFailure.ViolationOrBuilder getViolationsOrBuilder(int index)

Describes all precondition violations.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
PreconditionFailure.ViolationOrBuilder

getViolationsOrBuilderList()

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

Describes all precondition violations.

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

Returns
TypeDescription
List<? extends com.google.rpc.PreconditionFailure.ViolationOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PreconditionFailure.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PreconditionFailure.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public PreconditionFailure.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
PreconditionFailure.Builder
Overrides

mergeFrom(PreconditionFailure other)

public PreconditionFailure.Builder mergeFrom(PreconditionFailure other)
Parameter
NameDescription
otherPreconditionFailure
Returns
TypeDescription
PreconditionFailure.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PreconditionFailure.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PreconditionFailure.Builder
Overrides

removeViolations(int index)

public PreconditionFailure.Builder removeViolations(int index)

Describes all precondition violations.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
PreconditionFailure.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public PreconditionFailure.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PreconditionFailure.Builder
Overrides

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

public PreconditionFailure.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
PreconditionFailure.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final PreconditionFailure.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
valuePreconditionFailure.Violation
Returns
TypeDescription
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
NameDescription
indexint
builderForValuePreconditionFailure.Violation.Builder
Returns
TypeDescription
PreconditionFailure.Builder