View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   /**
4    * Current status of the training job.
5    **/
6   import com.fasterxml.jackson.annotation.JsonCreator;
7   import com.fasterxml.jackson.annotation.JsonValue;
8   
9   /**
10   * Current status of the training job.
11   */
12  public enum TrainingJobStatus {
13  
14    SCANNING_BUCKETS("SCANNING_BUCKETS"),
15  
16    PREPARING_DATASET("PREPARING_DATASET"),
17  
18    IMPORTING_DATA("IMPORTING_DATA"),
19  
20    TRAINING("TRAINING"),
21  
22    COMPLETED("COMPLETED"),
23  
24    FAILED("FAILED"),
25  
26    CANCELLED("CANCELLED");
27  
28    private String value;
29  
30    TrainingJobStatus(String value) {
31      this.value = value;
32    }
33  
34    @Override
35    @JsonValue
36    public String toString() {
37      return String.valueOf(value);
38    }
39  
40    @JsonCreator
41    public static TrainingJobStatus fromValue(String text) {
42      for (TrainingJobStatus b : TrainingJobStatus.values()) {
43        if (String.valueOf(b.value).equals(text)) {
44          return b;
45        }
46      }
47      throw new IllegalArgumentException("Unexpected value '" + text + "'");
48    }
49  }