- 1.91.0 (latest)
- 1.90.0
- 1.88.0
- 1.86.0
- 1.85.0
- 1.84.0
- 1.83.0
- 1.82.0
- 1.80.0
- 1.78.0
- 1.77.0
- 1.74.0
- 1.73.0
- 1.72.0
- 1.70.0
- 1.69.0
- 1.68.0
- 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 ErrorInfo.Builder extends GeneratedMessageV3.Builder<ErrorInfo.Builder> implements ErrorInfoOrBuilderDescribes the cause of the error with structured details.
Example of an error when contacting the "pubsub.googleapis.com" API when it is not enabled:
{ "reason": "API_DISABLED"
"domain": "googleapis.com"
"metadata": {
"resource": "projects/123",
"service": "pubsub.googleapis.com"
}
}
This response indicates that the pubsub.googleapis.com API is not enabled.
Example of an error that is returned when attempting to create a Spanner instance in a region that is out of stock:
{ "reason": "STOCKOUT"
"domain": "spanner.googleapis.com",
"metadata": {
"availableRegions": "us-central1,us-east2"
}
}
Protobuf type google.cloud.compute.v1.ErrorInfo
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > ErrorInfo.BuilderImplements
ErrorInfoOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ErrorInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
build()
public ErrorInfo build()| Returns | |
|---|---|
| Type | Description |
ErrorInfo |
|
buildPartial()
public ErrorInfo buildPartial()| Returns | |
|---|---|
| Type | Description |
ErrorInfo |
|
clear()
public ErrorInfo.Builder clear()| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
clearDomain()
public ErrorInfo.Builder clearDomain()The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
optional string domain = 284415172;
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public ErrorInfo.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
clearMetadatas()
public ErrorInfo.Builder clearMetadatas()| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
clearOneof(Descriptors.OneofDescriptor oneof)
public ErrorInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
clearReason()
public ErrorInfo.Builder clearReason() The reason of the error. This is a constant value that identifies the
proximate cause of the error. Error reasons are unique within a particular
domain of errors. This should be at most 63 characters and match a
regular expression of A-Z+[A-Z0-9], which represents
UPPER_SNAKE_CASE.
optional string reason = 138777156;
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
This builder for chaining. |
clone()
public ErrorInfo.Builder clone()| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
containsMetadatas(String key)
public boolean containsMetadatas(String key)Additional structured details about this error.
Keys must match a regular expression of a-z+ but should
ideally be lowerCamelCase. Also, they must be limited to 64 characters in
length. When identifying the current value of an exceeded limit, the units
should be contained in the key, not the value. For example, rather than
{"instanceLimit": "100/request"}, should be returned as,
{"instanceLimitPerRequest": "100"}, if the client exceeds the number of
instances that can be created in a single (batch) request.
map<string, string> metadatas = 8514340;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getDefaultInstanceForType()
public ErrorInfo getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ErrorInfo |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDomain()
public String getDomain()The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
optional string domain = 284415172;
| Returns | |
|---|---|
| Type | Description |
String |
The domain. |
getDomainBytes()
public ByteString getDomainBytes()The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
optional string domain = 284415172;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for domain. |
getMetadatas() (deprecated)
public Map<String,String> getMetadatas()Use #getMetadatasMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getMetadatasCount()
public int getMetadatasCount()Additional structured details about this error.
Keys must match a regular expression of a-z+ but should
ideally be lowerCamelCase. Also, they must be limited to 64 characters in
length. When identifying the current value of an exceeded limit, the units
should be contained in the key, not the value. For example, rather than
{"instanceLimit": "100/request"}, should be returned as,
{"instanceLimitPerRequest": "100"}, if the client exceeds the number of
instances that can be created in a single (batch) request.
map<string, string> metadatas = 8514340;
| Returns | |
|---|---|
| Type | Description |
int |
|
getMetadatasMap()
public Map<String,String> getMetadatasMap()Additional structured details about this error.
Keys must match a regular expression of a-z+ but should
ideally be lowerCamelCase. Also, they must be limited to 64 characters in
length. When identifying the current value of an exceeded limit, the units
should be contained in the key, not the value. For example, rather than
{"instanceLimit": "100/request"}, should be returned as,
{"instanceLimitPerRequest": "100"}, if the client exceeds the number of
instances that can be created in a single (batch) request.
map<string, string> metadatas = 8514340;
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getMetadatasOrDefault(String key, String defaultValue)
public String getMetadatasOrDefault(String key, String defaultValue)Additional structured details about this error.
Keys must match a regular expression of a-z+ but should
ideally be lowerCamelCase. Also, they must be limited to 64 characters in
length. When identifying the current value of an exceeded limit, the units
should be contained in the key, not the value. For example, rather than
{"instanceLimit": "100/request"}, should be returned as,
{"instanceLimitPerRequest": "100"}, if the client exceeds the number of
instances that can be created in a single (batch) request.
map<string, string> metadatas = 8514340;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getMetadatasOrThrow(String key)
public String getMetadatasOrThrow(String key)Additional structured details about this error.
Keys must match a regular expression of a-z+ but should
ideally be lowerCamelCase. Also, they must be limited to 64 characters in
length. When identifying the current value of an exceeded limit, the units
should be contained in the key, not the value. For example, rather than
{"instanceLimit": "100/request"}, should be returned as,
{"instanceLimitPerRequest": "100"}, if the client exceeds the number of
instances that can be created in a single (batch) request.
map<string, string> metadatas = 8514340;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getMutableMetadatas() (deprecated)
public Map<String,String> getMutableMetadatas()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getReason()
public String getReason() The reason of the error. This is a constant value that identifies the
proximate cause of the error. Error reasons are unique within a particular
domain of errors. This should be at most 63 characters and match a
regular expression of A-Z+[A-Z0-9], which represents
UPPER_SNAKE_CASE.
optional string reason = 138777156;
| Returns | |
|---|---|
| Type | Description |
String |
The reason. |
getReasonBytes()
public ByteString getReasonBytes() The reason of the error. This is a constant value that identifies the
proximate cause of the error. Error reasons are unique within a particular
domain of errors. This should be at most 63 characters and match a
regular expression of A-Z+[A-Z0-9], which represents
UPPER_SNAKE_CASE.
optional string reason = 138777156;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for reason. |
hasDomain()
public boolean hasDomain()The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
optional string domain = 284415172;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the domain field is set. |
hasReason()
public boolean hasReason() The reason of the error. This is a constant value that identifies the
proximate cause of the error. Error reasons are unique within a particular
domain of errors. This should be at most 63 characters and match a
regular expression of A-Z+[A-Z0-9], which represents
UPPER_SNAKE_CASE.
optional string reason = 138777156;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the reason field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(ErrorInfo other)
public ErrorInfo.Builder mergeFrom(ErrorInfo other)| Parameter | |
|---|---|
| Name | Description |
other |
ErrorInfo |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ErrorInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ErrorInfo.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ErrorInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
putAllMetadatas(Map<String,String> values)
public ErrorInfo.Builder putAllMetadatas(Map<String,String> values)Additional structured details about this error.
Keys must match a regular expression of a-z+ but should
ideally be lowerCamelCase. Also, they must be limited to 64 characters in
length. When identifying the current value of an exceeded limit, the units
should be contained in the key, not the value. For example, rather than
{"instanceLimit": "100/request"}, should be returned as,
{"instanceLimitPerRequest": "100"}, if the client exceeds the number of
instances that can be created in a single (batch) request.
map<string, string> metadatas = 8514340;
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,String> |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
putMetadatas(String key, String value)
public ErrorInfo.Builder putMetadatas(String key, String value)Additional structured details about this error.
Keys must match a regular expression of a-z+ but should
ideally be lowerCamelCase. Also, they must be limited to 64 characters in
length. When identifying the current value of an exceeded limit, the units
should be contained in the key, not the value. For example, rather than
{"instanceLimit": "100/request"}, should be returned as,
{"instanceLimitPerRequest": "100"}, if the client exceeds the number of
instances that can be created in a single (batch) request.
map<string, string> metadatas = 8514340;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
String |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
removeMetadatas(String key)
public ErrorInfo.Builder removeMetadatas(String key)Additional structured details about this error.
Keys must match a regular expression of a-z+ but should
ideally be lowerCamelCase. Also, they must be limited to 64 characters in
length. When identifying the current value of an exceeded limit, the units
should be contained in the key, not the value. For example, rather than
{"instanceLimit": "100/request"}, should be returned as,
{"instanceLimitPerRequest": "100"}, if the client exceeds the number of
instances that can be created in a single (batch) request.
map<string, string> metadatas = 8514340;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
setDomain(String value)
public ErrorInfo.Builder setDomain(String value)The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
optional string domain = 284415172;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe domain to set. |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
This builder for chaining. |
setDomainBytes(ByteString value)
public ErrorInfo.Builder setDomainBytes(ByteString value)The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
optional string domain = 284415172;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for domain to set. |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public ErrorInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
setReason(String value)
public ErrorInfo.Builder setReason(String value) The reason of the error. This is a constant value that identifies the
proximate cause of the error. Error reasons are unique within a particular
domain of errors. This should be at most 63 characters and match a
regular expression of A-Z+[A-Z0-9], which represents
UPPER_SNAKE_CASE.
optional string reason = 138777156;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe reason to set. |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
This builder for chaining. |
setReasonBytes(ByteString value)
public ErrorInfo.Builder setReasonBytes(ByteString value) The reason of the error. This is a constant value that identifies the
proximate cause of the error. Error reasons are unique within a particular
domain of errors. This should be at most 63 characters and match a
regular expression of A-Z+[A-Z0-9], which represents
UPPER_SNAKE_CASE.
optional string reason = 138777156;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for reason to set. |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ErrorInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
public final ErrorInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
ErrorInfo.Builder |
|