/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package com.dgrid.gen;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
import com.facebook.thrift.*;
import com.facebook.thrift.protocol.*;
import com.facebook.thrift.transport.*;
public class JobletResult implements TBase, java.io.Serializable {
private int id;
private long timeCreated;
private int returnCode;
private long walltime;
private int status;
private String details;
private Joblet joblet;
public final Isset __isset = new Isset();
public static final class Isset implements java.io.Serializable {
public boolean id = false;
public boolean timeCreated = false;
public boolean returnCode = false;
public boolean walltime = false;
public boolean status = false;
public boolean details = false;
public boolean joblet = false;
}
public JobletResult() {
}
public JobletResult(
int id,
long timeCreated,
int returnCode,
long walltime,
int status,
String details,
Joblet joblet)
{
this();
this.id = id;
this.__isset.id = true;
this.timeCreated = timeCreated;
this.__isset.timeCreated = true;
this.returnCode = returnCode;
this.__isset.returnCode = true;
this.walltime = walltime;
this.__isset.walltime = true;
this.status = status;
this.__isset.status = true;
this.details = details;
this.__isset.details = true;
this.joblet = joblet;
this.__isset.joblet = true;
}
public int getId() {
return this.id;
}
public void setId(int id) {
this.id = id;
this.__isset.id = true;
}
public void unsetId() {
this.__isset.id = false;
}
public long getTimeCreated() {
return this.timeCreated;
}
public void setTimeCreated(long timeCreated) {
this.timeCreated = timeCreated;
this.__isset.timeCreated = true;
}
public void unsetTimeCreated() {
this.__isset.timeCreated = false;
}
public int getReturnCode() {
return this.returnCode;
}
public void setReturnCode(int returnCode) {
this.returnCode = returnCode;
this.__isset.returnCode = true;
}
public void unsetReturnCode() {
this.__isset.returnCode = false;
}
public long getWalltime() {
return this.walltime;
}
public void setWalltime(long walltime) {
this.walltime = walltime;
this.__isset.walltime = true;
}
public void unsetWalltime() {
this.__isset.walltime = false;
}
public int getStatus() {
return this.status;
}
public void setStatus(int status) {
this.status = status;
this.__isset.status = true;
}
public void unsetStatus() {
this.__isset.status = false;
}
public String getDetails() {
return this.details;
}
public void setDetails(String details) {
this.details = details;
this.__isset.details = true;
}
public void unsetDetails() {
this.__isset.details = false;
}
public Joblet getJoblet() {
return this.joblet;
}
public void setJoblet(Joblet joblet) {
this.joblet = joblet;
this.__isset.joblet = true;
}
public void unsetJoblet() {
this.joblet = null;
this.__isset.joblet = false;
}
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof JobletResult)
return this.equals((JobletResult)that);
return false;
}
public boolean equals(JobletResult that) {
if (that == null)
return false;
boolean this_present_id = true;
boolean that_present_id = true;
if (this_present_id || that_present_id) {
if (!(this_present_id && that_present_id))
return false;
if (this.id != that.id)
return false;
}
boolean this_present_timeCreated = true;
boolean that_present_timeCreated = true;
if (this_present_timeCreated || that_present_timeCreated) {
if (!(this_present_timeCreated && that_present_timeCreated))
return false;
if (this.timeCreated != that.timeCreated)
return false;
}
boolean this_present_returnCode = true;
boolean that_present_returnCode = true;
if (this_present_returnCode || that_present_returnCode) {
if (!(this_present_returnCode && that_present_returnCode))
return false;
if (this.returnCode != that.returnCode)
return false;
}
boolean this_present_walltime = true;
boolean that_present_walltime = true;
if (this_present_walltime || that_present_walltime) {
if (!(this_present_walltime && that_present_walltime))
return false;
if (this.walltime != that.walltime)
return false;
}
boolean this_present_status = true;
boolean that_present_status = true;
if (this_present_status || that_present_status) {
if (!(this_present_status && that_present_status))
return false;
if (this.status != that.status)
return false;
}
boolean this_present_details = true && (this.details != null);
boolean that_present_details = true && (that.details != null);
if (this_present_details || that_present_details) {
if (!(this_present_details && that_present_details))
return false;
if (!this.details.equals(that.details))
return false;
}
boolean this_present_joblet = true && (this.joblet != null);
boolean that_present_joblet = true && (that.joblet != null);
if (this_present_joblet || that_present_joblet) {
if (!(this_present_joblet && that_present_joblet))
return false;
if (!this.joblet.equals(that.joblet))
return false;
}
return true;
}
public int hashCode() {
return 0;
}
public void read(TProtocol iprot) throws TException {
TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case 1:
if (field.type == TType.I32) {
this.id = iprot.readI32();
this.__isset.id = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 2:
if (field.type == TType.I64) {
this.timeCreated = iprot.readI64();
this.__isset.timeCreated = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 3:
if (field.type == TType.I32) {
this.returnCode = iprot.readI32();
this.__isset.returnCode = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 4:
if (field.type == TType.I64) {
this.walltime = iprot.readI64();
this.__isset.walltime = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 5:
if (field.type == TType.I32) {
this.status = iprot.readI32();
this.__isset.status = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 6:
if (field.type == TType.STRING) {
this.details = iprot.readString();
this.__isset.details = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case 7:
if (field.type == TType.STRUCT) {
this.joblet = new Joblet();
this.joblet.read(iprot);
this.__isset.joblet = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
}
public void write(TProtocol oprot) throws TException {
TStruct struct = new TStruct("JobletResult");
oprot.writeStructBegin(struct);
TField field = new TField();
field.name = "id";
field.type = TType.I32;
field.id = 1;
oprot.writeFieldBegin(field);
oprot.writeI32(this.id);
oprot.writeFieldEnd();
field.name = "timeCreated";
field.type = TType.I64;
field.id = 2;
oprot.writeFieldBegin(field);
oprot.writeI64(this.timeCreated);
oprot.writeFieldEnd();
field.name = "returnCode";
field.type = TType.I32;
field.id = 3;
oprot.writeFieldBegin(field);
oprot.writeI32(this.returnCode);
oprot.writeFieldEnd();
field.name = "walltime";
field.type = TType.I64;
field.id = 4;
oprot.writeFieldBegin(field);
oprot.writeI64(this.walltime);
oprot.writeFieldEnd();
field.name = "status";
field.type = TType.I32;
field.id = 5;
oprot.writeFieldBegin(field);
oprot.writeI32(this.status);
oprot.writeFieldEnd();
if (this.details != null) {
field.name = "details";
field.type = TType.STRING;
field.id = 6;
oprot.writeFieldBegin(field);
oprot.writeString(this.details);
oprot.writeFieldEnd();
}
if (this.joblet != null) {
field.name = "joblet";
field.type = TType.STRUCT;
field.id = 7;
oprot.writeFieldBegin(field);
this.joblet.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
public String toString() {
StringBuilder sb = new StringBuilder("JobletResult(");
sb.append("id:");
sb.append(this.id);
sb.append(",timeCreated:");
sb.append(this.timeCreated);
sb.append(",returnCode:");
sb.append(this.returnCode);
sb.append(",walltime:");
sb.append(this.walltime);
sb.append(",status:");
sb.append(this.status);
sb.append(",details:");
sb.append(this.details);
sb.append(",joblet:");
sb.append(this.joblet);
sb.append(")");
return sb.toString();
}
}