public final class Status extends GeneratedMessageV3 implements StatusOrBuilder
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.
Protobuf type google.cloud.compute.v1.Status
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
CODE_FIELD_NUMBER
public static final int CODE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
DETAILS_FIELD_NUMBER
public static final int DETAILS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
MESSAGE_FIELD_NUMBER
public static final int MESSAGE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static Status getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Status.Builder newBuilder()
newBuilder(Status prototype)
public static Status.Builder newBuilder(Status prototype)
Parameter |
---|
Name | Description |
prototype | Status
|
public static Status parseDelimitedFrom(InputStream input)
public static Status parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Status parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Status parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Status parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Status parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Status parseFrom(CodedInputStream input)
public static Status parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Status parseFrom(InputStream input)
public static Status parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Status parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Status parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Status> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getCode()
The status code, which should be an enum value of google.rpc.Code.
optional int32 code = 3059181;
Returns |
---|
Type | Description |
int | The code.
|
getDefaultInstanceForType()
public Status getDefaultInstanceForType()
getDetails(int index)
public Any getDetails(int index)
A list of messages that carry the error details. There is a common set of message types for APIs to use.
repeated .google.protobuf.Any details = 483979842;
Parameter |
---|
Name | Description |
index | int
|
Returns |
---|
Type | Description |
Any | |
getDetailsCount()
public int getDetailsCount()
A list of messages that carry the error details. There is a common set of message types for APIs to use.
repeated .google.protobuf.Any details = 483979842;
Returns |
---|
Type | Description |
int | |
getDetailsList()
public List<Any> getDetailsList()
A list of messages that carry the error details. There is a common set of message types for APIs to use.
repeated .google.protobuf.Any details = 483979842;
getDetailsOrBuilder(int index)
public AnyOrBuilder getDetailsOrBuilder(int index)
A list of messages that carry the error details. There is a common set of message types for APIs to use.
repeated .google.protobuf.Any details = 483979842;
Parameter |
---|
Name | Description |
index | int
|
getDetailsOrBuilderList()
public List<? extends AnyOrBuilder> getDetailsOrBuilderList()
A list of messages that carry the error details. There is a common set of message types for APIs to use.
repeated .google.protobuf.Any details = 483979842;
Returns |
---|
Type | Description |
List<? extends com.google.protobuf.AnyOrBuilder> | |
getMessage()
public String getMessage()
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 field, or localized by the client.
optional string message = 418054151;
Returns |
---|
Type | Description |
String | The message.
|
getMessageBytes()
public ByteString getMessageBytes()
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 field, or localized by the client.
optional string message = 418054151;
Returns |
---|
Type | Description |
ByteString | The bytes for message.
|
getParserForType()
public Parser<Status> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
hasCode()
The status code, which should be an enum value of google.rpc.Code.
optional int32 code = 3059181;
Returns |
---|
Type | Description |
boolean | Whether the code field is set.
|
hasMessage()
public boolean hasMessage()
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 field, or localized by the client.
optional string message = 418054151;
Returns |
---|
Type | Description |
boolean | Whether the message field is set.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Status.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Status.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public Status.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides