public enum ForecastErrorReason extends Enum<ForecastErrorReason>
Java class for ForecastError.Reason.
The following schema fragment specifies the expected content contained within this class.
<simpleType name="ForecastError.Reason">
<restriction base="{http://www.w3.org/2001/XMLSchema}string">
<enumeration value="SERVER_NOT_AVAILABLE"/>
<enumeration value="INTERNAL_ERROR"/>
<enumeration value="NO_FORECAST_YET"/>
<enumeration value="NOT_ENOUGH_INVENTORY"/>
<enumeration value="SUCCESS"/>
<enumeration value="ZERO_LENGTH_RESERVATION"/>
<enumeration value="EXCEEDED_QUOTA"/>
<enumeration value="UNKNOWN"/>
</restriction>
</simpleType>
| Enum Constant and Description |
|---|
EXCEEDED_QUOTA
The number of requests made per second is too high and has exceeded the
allowable limit.
|
INTERNAL_ERROR
There was an unexpected internal error.
|
NO_FORECAST_YET
The forecast could not be retrieved because there is not
enough forecasting data available yet.
|
NOT_ENOUGH_INVENTORY
There's not enough inventory for the requested reservation.
|
SERVER_NOT_AVAILABLE
The forecast could not be retrieved due to a server side
connection problem.
|
SUCCESS
No error from forecast.
|
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
|
ZERO_LENGTH_RESERVATION
The requested reservation is of zero length.
|
| Modifier and Type | Method and Description |
|---|---|
static ForecastErrorReason |
fromValue(String v) |
String |
value() |
static ForecastErrorReason |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ForecastErrorReason[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ForecastErrorReason SERVER_NOT_AVAILABLE
public static final ForecastErrorReason INTERNAL_ERROR
public static final ForecastErrorReason NO_FORECAST_YET
public static final ForecastErrorReason NOT_ENOUGH_INVENTORY
public static final ForecastErrorReason SUCCESS
public static final ForecastErrorReason ZERO_LENGTH_RESERVATION
public static final ForecastErrorReason EXCEEDED_QUOTA
Another way to mitigate this error is to limit requests to 2 per second. Once again this does not guarantee that every request will succeed, but may help reduce the number of times you receive this error.
public static final ForecastErrorReason UNKNOWN
public static ForecastErrorReason[] values()
for (ForecastErrorReason c : ForecastErrorReason.values()) System.out.println(c);
public static ForecastErrorReason valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String value()
public static ForecastErrorReason fromValue(String v)
Copyright © 2018. All Rights Reserved.