- 1.68.0 (latest)
- 1.67.0
- 1.66.0
- 1.65.0
- 1.64.0
- 1.63.0
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
public static final class Status.Builder extends GeneratedMessageV3.Builder<Status.Builder> 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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Status.BuilderImplements
StatusOrBuilderInherited Members
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllDetails(Iterable<? extends Any> values)
public Status.Builder addAllDetails(Iterable<? extends Any> values)
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 |
values |
Iterable<? extends com.google.protobuf.Any> |
Returns | |
---|---|
Type | Description |
Status.Builder |
addDetails(Any value)
public Status.Builder addDetails(Any value)
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 |
value |
Any |
Returns | |
---|---|
Type | Description |
Status.Builder |
addDetails(Any.Builder builderForValue)
public Status.Builder addDetails(Any.Builder builderForValue)
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 |
builderForValue |
Builder |
Returns | |
---|---|
Type | Description |
Status.Builder |
addDetails(int index, Any value)
public Status.Builder addDetails(int index, Any value)
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 |
Status.Builder |
addDetails(int index, Any.Builder builderForValue)
public Status.Builder addDetails(int index, Any.Builder builderForValue)
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 |
Status.Builder |
addDetailsBuilder()
public Any.Builder addDetailsBuilder()
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 |
Builder |
addDetailsBuilder(int index)
public Any.Builder addDetailsBuilder(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 |
Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Status.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Status.Builder |
build()
public Status build()
Returns | |
---|---|
Type | Description |
Status |
buildPartial()
public Status buildPartial()
Returns | |
---|---|
Type | Description |
Status |
clear()
public Status.Builder clear()
Returns | |
---|---|
Type | Description |
Status.Builder |
clearCode()
public Status.Builder clearCode()
The status code, which should be an enum value of google.rpc.Code.
optional int32 code = 3059181;
Returns | |
---|---|
Type | Description |
Status.Builder |
This builder for chaining. |
clearDetails()
public Status.Builder clearDetails()
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 |
Status.Builder |
clearField(Descriptors.FieldDescriptor field)
public Status.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
Status.Builder |
clearMessage()
public Status.Builder clearMessage()
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 |
Status.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Status.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
Status.Builder |
clone()
public Status.Builder clone()
Returns | |
---|---|
Type | Description |
Status.Builder |
getCode()
public int 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()
Returns | |
---|---|
Type | Description |
Status |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
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 |
getDetailsBuilder(int index)
public Any.Builder getDetailsBuilder(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 |
Builder |
getDetailsBuilderList()
public List<Any.Builder> getDetailsBuilderList()
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;
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 |
Returns | |
---|---|
Type | Description |
AnyOrBuilder |
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. |
hasCode()
public boolean 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. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(Status other)
public Status.Builder mergeFrom(Status other)
Parameter | |
---|---|
Name | Description |
other |
Status |
Returns | |
---|---|
Type | Description |
Status.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Status.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Status.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Status.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
Status.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Status.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Status.Builder |
removeDetails(int index)
public Status.Builder removeDetails(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 |
Status.Builder |
setCode(int value)
public Status.Builder setCode(int value)
The status code, which should be an enum value of google.rpc.Code.
optional int32 code = 3059181;
Parameter | |
---|---|
Name | Description |
value |
int The code to set. |
Returns | |
---|---|
Type | Description |
Status.Builder |
This builder for chaining. |
setDetails(int index, Any value)
public Status.Builder setDetails(int index, Any value)
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 |
Status.Builder |
setDetails(int index, Any.Builder builderForValue)
public Status.Builder setDetails(int index, Any.Builder builderForValue)
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 |
Status.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Status.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Status.Builder |
setMessage(String value)
public Status.Builder setMessage(String value)
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;
Parameter | |
---|---|
Name | Description |
value |
String The message to set. |
Returns | |
---|---|
Type | Description |
Status.Builder |
This builder for chaining. |
setMessageBytes(ByteString value)
public Status.Builder setMessageBytes(ByteString value)
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;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for message to set. |
Returns | |
---|---|
Type | Description |
Status.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Status.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
Status.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Status.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Status.Builder |