Enum Class FileStatus

java.lang.Object
java.lang.Enum<FileStatus>
com.alibaba.cloud.ai.dashscope.rag.handler.FileStatus
All Implemented Interfaces:
Serializable, Comparable<FileStatus>, Constable

public enum FileStatus extends Enum<FileStatus>
File parsing status enumeration

Represents the various states of a file during the parsing process in the DashScope document cloud service.

Since:
2025/12/01
Author:
kevin
  • Enum Constant Details

    • PARSE_SUCCESS

      public static final FileStatus PARSE_SUCCESS
      File parsing completed successfully This is a terminal state indicating the file is ready for use
    • PARSE_FAILED

      public static final FileStatus PARSE_FAILED
      File parsing failed This is a terminal state indicating an error occurred during parsing
    • PARSING

      public static final FileStatus PARSING
      File is being parsed This is a non-terminal state indicating the file is currently being parsed
    • UPLOADED

      public static final FileStatus UPLOADED
      File uploaded successfully This is a terminal state indicating the file has been uploaded successfully
    • UNK

      public static final FileStatus UNK
      Unknown status
  • Method Details

    • values

      public static FileStatus[] 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 FileStatus 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
    • getValue

      public String getValue()
      Gets the string value of this status
      Returns:
      the status string value
    • isSuccess

      public boolean isSuccess()
      Checks if this status represents a successful completion
      Returns:
      true if parsing completed successfully
    • isFailed

      public boolean isFailed()
      Checks if this status represents a failure
      Returns:
      true if parsing failed
    • fromValue

      public static FileStatus fromValue(String value)
      Parses a string value into a FileStatus enum
      Parameters:
      value - the status string value
      Returns:
      the corresponding FileStatus enum, or null if not found
    • fromValueOrDefault

      public static FileStatus fromValueOrDefault(String value, FileStatus defaultStatus)
      Parses a string value into a FileStatus enum with a default fallback
      Parameters:
      value - the status string value
      defaultStatus - the default status to return if value is not found
      Returns:
      the corresponding FileStatus enum, or defaultStatus if not found
    • toString

      public String toString()
      Overrides:
      toString in class Enum<FileStatus>