View Javadoc
1   package com.acumenvelocity.ath.model;
2   
3   import java.util.Date;
4   import java.util.Objects;
5   import java.util.UUID;
6   
7   import com.fasterxml.jackson.annotation.JsonCreator;
8   import com.fasterxml.jackson.annotation.JsonProperty;
9   import com.fasterxml.jackson.annotation.JsonValue;
10  
11  import io.swagger.annotations.ApiModelProperty;
12  
13  @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
14  public class TrainingStatusResponse {
15    /**
16     * Current status of the training job.
17     */
18    public enum StatusEnum {
19      SCANNING_BUCKETS("SCANNING_BUCKETS"),
20  
21      PREPARING_DATASET("PREPARING_DATASET"),
22  
23      IMPORTING_DATA("IMPORTING_DATA"),
24  
25      TRAINING("TRAINING");
26  
27      private String value;
28  
29      StatusEnum(String value) {
30        this.value = value;
31      }
32  
33      @Override
34      @JsonValue
35      public String toString() {
36        return String.valueOf(value);
37      }
38  
39      @JsonCreator
40      public static StatusEnum fromValue(String text) {
41        for (StatusEnum b : StatusEnum.values()) {
42          if (String.valueOf(b.value).equals(text)) {
43            return b;
44          }
45        }
46        throw new IllegalArgumentException("Unexpected value '" + text + "'");
47      }
48    }
49  
50    @JsonProperty("status")
51    private StatusEnum status;
52  
53    @JsonProperty("training_job_id")
54    private UUID trainingJobId;
55  
56    @JsonProperty("progress")
57    private Integer progress = 0;
58  
59    @JsonProperty("started_at")
60    private Date startedAt;
61  
62    @JsonProperty("current_phase")
63    private String currentPhase = "";
64  
65    /**
66     * Current status of the training job.
67     **/
68    public TrainingStatusResponse status(StatusEnum status) {
69      this.status = status;
70      return this;
71    }
72  
73    @ApiModelProperty(example = "TRAINING", required = true, value = "Current status of the training job.")
74    @JsonProperty("status")
75    public StatusEnum getStatus() {
76      return status;
77    }
78  
79    public void setStatus(StatusEnum status) {
80      this.status = status;
81    }
82  
83    /**
84     * Unique identifier of the training job.
85     **/
86    public TrainingStatusResponse trainingJobId(UUID trainingJobId) {
87      this.trainingJobId = trainingJobId;
88      return this;
89    }
90  
91    @ApiModelProperty(example = "550e8400-e29b-41d4-a716-446655440000", required = true, value = "Unique identifier of the training job.")
92    @JsonProperty("training_job_id")
93    public UUID getTrainingJobId() {
94      return trainingJobId;
95    }
96  
97    public void setTrainingJobId(UUID trainingJobId) {
98      this.trainingJobId = trainingJobId;
99    }
100 
101   /**
102    * Training progress percentage.
103    * minimum: 0
104    * maximum: 100
105    **/
106   public TrainingStatusResponse progress(Integer progress) {
107     this.progress = progress;
108     return this;
109   }
110 
111   @ApiModelProperty(example = "75", value = "Training progress percentage.")
112   @JsonProperty("progress")
113   public Integer getProgress() {
114     return progress;
115   }
116 
117   public void setProgress(Integer progress) {
118     this.progress = progress;
119   }
120 
121   /**
122    * Timestamp when training started.
123    **/
124   public TrainingStatusResponse startedAt(Date startedAt) {
125     this.startedAt = startedAt;
126     return this;
127   }
128 
129   @ApiModelProperty(example = "2025-12-16T14:00Z", value = "Timestamp when training started.")
130   @JsonProperty("started_at")
131   public Date getStartedAt() {
132     return startedAt;
133   }
134 
135   public void setStartedAt(Date startedAt) {
136     this.startedAt = startedAt;
137   }
138 
139   /**
140    * Human-readable description of current training phase.
141    **/
142   public TrainingStatusResponse currentPhase(String currentPhase) {
143     this.currentPhase = currentPhase;
144     return this;
145   }
146 
147   @ApiModelProperty(example = "Training AutoML model", value = "Human-readable description of current training phase.")
148   @JsonProperty("current_phase")
149   public String getCurrentPhase() {
150     return currentPhase;
151   }
152 
153   public void setCurrentPhase(String currentPhase) {
154     this.currentPhase = currentPhase;
155   }
156 
157   @Override
158   public boolean equals(Object o) {
159     if (this == o) {
160       return true;
161     }
162     if (o == null || getClass() != o.getClass()) {
163       return false;
164     }
165     TrainingStatusResponse trainingStatusResponse = (TrainingStatusResponse) o;
166     return Objects.equals(status, trainingStatusResponse.status) &&
167         Objects.equals(trainingJobId, trainingStatusResponse.trainingJobId) &&
168         Objects.equals(progress, trainingStatusResponse.progress) &&
169         Objects.equals(startedAt, trainingStatusResponse.startedAt) &&
170         Objects.equals(currentPhase, trainingStatusResponse.currentPhase);
171   }
172 
173   @Override
174   public int hashCode() {
175     return Objects.hash(status, trainingJobId, progress, startedAt, currentPhase);
176   }
177 
178   @Override
179   public String toString() {
180     StringBuilder sb = new StringBuilder();
181     sb.append("class TrainingStatusResponse {\n");
182 
183     sb.append("    status: ").append(toIndentedString(status)).append("\n");
184     sb.append("    trainingJobId: ").append(toIndentedString(trainingJobId)).append("\n");
185     sb.append("    progress: ").append(toIndentedString(progress)).append("\n");
186     sb.append("    startedAt: ").append(toIndentedString(startedAt)).append("\n");
187     sb.append("    currentPhase: ").append(toIndentedString(currentPhase)).append("\n");
188     sb.append("}");
189     return sb.toString();
190   }
191 
192   /**
193    * Convert the given object to string with each line indented by 4 spaces
194    * (except the first line).
195    */
196   private String toIndentedString(Object o) {
197     if (o == null) {
198       return "null";
199     }
200     return o.toString().replace("\n", "\n    ");
201   }
202 }