public static SourceStatus forCode(int code) {
        for (SourceStatus state : values()) {
            if (state.getCode() == code) {
                return state;
            }
        }
        throw new IllegalStateException(String.format("Illegal code=%s for SourceState", code));
    }
Get state from the given code
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/enums/SourceStatus.java