rapture.common.JobLinkStatus 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;
/**
*
**/
@SuppressWarnings("all")
public class JobLinkStatus implements RaptureTransferObject, Debugable ,Storable {
/*
* Start of field 'from' (String)
*/
private String from;
@JsonProperty("from")
public String getFrom() {
return from;
}
@JsonProperty("from")
public void setFrom(String from) {
this.from = from ;
}
/*
* end of field 'from' (String)
*/
/*
* Start of field 'to' (String)
*/
private String to;
@JsonProperty("to")
public String getTo() {
return to;
}
@JsonProperty("to")
public void setTo(String to) {
this.to = to ;
}
/*
* end of field 'to' (String)
*/
/*
* Start of field 'level' (Integer)
*/
private Integer level;
@JsonProperty("level")
public Integer getLevel() {
return level;
}
@JsonProperty("level")
public void setLevel(Integer level) {
this.level = level ;
}
/*
* end of field 'level' (Integer)
*/
/*
* Start of field 'lastChange' (Date)
*/
private Date lastChange;
@JsonProperty("lastChange")
public Date getLastChange() {
return lastChange;
}
@JsonProperty("lastChange")
public void setLastChange(Date lastChange) {
this.lastChange = lastChange ;
}
/*
* end of field 'lastChange' (Date)
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((level == null) ? 0 : level.hashCode());
result = prime * result + ((lastChange == null) ? 0 : lastChange.hashCode());
result = prime * result + ((from == null) ? 0 : from.hashCode());
result = prime * result + ((to == null) ? 0 : to.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;
JobLinkStatus other = (JobLinkStatus) obj;
if (level == null) {
if (other.level != null) {
return false;
}
} else if (!level.equals(other.level)) {
return false;
}
if (lastChange == null) {
if (other.lastChange != null) {
return false;
}
} else if (!lastChange.equals(other.lastChange)) {
return false;
}
if (from == null) {
if (other.from != null) {
return false;
}
} else if (!from.equals(other.from)) {
return false;
}
if (to == null) {
if (other.to != null) {
return false;
}
} else if (!to.equals(other.to)) {
return false;
}
return true;
}
/**/
public String debug() {
StringBuilder sb = new StringBuilder();
{
sb.append(" level= ");
Object o = level;
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(" lastChange= ");
Object o = lastChange;
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(" from= ");
Object o = from;
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(" to= ");
Object o = to;
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 JobLinkStatusPathBuilder()
.to(getTo())
.from(getFrom())
.buildStoragePath();
}
@Override
public RaptureURI getStorageLocation() {
return new JobLinkStatusPathBuilder()
.to(getTo())
.from(getFrom())
.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