Class PreconditionFailure (2.12.0)

public final class PreconditionFailure extends GeneratedMessageV3 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 Fields

VIOLATIONS_FIELD_NUMBER

public static final int VIOLATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static PreconditionFailure getDefaultInstance()
Returns
TypeDescription
PreconditionFailure

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static PreconditionFailure.Builder newBuilder()
Returns
TypeDescription
PreconditionFailure.Builder

newBuilder(PreconditionFailure prototype)

public static PreconditionFailure.Builder newBuilder(PreconditionFailure prototype)
Parameter
NameDescription
prototypePreconditionFailure
Returns
TypeDescription
PreconditionFailure.Builder

parseDelimitedFrom(InputStream input)

public static PreconditionFailure parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PreconditionFailure parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static PreconditionFailure parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PreconditionFailure parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PreconditionFailure parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PreconditionFailure parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PreconditionFailure parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PreconditionFailure parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static PreconditionFailure parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PreconditionFailure parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static PreconditionFailure parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PreconditionFailure parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PreconditionFailure
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<PreconditionFailure> parser()
Returns
TypeDescription
Parser<PreconditionFailure>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public PreconditionFailure getDefaultInstanceForType()
Returns
TypeDescription
PreconditionFailure

getParserForType()

public Parser<PreconditionFailure> getParserForType()
Returns
TypeDescription
Parser<PreconditionFailure>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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

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>

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public PreconditionFailure.Builder newBuilderForType()
Returns
TypeDescription
PreconditionFailure.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PreconditionFailure.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
PreconditionFailure.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public PreconditionFailure.Builder toBuilder()
Returns
TypeDescription
PreconditionFailure.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException