com.xiaomi.infra.galaxy.emr.thrift.Timeline Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.xiaomi.infra.galaxy.emr.thrift;
import libthrift091.scheme.IScheme;
import libthrift091.scheme.SchemeFactory;
import libthrift091.scheme.StandardScheme;
import libthrift091.scheme.TupleScheme;
import libthrift091.protocol.TTupleProtocol;
import libthrift091.protocol.TProtocolException;
import libthrift091.EncodingUtils;
import libthrift091.TException;
import libthrift091.async.AsyncMethodCallback;
import libthrift091.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-8-2")
public class Timeline implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("Timeline");
private static final libthrift091.protocol.TField CREATION_TIME_FIELD_DESC = new libthrift091.protocol.TField("creationTime", libthrift091.protocol.TType.I32, (short)1);
private static final libthrift091.protocol.TField READY_TIME_FIELD_DESC = new libthrift091.protocol.TField("readyTime", libthrift091.protocol.TType.I32, (short)2);
private static final libthrift091.protocol.TField END_TIME_FIELD_DESC = new libthrift091.protocol.TField("endTime", libthrift091.protocol.TType.I32, (short)3);
private static final libthrift091.protocol.TField DEL_TIME_FIELD_DESC = new libthrift091.protocol.TField("delTime", libthrift091.protocol.TType.I32, (short)4);
private static final libthrift091.protocol.TField LAST_FAIL_OVER_TIME_FIELD_DESC = new libthrift091.protocol.TField("lastFailOverTime", libthrift091.protocol.TType.I32, (short)5);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TimelineStandardSchemeFactory());
schemes.put(TupleScheme.class, new TimelineTupleSchemeFactory());
}
public int creationTime; // optional
public int readyTime; // optional
public int endTime; // optional
public int delTime; // optional
public int lastFailOverTime; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
CREATION_TIME((short)1, "creationTime"),
READY_TIME((short)2, "readyTime"),
END_TIME((short)3, "endTime"),
DEL_TIME((short)4, "delTime"),
LAST_FAIL_OVER_TIME((short)5, "lastFailOverTime");
private static final Map byName = new HashMap();
static {
for (_Fields field : 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: // CREATION_TIME
return CREATION_TIME;
case 2: // READY_TIME
return READY_TIME;
case 3: // END_TIME
return END_TIME;
case 4: // DEL_TIME
return DEL_TIME;
case 5: // LAST_FAIL_OVER_TIME
return LAST_FAIL_OVER_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 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(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __CREATIONTIME_ISSET_ID = 0;
private static final int __READYTIME_ISSET_ID = 1;
private static final int __ENDTIME_ISSET_ID = 2;
private static final int __DELTIME_ISSET_ID = 3;
private static final int __LASTFAILOVERTIME_ISSET_ID = 4;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.CREATION_TIME,_Fields.READY_TIME,_Fields.END_TIME,_Fields.DEL_TIME,_Fields.LAST_FAIL_OVER_TIME};
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CREATION_TIME, new libthrift091.meta_data.FieldMetaData("creationTime", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
tmpMap.put(_Fields.READY_TIME, new libthrift091.meta_data.FieldMetaData("readyTime", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
tmpMap.put(_Fields.END_TIME, new libthrift091.meta_data.FieldMetaData("endTime", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
tmpMap.put(_Fields.DEL_TIME, new libthrift091.meta_data.FieldMetaData("delTime", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
tmpMap.put(_Fields.LAST_FAIL_OVER_TIME, new libthrift091.meta_data.FieldMetaData("lastFailOverTime", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(Timeline.class, metaDataMap);
}
public Timeline() {
this.creationTime = 0;
this.readyTime = 0;
this.endTime = 0;
this.delTime = 0;
this.lastFailOverTime = 0;
}
/**
* Performs a deep copy on other.
*/
public Timeline(Timeline other) {
__isset_bitfield = other.__isset_bitfield;
this.creationTime = other.creationTime;
this.readyTime = other.readyTime;
this.endTime = other.endTime;
this.delTime = other.delTime;
this.lastFailOverTime = other.lastFailOverTime;
}
public Timeline deepCopy() {
return new Timeline(this);
}
@Override
public void clear() {
this.creationTime = 0;
this.readyTime = 0;
this.endTime = 0;
this.delTime = 0;
this.lastFailOverTime = 0;
}
public int getCreationTime() {
return this.creationTime;
}
public Timeline setCreationTime(int creationTime) {
this.creationTime = creationTime;
setCreationTimeIsSet(true);
return this;
}
public void unsetCreationTime() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
}
/** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
public boolean isSetCreationTime() {
return EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
}
public void setCreationTimeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
}
public int getReadyTime() {
return this.readyTime;
}
public Timeline setReadyTime(int readyTime) {
this.readyTime = readyTime;
setReadyTimeIsSet(true);
return this;
}
public void unsetReadyTime() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __READYTIME_ISSET_ID);
}
/** Returns true if field readyTime is set (has been assigned a value) and false otherwise */
public boolean isSetReadyTime() {
return EncodingUtils.testBit(__isset_bitfield, __READYTIME_ISSET_ID);
}
public void setReadyTimeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __READYTIME_ISSET_ID, value);
}
public int getEndTime() {
return this.endTime;
}
public Timeline setEndTime(int endTime) {
this.endTime = endTime;
setEndTimeIsSet(true);
return this;
}
public void unsetEndTime() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
/** Returns true if field endTime is set (has been assigned a value) and false otherwise */
public boolean isSetEndTime() {
return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
public void setEndTimeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
}
public int getDelTime() {
return this.delTime;
}
public Timeline setDelTime(int delTime) {
this.delTime = delTime;
setDelTimeIsSet(true);
return this;
}
public void unsetDelTime() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELTIME_ISSET_ID);
}
/** Returns true if field delTime is set (has been assigned a value) and false otherwise */
public boolean isSetDelTime() {
return EncodingUtils.testBit(__isset_bitfield, __DELTIME_ISSET_ID);
}
public void setDelTimeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELTIME_ISSET_ID, value);
}
public int getLastFailOverTime() {
return this.lastFailOverTime;
}
public Timeline setLastFailOverTime(int lastFailOverTime) {
this.lastFailOverTime = lastFailOverTime;
setLastFailOverTimeIsSet(true);
return this;
}
public void unsetLastFailOverTime() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTFAILOVERTIME_ISSET_ID);
}
/** Returns true if field lastFailOverTime is set (has been assigned a value) and false otherwise */
public boolean isSetLastFailOverTime() {
return EncodingUtils.testBit(__isset_bitfield, __LASTFAILOVERTIME_ISSET_ID);
}
public void setLastFailOverTimeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTFAILOVERTIME_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CREATION_TIME:
if (value == null) {
unsetCreationTime();
} else {
setCreationTime((Integer)value);
}
break;
case READY_TIME:
if (value == null) {
unsetReadyTime();
} else {
setReadyTime((Integer)value);
}
break;
case END_TIME:
if (value == null) {
unsetEndTime();
} else {
setEndTime((Integer)value);
}
break;
case DEL_TIME:
if (value == null) {
unsetDelTime();
} else {
setDelTime((Integer)value);
}
break;
case LAST_FAIL_OVER_TIME:
if (value == null) {
unsetLastFailOverTime();
} else {
setLastFailOverTime((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CREATION_TIME:
return Integer.valueOf(getCreationTime());
case READY_TIME:
return Integer.valueOf(getReadyTime());
case END_TIME:
return Integer.valueOf(getEndTime());
case DEL_TIME:
return Integer.valueOf(getDelTime());
case LAST_FAIL_OVER_TIME:
return Integer.valueOf(getLastFailOverTime());
}
throw new 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 IllegalArgumentException();
}
switch (field) {
case CREATION_TIME:
return isSetCreationTime();
case READY_TIME:
return isSetReadyTime();
case END_TIME:
return isSetEndTime();
case DEL_TIME:
return isSetDelTime();
case LAST_FAIL_OVER_TIME:
return isSetLastFailOverTime();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof Timeline)
return this.equals((Timeline)that);
return false;
}
public boolean equals(Timeline that) {
if (that == null)
return false;
boolean this_present_creationTime = true && this.isSetCreationTime();
boolean that_present_creationTime = true && that.isSetCreationTime();
if (this_present_creationTime || that_present_creationTime) {
if (!(this_present_creationTime && that_present_creationTime))
return false;
if (this.creationTime != that.creationTime)
return false;
}
boolean this_present_readyTime = true && this.isSetReadyTime();
boolean that_present_readyTime = true && that.isSetReadyTime();
if (this_present_readyTime || that_present_readyTime) {
if (!(this_present_readyTime && that_present_readyTime))
return false;
if (this.readyTime != that.readyTime)
return false;
}
boolean this_present_endTime = true && this.isSetEndTime();
boolean that_present_endTime = true && that.isSetEndTime();
if (this_present_endTime || that_present_endTime) {
if (!(this_present_endTime && that_present_endTime))
return false;
if (this.endTime != that.endTime)
return false;
}
boolean this_present_delTime = true && this.isSetDelTime();
boolean that_present_delTime = true && that.isSetDelTime();
if (this_present_delTime || that_present_delTime) {
if (!(this_present_delTime && that_present_delTime))
return false;
if (this.delTime != that.delTime)
return false;
}
boolean this_present_lastFailOverTime = true && this.isSetLastFailOverTime();
boolean that_present_lastFailOverTime = true && that.isSetLastFailOverTime();
if (this_present_lastFailOverTime || that_present_lastFailOverTime) {
if (!(this_present_lastFailOverTime && that_present_lastFailOverTime))
return false;
if (this.lastFailOverTime != that.lastFailOverTime)
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy