Enum Class TaskState_v0_3
- All Implemented Interfaces:
Serializable, Comparable<TaskState_v0_3>, Constable
Defines the lifecycle states of a Task.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionasString()Returns the string representation of this task state for JSON serialization.static TaskState_v0_3fromString(String state) Deserializes a string value into a TaskState enum constant.booleanisFinal()static TaskState_v0_3Returns the enum constant of this class with the specified name.static TaskState_v0_3[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUBMITTED
-
WORKING
-
INPUT_REQUIRED
-
AUTH_REQUIRED
-
COMPLETED
-
CANCELED
-
FAILED
-
REJECTED
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
asString
Returns the string representation of this task state for JSON serialization.This method is used to serialize TaskState values to their wire format (e.g., "working", "completed").
- Returns:
- the string representation of this state
-
isFinal
public boolean isFinal() -
fromString
Deserializes a string value into a TaskState enum constant.This method is used to deserialize TaskState values from their wire format during JSON parsing.
- Parameters:
state- the string representation of the state- Returns:
- the corresponding TaskState enum constant
- Throws:
IllegalArgumentException- if the state string is not recognized
-