Package com.batch.android.core
Enum Webservice.WebserviceError.Reason
- java.lang.Object
-
- java.lang.Enum<Webservice.WebserviceError.Reason>
-
- com.batch.android.core.Webservice.WebserviceError.Reason
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Webservice.WebserviceError.Reason>
- Enclosing class:
- Webservice.WebserviceError
public static enum Webservice.WebserviceError.Reason extends java.lang.Enum<Webservice.WebserviceError.Reason>
A possible reason of error
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEACTIVATED_API_KEYServer return a deactivated API key errorFORBIDDENAuth problem (HTTP 403)INVALID_API_KEYServer return an invalid API key errorNETWORK_ERRORNetwork is unavailableNOT_FOUND_ERRORServer returns a not found status (404)SDK_OPTED_OUTBatch has globally been opted out from: network calls are not allowedSERVER_ERRORServer error (500)UNEXPECTED_ERRORRuntime & unexpected error
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Webservice.WebserviceError.ReasonvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Webservice.WebserviceError.Reason[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NETWORK_ERROR
public static final Webservice.WebserviceError.Reason NETWORK_ERROR
Network is unavailable
-
SERVER_ERROR
public static final Webservice.WebserviceError.Reason SERVER_ERROR
Server error (500)
-
NOT_FOUND_ERROR
public static final Webservice.WebserviceError.Reason NOT_FOUND_ERROR
Server returns a not found status (404)
-
INVALID_API_KEY
public static final Webservice.WebserviceError.Reason INVALID_API_KEY
Server return an invalid API key error
-
DEACTIVATED_API_KEY
public static final Webservice.WebserviceError.Reason DEACTIVATED_API_KEY
Server return a deactivated API key error
-
UNEXPECTED_ERROR
public static final Webservice.WebserviceError.Reason UNEXPECTED_ERROR
Runtime & unexpected error
-
FORBIDDEN
public static final Webservice.WebserviceError.Reason FORBIDDEN
Auth problem (HTTP 403)
-
SDK_OPTED_OUT
public static final Webservice.WebserviceError.Reason SDK_OPTED_OUT
Batch has globally been opted out from: network calls are not allowed
-
-
Method Detail
-
values
public static Webservice.WebserviceError.Reason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Webservice.WebserviceError.Reason c : Webservice.WebserviceError.Reason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Webservice.WebserviceError.Reason valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-