rapture.common.RaptureActivity Maven / Gradle / Ivy
/**
* The MIT License (MIT)
*
* Copyright (C) 2011-2016 Incapture Technologies LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* This file is autogenerated and any changes will be overwritten.
*/
package rapture.common;
import rapture.common.*;
import rapture.object.Searchable;
import rapture.object.Storable;
import rapture.object.Debugable;
import rapture.common.version.ApiVersion;
import rapture.common.impl.jackson.JacksonUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @deprecated Replaced by use Activity
**/
@SuppressWarnings("all")
public class RaptureActivity implements RaptureTransferObject, Debugable ,Storable {
/*
* Start of field 'id' (String)
*/
private String id;
@JsonProperty("id")
public String getId() {
return id;
}
@JsonProperty("id")
public void setId(String id) {
this.id = id ;
}
/*
* end of field 'id' (String)
*/
/*
* Start of field 'otherId' (String)
*/
private String otherId;
@JsonProperty("otherId")
public String getOtherId() {
return otherId;
}
@JsonProperty("otherId")
public void setOtherId(String otherId) {
this.otherId = otherId ;
}
/*
* end of field 'otherId' (String)
*/
/*
* Start of field 'message' (String)
*/
private String message;
@JsonProperty("message")
public String getMessage() {
return message;
}
@JsonProperty("message")
public void setMessage(String message) {
this.message = message ;
}
/*
* end of field 'message' (String)
*/
/*
* Start of field 'progress' (Long)
*/
private Long progress;
@JsonProperty("progress")
public Long getProgress() {
return progress;
}
@JsonProperty("progress")
public void setProgress(Long progress) {
this.progress = progress ;
}
/*
* end of field 'progress' (Long)
*/
/*
* Start of field 'maxProgress' (Long)
*/
private Long maxProgress;
@JsonProperty("maxProgress")
public Long getMaxProgress() {
return maxProgress;
}
@JsonProperty("maxProgress")
public void setMaxProgress(Long maxProgress) {
this.maxProgress = maxProgress ;
}
/*
* end of field 'maxProgress' (Long)
*/
/*
* Start of field 'requestFinish' (Boolean)
*/
private Boolean requestFinish = false;
@JsonProperty("requestFinish")
public Boolean getRequestFinish() {
return requestFinish;
}
@JsonProperty("requestFinish")
public void setRequestFinish(Boolean requestFinish) {
this.requestFinish = requestFinish ;
}
/*
* end of field 'requestFinish' (Boolean)
*/
/*
* Start of field 'lastSeen' (Date)
*/
private Date lastSeen;
@JsonProperty("lastSeen")
public Date getLastSeen() {
return lastSeen;
}
@JsonProperty("lastSeen")
public void setLastSeen(Date lastSeen) {
this.lastSeen = lastSeen ;
}
/*
* end of field 'lastSeen' (Date)
*/
/*
* Start of field 'expiresAt' (Long)
*/
private Long expiresAt;
@JsonProperty("expiresAt")
public Long getExpiresAt() {
return expiresAt;
}
@JsonProperty("expiresAt")
public void setExpiresAt(Long expiresAt) {
this.expiresAt = expiresAt ;
}
/*
* end of field 'expiresAt' (Long)
*/
/*
* Start of field 'finished' (Boolean)
*/
private Boolean finished = false;
@JsonProperty("finished")
public Boolean getFinished() {
return finished;
}
@JsonProperty("finished")
public void setFinished(Boolean finished) {
this.finished = finished ;
}
/*
* end of field 'finished' (Boolean)
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((lastSeen == null) ? 0 : lastSeen.hashCode());
result = prime * result + ((otherId == null) ? 0 : otherId.hashCode());
result = prime * result + ((maxProgress == null) ? 0 : maxProgress.hashCode());
result = prime * result + ((progress == null) ? 0 : progress.hashCode());
result = prime * result + ((requestFinish == null) ? 0 : requestFinish.hashCode());
result = prime * result + ((finished == null) ? 0 : finished.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((message == null) ? 0 : message.hashCode());
result = prime * result + ((expiresAt == null) ? 0 : expiresAt.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
RaptureActivity other = (RaptureActivity) obj;
if (lastSeen == null) {
if (other.lastSeen != null) {
return false;
}
} else if (!lastSeen.equals(other.lastSeen)) {
return false;
}
if (otherId == null) {
if (other.otherId != null) {
return false;
}
} else if (!otherId.equals(other.otherId)) {
return false;
}
if (maxProgress == null) {
if (other.maxProgress != null) {
return false;
}
} else if (!maxProgress.equals(other.maxProgress)) {
return false;
}
if (progress == null) {
if (other.progress != null) {
return false;
}
} else if (!progress.equals(other.progress)) {
return false;
}
if (requestFinish == null) {
if (other.requestFinish != null) {
return false;
}
} else if (!requestFinish.equals(other.requestFinish)) {
return false;
}
if (finished == null) {
if (other.finished != null) {
return false;
}
} else if (!finished.equals(other.finished)) {
return false;
}
if (id == null) {
if (other.id != null) {
return false;
}
} else if (!id.equals(other.id)) {
return false;
}
if (message == null) {
if (other.message != null) {
return false;
}
} else if (!message.equals(other.message)) {
return false;
}
if (expiresAt == null) {
if (other.expiresAt != null) {
return false;
}
} else if (!expiresAt.equals(other.expiresAt)) {
return false;
}
return true;
}
/**/
public String debug() {
StringBuilder sb = new StringBuilder();
{
sb.append(" lastSeen= ");
Object o = lastSeen;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" otherId= ");
Object o = otherId;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" maxProgress= ");
Object o = maxProgress;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" progress= ");
Object o = progress;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" requestFinish= ");
Object o = requestFinish;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" finished= ");
Object o = finished;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" id= ");
Object o = id;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" message= ");
Object o = message;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
{
sb.append(" expiresAt= ");
Object o = expiresAt;
if (o != null) {
if (o instanceof java.util.Collection) {
sb.append("{ ");
for (Object oo : (java.util.Collection>) o) {
if (oo == null) sb.append("null");
else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
else sb.append(oo.toString()).append(", ");
}
sb.append(" } ");
} else {
if (o instanceof Debugable) sb.append(((Debugable) o).debug());
else sb.append(o.toString());
}
}
}
return sb.append("\n").toString();
}
@Override
public String getStoragePath() {
// Add key fields
return new RaptureActivityPathBuilder()
.id(getId())
.buildStoragePath();
}
@Override
public RaptureURI getStorageLocation() {
return new RaptureActivityPathBuilder()
.id(getId())
.buildStorageLocation();
}
@Override
public String toString() {
return JacksonUtil.jsonFromObject(this);
}
private ApiVersion _raptureVersion;
@JsonProperty("_raptureVersion")
public ApiVersion get_raptureVersion() {
return _raptureVersion;
}
@JsonProperty("_raptureVersion")
public void set_raptureVersion(ApiVersion _raptureVersion) {
this._raptureVersion = _raptureVersion;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy