Class PreconditionFailure (2.2.0)

public sealed class PreconditionFailure : Protobuf.IMessage<PreconditionFailure>, Protobuf.IBufferMessage

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.

Inheritance

Object > PreconditionFailure

Namespace

Google.Rpc

Assembly

Google.Api.CommonProtos.dll

Constructors

PreconditionFailure()

public PreconditionFailure()

PreconditionFailure(PreconditionFailure)

public PreconditionFailure(PreconditionFailure other)
Parameter
NameDescription
otherPreconditionFailure

Fields

ViolationsFieldNumber

public const int ViolationsFieldNumber = 1

Field number for the "violations" field.

Field Value
TypeDescription
Int32

Properties

Descriptor

public static Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
Protobuf.Reflection.MessageDescriptor

Parser

public static Protobuf.MessageParser<PreconditionFailure> Parser { get; }
Property Value
TypeDescription
Protobuf.MessageParser<PreconditionFailure>

Violations

public Protobuf.Collections.RepeatedField<PreconditionFailure.Types.Violation> Violations { get; }

Describes all precondition violations.

Property Value
TypeDescription
Protobuf.Collections.RepeatedField<PreconditionFailure.Types.Violation>

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
Int32

Clone()

public PreconditionFailure Clone()
Returns
TypeDescription
PreconditionFailure

Equals(PreconditionFailure)

public bool Equals(PreconditionFailure other)
Parameter
NameDescription
otherPreconditionFailure
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object other)
Parameter
NameDescription
otherObject
Returns
TypeDescription
Boolean

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32

MergeFrom(Protobuf.CodedInputStream)

public void MergeFrom(Protobuf.CodedInputStream input)
Parameter
NameDescription
inputProtobuf.CodedInputStream

MergeFrom(PreconditionFailure)

public void MergeFrom(PreconditionFailure other)
Parameter
NameDescription
otherPreconditionFailure

ToString()

public override string ToString()
Returns
TypeDescription
String

WriteTo(Protobuf.CodedOutputStream)

public void WriteTo(Protobuf.CodedOutputStream output)
Parameter
NameDescription
outputProtobuf.CodedOutputStream