Enum Class TaskState_v0_3

java.lang.Object
java.lang.Enum<TaskState_v0_3>
org.a2aproject.sdk.compat03.spec.TaskState_v0_3
All Implemented Interfaces:
Serializable, Comparable<TaskState_v0_3>, Constable

public enum TaskState_v0_3 extends Enum<TaskState_v0_3>
Defines the lifecycle states of a Task.
  • Enum Constant Details

  • Method Details

    • values

      public static TaskState_v0_3[] 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

      public static TaskState_v0_3 valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • asString

      public String 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

      public static TaskState_v0_3 fromString(String state)
      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