package io.grhodes.code.deploy.dashboard.v0.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import org.joda.time.DateTime; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1-dev * User agent: apibuilder app.apibuilder.io/grhodes/code-deploy-dashboard/0.0.1-dev/android_client * * WARNING: not all features (notably unions) and data types work with android generator yet. * Android generator is designed to be used in an android application, but should work in any java codebase as long as you import jackson and retrofit2 libraries. * If you are considering using this library, would like to request/discuss features, or would like to share how you're using it, please contact android-feedback@gilt.com * */ @JsonIgnoreProperties( ignoreUnknown = true ) public class DeploymentLifecycleEvent { private final String name; private final DateTime startTime; private final DateTime endTime; private final String status; private final String errorLogTail; private final String errorMessage; private final String scriptName; @JsonCreator public DeploymentLifecycleEvent(@JsonProperty("name") String name, @JsonProperty("start_time") DateTime startTime, @JsonProperty("end_time") DateTime endTime, @JsonProperty("status") String status, @JsonProperty("error_log_tail") String errorLogTail, @JsonProperty("error_message") String errorMessage, @JsonProperty("script_name") String scriptName) { this.name = name; this.startTime = startTime; this.endTime = endTime; this.status = status; this.errorLogTail = errorLogTail; this.errorMessage = errorMessage; this.scriptName = scriptName; } /** * The deployment lifecycle event name */ public String getName() { return name; } /** * Time the deployment lifecycle event started */ public DateTime getStartTime() { return startTime; } /** * Time the deployment lifecycle event ended */ public DateTime getEndTime() { return endTime; } /** * The status of the deployment lifecycle event */ public String getStatus() { return status; } /** * The deployment lifecycle event log tail if it failed */ public String getErrorLogTail() { return errorLogTail; } /** * The deployment lifecycle event error message if it failed */ public String getErrorMessage() { return errorMessage; } /** * The deployment lifecycle event script filename if it failed */ public String getScriptName() { return scriptName; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeploymentLifecycleEvent that = (DeploymentLifecycleEvent) o; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (startTime != null ? !startTime.equals(that.startTime) : that.startTime != null) return false; if (endTime != null ? !endTime.equals(that.endTime) : that.endTime != null) return false; if (status != null ? !status.equals(that.status) : that.status != null) return false; if (errorLogTail != null ? !errorLogTail.equals(that.errorLogTail) : that.errorLogTail != null) return false; if (errorMessage != null ? !errorMessage.equals(that.errorMessage) : that.errorMessage != null) return false; if (scriptName != null ? !scriptName.equals(that.scriptName) : that.scriptName != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (startTime != null ? startTime.hashCode() : 0); result = 31 * result + (endTime != null ? endTime.hashCode() : 0); result = 31 * result + (status != null ? status.hashCode() : 0); result = 31 * result + (errorLogTail != null ? errorLogTail.hashCode() : 0); result = 31 * result + (errorMessage != null ? errorMessage.hashCode() : 0); result = 31 * result + (scriptName != null ? scriptName.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return io.grhodes.code.deploy.dashboard.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static DeploymentLifecycleEvent parseJson(String json) throws IOException { return io.grhodes.code.deploy.dashboard.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, DeploymentLifecycleEvent.class); } }