blob: c90a9178b07ec7a7d5d5b259b746b9454d4aae82 [file] [log] [blame]
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.model.status;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class QueueStatusModel implements org.apache.thrift.TBase<QueueStatusModel, QueueStatusModel._Fields>, java.io.Serializable, Cloneable, Comparable<QueueStatusModel> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("QueueStatusModel");
private static final org.apache.thrift.protocol.TField HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField QUEUE_UP_FIELD_DESC = new org.apache.thrift.protocol.TField("queueUp", org.apache.thrift.protocol.TType.BOOL, (short)3);
private static final org.apache.thrift.protocol.TField RUNNING_JOBS_FIELD_DESC = new org.apache.thrift.protocol.TField("runningJobs", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField QUEUED_JOBS_FIELD_DESC = new org.apache.thrift.protocol.TField("queuedJobs", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new QueueStatusModelStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new QueueStatusModelTupleSchemeFactory();
private java.lang.String hostName; // required
private java.lang.String queueName; // required
private boolean queueUp; // required
private int runningJobs; // required
private int queuedJobs; // required
private long time; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
HOST_NAME((short)1, "hostName"),
QUEUE_NAME((short)2, "queueName"),
QUEUE_UP((short)3, "queueUp"),
RUNNING_JOBS((short)4, "runningJobs"),
QUEUED_JOBS((short)5, "queuedJobs"),
TIME((short)6, "time");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // HOST_NAME
return HOST_NAME;
case 2: // QUEUE_NAME
return QUEUE_NAME;
case 3: // QUEUE_UP
return QUEUE_UP;
case 4: // RUNNING_JOBS
return RUNNING_JOBS;
case 5: // QUEUED_JOBS
return QUEUED_JOBS;
case 6: // TIME
return TIME;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __QUEUEUP_ISSET_ID = 0;
private static final int __RUNNINGJOBS_ISSET_ID = 1;
private static final int __QUEUEDJOBS_ISSET_ID = 2;
private static final int __TIME_ISSET_ID = 3;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("hostName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queueName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.QUEUE_UP, new org.apache.thrift.meta_data.FieldMetaData("queueUp", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.RUNNING_JOBS, new org.apache.thrift.meta_data.FieldMetaData("runningJobs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.QUEUED_JOBS, new org.apache.thrift.meta_data.FieldMetaData("queuedJobs", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(QueueStatusModel.class, metaDataMap);
}
public QueueStatusModel() {
}
public QueueStatusModel(
java.lang.String hostName,
java.lang.String queueName,
boolean queueUp,
int runningJobs,
int queuedJobs,
long time)
{
this();
this.hostName = hostName;
this.queueName = queueName;
this.queueUp = queueUp;
setQueueUpIsSet(true);
this.runningJobs = runningJobs;
setRunningJobsIsSet(true);
this.queuedJobs = queuedJobs;
setQueuedJobsIsSet(true);
this.time = time;
setTimeIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public QueueStatusModel(QueueStatusModel other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetHostName()) {
this.hostName = other.hostName;
}
if (other.isSetQueueName()) {
this.queueName = other.queueName;
}
this.queueUp = other.queueUp;
this.runningJobs = other.runningJobs;
this.queuedJobs = other.queuedJobs;
this.time = other.time;
}
public QueueStatusModel deepCopy() {
return new QueueStatusModel(this);
}
@Override
public void clear() {
this.hostName = null;
this.queueName = null;
setQueueUpIsSet(false);
this.queueUp = false;
setRunningJobsIsSet(false);
this.runningJobs = 0;
setQueuedJobsIsSet(false);
this.queuedJobs = 0;
setTimeIsSet(false);
this.time = 0;
}
public java.lang.String getHostName() {
return this.hostName;
}
public void setHostName(java.lang.String hostName) {
this.hostName = hostName;
}
public void unsetHostName() {
this.hostName = null;
}
/** Returns true if field hostName is set (has been assigned a value) and false otherwise */
public boolean isSetHostName() {
return this.hostName != null;
}
public void setHostNameIsSet(boolean value) {
if (!value) {
this.hostName = null;
}
}
public java.lang.String getQueueName() {
return this.queueName;
}
public void setQueueName(java.lang.String queueName) {
this.queueName = queueName;
}
public void unsetQueueName() {
this.queueName = null;
}
/** Returns true if field queueName is set (has been assigned a value) and false otherwise */
public boolean isSetQueueName() {
return this.queueName != null;
}
public void setQueueNameIsSet(boolean value) {
if (!value) {
this.queueName = null;
}
}
public boolean isQueueUp() {
return this.queueUp;
}
public void setQueueUp(boolean queueUp) {
this.queueUp = queueUp;
setQueueUpIsSet(true);
}
public void unsetQueueUp() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUEUEUP_ISSET_ID);
}
/** Returns true if field queueUp is set (has been assigned a value) and false otherwise */
public boolean isSetQueueUp() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUEUEUP_ISSET_ID);
}
public void setQueueUpIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUEUEUP_ISSET_ID, value);
}
public int getRunningJobs() {
return this.runningJobs;
}
public void setRunningJobs(int runningJobs) {
this.runningJobs = runningJobs;
setRunningJobsIsSet(true);
}
public void unsetRunningJobs() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RUNNINGJOBS_ISSET_ID);
}
/** Returns true if field runningJobs is set (has been assigned a value) and false otherwise */
public boolean isSetRunningJobs() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RUNNINGJOBS_ISSET_ID);
}
public void setRunningJobsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RUNNINGJOBS_ISSET_ID, value);
}
public int getQueuedJobs() {
return this.queuedJobs;
}
public void setQueuedJobs(int queuedJobs) {
this.queuedJobs = queuedJobs;
setQueuedJobsIsSet(true);
}
public void unsetQueuedJobs() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUEUEDJOBS_ISSET_ID);
}
/** Returns true if field queuedJobs is set (has been assigned a value) and false otherwise */
public boolean isSetQueuedJobs() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUEUEDJOBS_ISSET_ID);
}
public void setQueuedJobsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUEUEDJOBS_ISSET_ID, value);
}
public long getTime() {
return this.time;
}
public void setTime(long time) {
this.time = time;
setTimeIsSet(true);
}
public void unsetTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIME_ISSET_ID);
}
/** Returns true if field time is set (has been assigned a value) and false otherwise */
public boolean isSetTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIME_ISSET_ID);
}
public void setTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIME_ISSET_ID, value);
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case HOST_NAME:
if (value == null) {
unsetHostName();
} else {
setHostName((java.lang.String)value);
}
break;
case QUEUE_NAME:
if (value == null) {
unsetQueueName();
} else {
setQueueName((java.lang.String)value);
}
break;
case QUEUE_UP:
if (value == null) {
unsetQueueUp();
} else {
setQueueUp((java.lang.Boolean)value);
}
break;
case RUNNING_JOBS:
if (value == null) {
unsetRunningJobs();
} else {
setRunningJobs((java.lang.Integer)value);
}
break;
case QUEUED_JOBS:
if (value == null) {
unsetQueuedJobs();
} else {
setQueuedJobs((java.lang.Integer)value);
}
break;
case TIME:
if (value == null) {
unsetTime();
} else {
setTime((java.lang.Long)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case HOST_NAME:
return getHostName();
case QUEUE_NAME:
return getQueueName();
case QUEUE_UP:
return isQueueUp();
case RUNNING_JOBS:
return getRunningJobs();
case QUEUED_JOBS:
return getQueuedJobs();
case TIME:
return getTime();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case HOST_NAME:
return isSetHostName();
case QUEUE_NAME:
return isSetQueueName();
case QUEUE_UP:
return isSetQueueUp();
case RUNNING_JOBS:
return isSetRunningJobs();
case QUEUED_JOBS:
return isSetQueuedJobs();
case TIME:
return isSetTime();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof QueueStatusModel)
return this.equals((QueueStatusModel)that);
return false;
}
public boolean equals(QueueStatusModel that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_hostName = true && this.isSetHostName();
boolean that_present_hostName = true && that.isSetHostName();
if (this_present_hostName || that_present_hostName) {
if (!(this_present_hostName && that_present_hostName))
return false;
if (!this.hostName.equals(that.hostName))
return false;
}
boolean this_present_queueName = true && this.isSetQueueName();
boolean that_present_queueName = true && that.isSetQueueName();
if (this_present_queueName || that_present_queueName) {
if (!(this_present_queueName && that_present_queueName))
return false;
if (!this.queueName.equals(that.queueName))
return false;
}
boolean this_present_queueUp = true;
boolean that_present_queueUp = true;
if (this_present_queueUp || that_present_queueUp) {
if (!(this_present_queueUp && that_present_queueUp))
return false;
if (this.queueUp != that.queueUp)
return false;
}
boolean this_present_runningJobs = true;
boolean that_present_runningJobs = true;
if (this_present_runningJobs || that_present_runningJobs) {
if (!(this_present_runningJobs && that_present_runningJobs))
return false;
if (this.runningJobs != that.runningJobs)
return false;
}
boolean this_present_queuedJobs = true;
boolean that_present_queuedJobs = true;
if (this_present_queuedJobs || that_present_queuedJobs) {
if (!(this_present_queuedJobs && that_present_queuedJobs))
return false;
if (this.queuedJobs != that.queuedJobs)
return false;
}
boolean this_present_time = true;
boolean that_present_time = true;
if (this_present_time || that_present_time) {
if (!(this_present_time && that_present_time))
return false;
if (this.time != that.time)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetHostName()) ? 131071 : 524287);
if (isSetHostName())
hashCode = hashCode * 8191 + hostName.hashCode();
hashCode = hashCode * 8191 + ((isSetQueueName()) ? 131071 : 524287);
if (isSetQueueName())
hashCode = hashCode * 8191 + queueName.hashCode();
hashCode = hashCode * 8191 + ((queueUp) ? 131071 : 524287);
hashCode = hashCode * 8191 + runningJobs;
hashCode = hashCode * 8191 + queuedJobs;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(time);
return hashCode;
}
@Override
public int compareTo(QueueStatusModel other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetHostName()).compareTo(other.isSetHostName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHostName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostName, other.hostName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueueName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueName, other.queueName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetQueueUp()).compareTo(other.isSetQueueUp());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueueUp()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueUp, other.queueUp);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetRunningJobs()).compareTo(other.isSetRunningJobs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRunningJobs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runningJobs, other.runningJobs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetQueuedJobs()).compareTo(other.isSetQueuedJobs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueuedJobs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queuedJobs, other.queuedJobs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetTime()).compareTo(other.isSetTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time, other.time);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("QueueStatusModel(");
boolean first = true;
sb.append("hostName:");
if (this.hostName == null) {
sb.append("null");
} else {
sb.append(this.hostName);
}
first = false;
if (!first) sb.append(", ");
sb.append("queueName:");
if (this.queueName == null) {
sb.append("null");
} else {
sb.append(this.queueName);
}
first = false;
if (!first) sb.append(", ");
sb.append("queueUp:");
sb.append(this.queueUp);
first = false;
if (!first) sb.append(", ");
sb.append("runningJobs:");
sb.append(this.runningJobs);
first = false;
if (!first) sb.append(", ");
sb.append("queuedJobs:");
sb.append(this.queuedJobs);
first = false;
if (!first) sb.append(", ");
sb.append("time:");
sb.append(this.time);
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (!isSetHostName()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostName' is unset! Struct:" + toString());
}
if (!isSetQueueName()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'queueName' is unset! Struct:" + toString());
}
if (!isSetQueueUp()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'queueUp' is unset! Struct:" + toString());
}
if (!isSetRunningJobs()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'runningJobs' is unset! Struct:" + toString());
}
if (!isSetQueuedJobs()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'queuedJobs' is unset! Struct:" + toString());
}
if (!isSetTime()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'time' is unset! Struct:" + toString());
}
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class QueueStatusModelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public QueueStatusModelStandardScheme getScheme() {
return new QueueStatusModelStandardScheme();
}
}
private static class QueueStatusModelStandardScheme extends org.apache.thrift.scheme.StandardScheme<QueueStatusModel> {
public void read(org.apache.thrift.protocol.TProtocol iprot, QueueStatusModel struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // HOST_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.hostName = iprot.readString();
struct.setHostNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // QUEUE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.queueName = iprot.readString();
struct.setQueueNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // QUEUE_UP
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.queueUp = iprot.readBool();
struct.setQueueUpIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // RUNNING_JOBS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.runningJobs = iprot.readI32();
struct.setRunningJobsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // QUEUED_JOBS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.queuedJobs = iprot.readI32();
struct.setQueuedJobsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.time = iprot.readI64();
struct.setTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, QueueStatusModel struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.hostName != null) {
oprot.writeFieldBegin(HOST_NAME_FIELD_DESC);
oprot.writeString(struct.hostName);
oprot.writeFieldEnd();
}
if (struct.queueName != null) {
oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
oprot.writeString(struct.queueName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(QUEUE_UP_FIELD_DESC);
oprot.writeBool(struct.queueUp);
oprot.writeFieldEnd();
oprot.writeFieldBegin(RUNNING_JOBS_FIELD_DESC);
oprot.writeI32(struct.runningJobs);
oprot.writeFieldEnd();
oprot.writeFieldBegin(QUEUED_JOBS_FIELD_DESC);
oprot.writeI32(struct.queuedJobs);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TIME_FIELD_DESC);
oprot.writeI64(struct.time);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class QueueStatusModelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public QueueStatusModelTupleScheme getScheme() {
return new QueueStatusModelTupleScheme();
}
}
private static class QueueStatusModelTupleScheme extends org.apache.thrift.scheme.TupleScheme<QueueStatusModel> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, QueueStatusModel struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.hostName);
oprot.writeString(struct.queueName);
oprot.writeBool(struct.queueUp);
oprot.writeI32(struct.runningJobs);
oprot.writeI32(struct.queuedJobs);
oprot.writeI64(struct.time);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, QueueStatusModel struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.hostName = iprot.readString();
struct.setHostNameIsSet(true);
struct.queueName = iprot.readString();
struct.setQueueNameIsSet(true);
struct.queueUp = iprot.readBool();
struct.setQueueUpIsSet(true);
struct.runningJobs = iprot.readI32();
struct.setRunningJobsIsSet(true);
struct.queuedJobs = iprot.readI32();
struct.setQueuedJobsIsSet(true);
struct.time = iprot.readI64();
struct.setTimeIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}