com.github.estuaryoss.agent.model.api.CommandStatus Maven / Gradle / Ivy
package com.github.estuaryoss.agent.model.api;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CommandStatus {
@Getter
@Setter
@JsonProperty("status")
private String status;
@Getter
@Setter
@JsonProperty("details")
private CommandDetails details;
@Getter
@Setter
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss.SSSSSS")
@JsonProperty("startedat")
private String startedat;
@Getter
@Setter
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss.SSSSSS")
@JsonProperty("finishedat")
private String finishedat;
@Getter
@Setter
@JsonProperty("duration")
private float duration;
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{\n");
sb.append(" status: ").append(toIndentedString(status));
sb.append(" details: ").append(toIndentedString(details));
sb.append(" startedat: ").append(toIndentedString(startedat));
sb.append(" finishedat: ").append(toIndentedString(finishedat));
sb.append(" duration: ").append(toIndentedString(duration));
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 ");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy