|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.json.GenericJson
com.google.api.client.googleapis.json.GoogleJsonError
public class GoogleJsonError
Data class representing the Google JSON error response content, as documented for example in Error responses.
Nested Class Summary | |
---|---|
static class |
GoogleJsonError.ErrorInfo
Detailed error information. |
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary | |
---|---|
int |
code
Deprecated. (scheduled to be made private in 1.9) Use getCode() or setCode(int) |
List<GoogleJsonError.ErrorInfo> |
errors
Deprecated. (scheduled to be made private in 1.9) Use getErrors() or setErrors(java.util.List |
String |
message
Deprecated. (scheduled to be made private in 1.9) Use getMessage() or
setMessage(java.lang.String) |
Constructor Summary | |
---|---|
GoogleJsonError()
|
Method Summary | |
---|---|
int |
getCode()
Returns the HTTP status code of this response or null for none. |
List<GoogleJsonError.ErrorInfo> |
getErrors()
Returns the list of detailed errors or null for none. |
String |
getMessage()
Returns the human-readable explanation of the error or null for none. |
static GoogleJsonError |
parse(JsonFactory jsonFactory,
HttpResponse response)
Parses the given error HTTP response using the given JSON factory. |
void |
setCode(int code)
Sets the HTTP status code of this response or null for none. |
void |
setErrors(List<GoogleJsonError.ErrorInfo> errors)
Sets the list of detailed errors or null for none. |
void |
setMessage(String message)
Sets the human-readable explanation of the error or null for none. |
Methods inherited from class com.google.api.client.json.GenericJson |
---|
clone, getFactory, setFactory, toPrettyString, toString |
Methods inherited from class com.google.api.client.util.GenericData |
---|
entrySet, get, getUnknownKeys, put, putAll, remove, set, setUnknownKeys |
Methods inherited from class java.util.AbstractMap |
---|
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@Deprecated public List<GoogleJsonError.ErrorInfo> errors
getErrors()
or setErrors(java.util.List)
null
for none.
@Deprecated public int code
getCode()
or setCode(int)
null
for none.
@Deprecated public String message
getMessage()
or
setMessage(java.lang.String)
null
for none.
Constructor Detail |
---|
public GoogleJsonError()
Method Detail |
---|
public static GoogleJsonError parse(JsonFactory jsonFactory, HttpResponse response) throws IOException
jsonFactory
- JSON factoryresponse
- HTTP response
IllegalArgumentException
- if content type is not Json.CONTENT_TYPE
or if
expected "data"
or "error"
key is not found
IOException
public final List<GoogleJsonError.ErrorInfo> getErrors()
null
for none.
public final void setErrors(List<GoogleJsonError.ErrorInfo> errors)
null
for none.
public final int getCode()
null
for none.
public final void setCode(int code)
null
for none.
public final String getMessage()
null
for none.
public final void setMessage(String message)
null
for none.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |