io.lakefs.clients.api.model.ActionRun Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-client Show documentation
Show all versions of api-client Show documentation
lakeFS OpenAPI Java client legacy SDK
/*
* lakeFS API
* lakeFS HTTP API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.lakefs.clients.api.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.threeten.bp.OffsetDateTime;
/**
* ActionRun
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ActionRun {
public static final String SERIALIZED_NAME_RUN_ID = "run_id";
@SerializedName(SERIALIZED_NAME_RUN_ID)
private String runId;
public static final String SERIALIZED_NAME_BRANCH = "branch";
@SerializedName(SERIALIZED_NAME_BRANCH)
private String branch;
public static final String SERIALIZED_NAME_START_TIME = "start_time";
@SerializedName(SERIALIZED_NAME_START_TIME)
private OffsetDateTime startTime;
public static final String SERIALIZED_NAME_END_TIME = "end_time";
@SerializedName(SERIALIZED_NAME_END_TIME)
private OffsetDateTime endTime;
public static final String SERIALIZED_NAME_EVENT_TYPE = "event_type";
@SerializedName(SERIALIZED_NAME_EVENT_TYPE)
private String eventType;
/**
* Gets or Sets status
*/
@JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
FAILED("failed"),
COMPLETED("completed");
private String value;
StatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StatusEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
private StatusEnum status;
public static final String SERIALIZED_NAME_COMMIT_ID = "commit_id";
@SerializedName(SERIALIZED_NAME_COMMIT_ID)
private String commitId;
public ActionRun runId(String runId) {
this.runId = runId;
return this;
}
/**
* Get runId
* @return runId
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public String getRunId() {
return runId;
}
public void setRunId(String runId) {
this.runId = runId;
}
public ActionRun branch(String branch) {
this.branch = branch;
return this;
}
/**
* Get branch
* @return branch
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public String getBranch() {
return branch;
}
public void setBranch(String branch) {
this.branch = branch;
}
public ActionRun startTime(OffsetDateTime startTime) {
this.startTime = startTime;
return this;
}
/**
* Get startTime
* @return startTime
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public OffsetDateTime getStartTime() {
return startTime;
}
public void setStartTime(OffsetDateTime startTime) {
this.startTime = startTime;
}
public ActionRun endTime(OffsetDateTime endTime) {
this.endTime = endTime;
return this;
}
/**
* Get endTime
* @return endTime
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public OffsetDateTime getEndTime() {
return endTime;
}
public void setEndTime(OffsetDateTime endTime) {
this.endTime = endTime;
}
public ActionRun eventType(String eventType) {
this.eventType = eventType;
return this;
}
/**
* Get eventType
* @return eventType
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public String getEventType() {
return eventType;
}
public void setEventType(String eventType) {
this.eventType = eventType;
}
public ActionRun status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public ActionRun commitId(String commitId) {
this.commitId = commitId;
return this;
}
/**
* Get commitId
* @return commitId
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public String getCommitId() {
return commitId;
}
public void setCommitId(String commitId) {
this.commitId = commitId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ActionRun actionRun = (ActionRun) o;
return Objects.equals(this.runId, actionRun.runId) &&
Objects.equals(this.branch, actionRun.branch) &&
Objects.equals(this.startTime, actionRun.startTime) &&
Objects.equals(this.endTime, actionRun.endTime) &&
Objects.equals(this.eventType, actionRun.eventType) &&
Objects.equals(this.status, actionRun.status) &&
Objects.equals(this.commitId, actionRun.commitId);
}
@Override
public int hashCode() {
return Objects.hash(runId, branch, startTime, endTime, eventType, status, commitId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ActionRun {\n");
sb.append(" runId: ").append(toIndentedString(runId)).append("\n");
sb.append(" branch: ").append(toIndentedString(branch)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n");
sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n");
sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" commitId: ").append(toIndentedString(commitId)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}