Enum Class FileStatus
- All Implemented Interfaces:
Serializable,Comparable<FileStatus>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFile parsing failed This is a terminal state indicating an error occurred during parsingFile parsing completed successfully This is a terminal state indicating the file is ready for useFile is being parsed This is a non-terminal state indicating the file is currently being parsedUnknown statusFile uploaded successfully This is a terminal state indicating the file has been uploaded successfully -
Method Summary
Modifier and TypeMethodDescriptionstatic FileStatusParses a string value into a FileStatus enumstatic FileStatusfromValueOrDefault(String value, FileStatus defaultStatus) Parses a string value into a FileStatus enum with a default fallbackgetValue()Gets the string value of this statusbooleanisFailed()Checks if this status represents a failurebooleanChecks if this status represents a successful completiontoString()static FileStatusReturns the enum constant of this class with the specified name.static FileStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PARSE_SUCCESS
File parsing completed successfully This is a terminal state indicating the file is ready for use -
PARSE_FAILED
File parsing failed This is a terminal state indicating an error occurred during parsing -
PARSING
File is being parsed This is a non-terminal state indicating the file is currently being parsed -
UPLOADED
File uploaded successfully This is a terminal state indicating the file has been uploaded successfully -
UNK
Unknown status
-
-
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
-
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
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
Parses a string value into a FileStatus enum with a default fallback- Parameters:
value- the status string valuedefaultStatus- the default status to return if value is not found- Returns:
- the corresponding FileStatus enum, or defaultStatus if not found
-
toString
- Overrides:
toStringin classEnum<FileStatus>
-