Class Status
The Status
type defines a logical error model that is suitable for
different programming environments, including REST APIs and RPC APIs. It is
used by gRPC. Each Status
message contains
three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the
API Design Guide.
Inheritance
System.Object
Status
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 Status : IMessage<Status>, IMessage, IEquatable<Status>, IDeepCloneable<Status>
Constructors
Status()
Declaration
Status(Status)
Declaration
public Status(Status other)
Parameters
Type |
Name |
Description |
Status |
other |
|
Fields
CodeFieldNumber
Field number for the "code" field.
Declaration
public const int CodeFieldNumber = 1
Field Value
Type |
Description |
System.Int32 |
|
DetailsFieldNumber
Field number for the "details" field.
Declaration
public const int DetailsFieldNumber = 3
Field Value
Type |
Description |
System.Int32 |
|
MessageFieldNumber
Field number for the "message" field.
Declaration
public const int MessageFieldNumber = 2
Field Value
Type |
Description |
System.Int32 |
|
Properties
Code
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
Declaration
public int Code { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Descriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Details
A list of messages that carry the error details. There is a common set of
message types for APIs to use.
Declaration
public RepeatedField<Any> Details { get; }
Property Value
Message
A developer-facing error message, which should be in English. Any
user-facing error message should be localized and sent in the
[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
Declaration
public string Message { get; set; }
Property Value
Type |
Description |
System.String |
|
Parser
Declaration
public static MessageParser<Status> Parser { get; }
Property Value
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type |
Description |
System.Int32 |
|
Implements
Clone()
Declaration
Returns
Implements
Equals(Status)
Declaration
public bool Equals(Status other)
Parameters
Type |
Name |
Description |
Status |
other |
|
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(Status)
Declaration
public void MergeFrom(Status other)
Parameters
Type |
Name |
Description |
Status |
other |
|
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