Class PreconditionFailure.Types.Violation
A message type used to describe a single precondition failure.
Inheritance
System.Object
PreconditionFailure.Types.Violation
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Google.Api.CommonProtos.dll
Syntax
public sealed class Violation : IMessage<PreconditionFailure.Types.Violation>, IMessage, IEquatable<PreconditionFailure.Types.Violation>, IDeepCloneable<PreconditionFailure.Types.Violation>
Constructors
Violation()
Declaration
Violation(PreconditionFailure.Types.Violation)
Declaration
public Violation(PreconditionFailure.Types.Violation other)
Parameters
Fields
DescriptionFieldNumber
Field number for the "description" field.
Declaration
public const int DescriptionFieldNumber = 3
Field Value
Type |
Description |
System.Int32 |
|
SubjectFieldNumber
Field number for the "subject" field.
Declaration
public const int SubjectFieldNumber = 2
Field Value
Type |
Description |
System.Int32 |
|
TypeFieldNumber
Field number for the "type" field.
Declaration
public const int TypeFieldNumber = 1
Field Value
Type |
Description |
System.Int32 |
|
Properties
Description
A description of how the precondition failed. Developers can use this
description to understand how to fix the failure.
For example: "Terms of service not accepted".
Declaration
public string Description { get; set; }
Property Value
Type |
Description |
System.String |
|
Descriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Parser
Declaration
public static MessageParser<PreconditionFailure.Types.Violation> Parser { get; }
Property Value
Subject
The subject, relative to the type, that failed.
For example, "google.com/cloud" relative to the "TOS" type would indicate
which terms of service is being referenced.
Declaration
public string Subject { get; set; }
Property Value
Type |
Description |
System.String |
|
Type
The type of PreconditionFailure. We recommend using a service-specific
enum type to define the supported precondition violation subjects. For
example, "TOS" for "Terms of Service violation".
Declaration
public string Type { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type |
Description |
System.Int32 |
|
Implements
Clone()
Declaration
public PreconditionFailure.Types.Violation Clone()
Returns
Implements
Equals(PreconditionFailure.Types.Violation)
Declaration
public bool Equals(PreconditionFailure.Types.Violation other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>.Equals(T)
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Implements
MergeFrom(PreconditionFailure.Types.Violation)
Declaration
public void MergeFrom(PreconditionFailure.Types.Violation other)
Parameters
Implements
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
WriteTo(CodedOutputStream)
Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Implements
Explicit Interface Implementations
IMessage.Descriptor
Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Implements