|
||||||||||
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 com.google.api.client.util.GenericData |
---|
GenericData.Flags |
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> |
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, getClassInfo, 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 |
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.MEDIA_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 |