Blame | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift Compiler (0.7.0)** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING*/package in.shop2020.content;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 org.slf4j.Logger;import org.slf4j.LoggerFactory;public class BulkContentUpload implements org.apache.thrift.TBase<BulkContentUpload, BulkContentUpload._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BulkContentUpload");private static final org.apache.thrift.protocol.TField NEW_ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("new_entity_id", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField CATEGORY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("category_id", org.apache.thrift.protocol.TType.I64, (short)2);private static final org.apache.thrift.protocol.TField COMPATIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("compatibility", org.apache.thrift.protocol.TType.STRING, (short)3);private static final org.apache.thrift.protocol.TField BATTERY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("battery_type", org.apache.thrift.protocol.TType.I32, (short)4);private static final org.apache.thrift.protocol.TField BATTERY_CAPACITY_FIELD_DESC = new org.apache.thrift.protocol.TField("battery_capacity", org.apache.thrift.protocol.TType.STRING, (short)5);private static final org.apache.thrift.protocol.TField SUMMARY_FIELD_DESC = new org.apache.thrift.protocol.TField("summary", org.apache.thrift.protocol.TType.STRING, (short)6);private static final org.apache.thrift.protocol.TField EXISTING_ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("existing_entity_id", org.apache.thrift.protocol.TType.I64, (short)7);private static final org.apache.thrift.protocol.TField BRAND_FIELD_DESC = new org.apache.thrift.protocol.TField("brand", org.apache.thrift.protocol.TType.STRING, (short)8);private static final org.apache.thrift.protocol.TField MODEL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("model_name", org.apache.thrift.protocol.TType.STRING, (short)9);private static final org.apache.thrift.protocol.TField MODEL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("model_number", org.apache.thrift.protocol.TType.STRING, (short)10);private long new_entity_id; // requiredprivate long category_id; // requiredprivate String compatibility; // requiredprivate int battery_type; // requiredprivate String battery_capacity; // requiredprivate String summary; // requiredprivate long existing_entity_id; // requiredprivate String brand; // requiredprivate String model_name; // requiredprivate String model_number; // 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 {NEW_ENTITY_ID((short)1, "new_entity_id"),CATEGORY_ID((short)2, "category_id"),COMPATIBILITY((short)3, "compatibility"),BATTERY_TYPE((short)4, "battery_type"),BATTERY_CAPACITY((short)5, "battery_capacity"),SUMMARY((short)6, "summary"),EXISTING_ENTITY_ID((short)7, "existing_entity_id"),BRAND((short)8, "brand"),MODEL_NAME((short)9, "model_name"),MODEL_NUMBER((short)10, "model_number");private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();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: // NEW_ENTITY_IDreturn NEW_ENTITY_ID;case 2: // CATEGORY_IDreturn CATEGORY_ID;case 3: // COMPATIBILITYreturn COMPATIBILITY;case 4: // BATTERY_TYPEreturn BATTERY_TYPE;case 5: // BATTERY_CAPACITYreturn BATTERY_CAPACITY;case 6: // SUMMARYreturn SUMMARY;case 7: // EXISTING_ENTITY_IDreturn EXISTING_ENTITY_ID;case 8: // BRANDreturn BRAND;case 9: // MODEL_NAMEreturn MODEL_NAME;case 10: // MODEL_NUMBERreturn MODEL_NUMBER;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 assignmentsprivate static final int __NEW_ENTITY_ID_ISSET_ID = 0;private static final int __CATEGORY_ID_ISSET_ID = 1;private static final int __BATTERY_TYPE_ISSET_ID = 2;private static final int __EXISTING_ENTITY_ID_ISSET_ID = 3;private BitSet __isset_bit_vector = new BitSet(4);public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;static {Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);tmpMap.put(_Fields.NEW_ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("new_entity_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.CATEGORY_ID, new org.apache.thrift.meta_data.FieldMetaData("category_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.COMPATIBILITY, new org.apache.thrift.meta_data.FieldMetaData("compatibility", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.BATTERY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("battery_type", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));tmpMap.put(_Fields.BATTERY_CAPACITY, new org.apache.thrift.meta_data.FieldMetaData("battery_capacity", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SUMMARY, new org.apache.thrift.meta_data.FieldMetaData("summary", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.EXISTING_ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("existing_entity_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.BRAND, new org.apache.thrift.meta_data.FieldMetaData("brand", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.MODEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("model_name", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.MODEL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("model_number", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BulkContentUpload.class, metaDataMap);}public BulkContentUpload() {}public BulkContentUpload(long new_entity_id,long category_id,String compatibility,int battery_type,String battery_capacity,String summary,long existing_entity_id,String brand,String model_name,String model_number){this();this.new_entity_id = new_entity_id;setNew_entity_idIsSet(true);this.category_id = category_id;setCategory_idIsSet(true);this.compatibility = compatibility;this.battery_type = battery_type;setBattery_typeIsSet(true);this.battery_capacity = battery_capacity;this.summary = summary;this.existing_entity_id = existing_entity_id;setExisting_entity_idIsSet(true);this.brand = brand;this.model_name = model_name;this.model_number = model_number;}/*** Performs a deep copy on <i>other</i>.*/public BulkContentUpload(BulkContentUpload other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.new_entity_id = other.new_entity_id;this.category_id = other.category_id;if (other.isSetCompatibility()) {this.compatibility = other.compatibility;}this.battery_type = other.battery_type;if (other.isSetBattery_capacity()) {this.battery_capacity = other.battery_capacity;}if (other.isSetSummary()) {this.summary = other.summary;}this.existing_entity_id = other.existing_entity_id;if (other.isSetBrand()) {this.brand = other.brand;}if (other.isSetModel_name()) {this.model_name = other.model_name;}if (other.isSetModel_number()) {this.model_number = other.model_number;}}public BulkContentUpload deepCopy() {return new BulkContentUpload(this);}@Overridepublic void clear() {setNew_entity_idIsSet(false);this.new_entity_id = 0;setCategory_idIsSet(false);this.category_id = 0;this.compatibility = null;setBattery_typeIsSet(false);this.battery_type = 0;this.battery_capacity = null;this.summary = null;setExisting_entity_idIsSet(false);this.existing_entity_id = 0;this.brand = null;this.model_name = null;this.model_number = null;}public long getNew_entity_id() {return this.new_entity_id;}public void setNew_entity_id(long new_entity_id) {this.new_entity_id = new_entity_id;setNew_entity_idIsSet(true);}public void unsetNew_entity_id() {__isset_bit_vector.clear(__NEW_ENTITY_ID_ISSET_ID);}/** Returns true if field new_entity_id is set (has been assigned a value) and false otherwise */public boolean isSetNew_entity_id() {return __isset_bit_vector.get(__NEW_ENTITY_ID_ISSET_ID);}public void setNew_entity_idIsSet(boolean value) {__isset_bit_vector.set(__NEW_ENTITY_ID_ISSET_ID, value);}public long getCategory_id() {return this.category_id;}public void setCategory_id(long category_id) {this.category_id = category_id;setCategory_idIsSet(true);}public void unsetCategory_id() {__isset_bit_vector.clear(__CATEGORY_ID_ISSET_ID);}/** Returns true if field category_id is set (has been assigned a value) and false otherwise */public boolean isSetCategory_id() {return __isset_bit_vector.get(__CATEGORY_ID_ISSET_ID);}public void setCategory_idIsSet(boolean value) {__isset_bit_vector.set(__CATEGORY_ID_ISSET_ID, value);}public String getCompatibility() {return this.compatibility;}public void setCompatibility(String compatibility) {this.compatibility = compatibility;}public void unsetCompatibility() {this.compatibility = null;}/** Returns true if field compatibility is set (has been assigned a value) and false otherwise */public boolean isSetCompatibility() {return this.compatibility != null;}public void setCompatibilityIsSet(boolean value) {if (!value) {this.compatibility = null;}}public int getBattery_type() {return this.battery_type;}public void setBattery_type(int battery_type) {this.battery_type = battery_type;setBattery_typeIsSet(true);}public void unsetBattery_type() {__isset_bit_vector.clear(__BATTERY_TYPE_ISSET_ID);}/** Returns true if field battery_type is set (has been assigned a value) and false otherwise */public boolean isSetBattery_type() {return __isset_bit_vector.get(__BATTERY_TYPE_ISSET_ID);}public void setBattery_typeIsSet(boolean value) {__isset_bit_vector.set(__BATTERY_TYPE_ISSET_ID, value);}public String getBattery_capacity() {return this.battery_capacity;}public void setBattery_capacity(String battery_capacity) {this.battery_capacity = battery_capacity;}public void unsetBattery_capacity() {this.battery_capacity = null;}/** Returns true if field battery_capacity is set (has been assigned a value) and false otherwise */public boolean isSetBattery_capacity() {return this.battery_capacity != null;}public void setBattery_capacityIsSet(boolean value) {if (!value) {this.battery_capacity = null;}}public String getSummary() {return this.summary;}public void setSummary(String summary) {this.summary = summary;}public void unsetSummary() {this.summary = null;}/** Returns true if field summary is set (has been assigned a value) and false otherwise */public boolean isSetSummary() {return this.summary != null;}public void setSummaryIsSet(boolean value) {if (!value) {this.summary = null;}}public long getExisting_entity_id() {return this.existing_entity_id;}public void setExisting_entity_id(long existing_entity_id) {this.existing_entity_id = existing_entity_id;setExisting_entity_idIsSet(true);}public void unsetExisting_entity_id() {__isset_bit_vector.clear(__EXISTING_ENTITY_ID_ISSET_ID);}/** Returns true if field existing_entity_id is set (has been assigned a value) and false otherwise */public boolean isSetExisting_entity_id() {return __isset_bit_vector.get(__EXISTING_ENTITY_ID_ISSET_ID);}public void setExisting_entity_idIsSet(boolean value) {__isset_bit_vector.set(__EXISTING_ENTITY_ID_ISSET_ID, value);}public String getBrand() {return this.brand;}public void setBrand(String brand) {this.brand = brand;}public void unsetBrand() {this.brand = null;}/** Returns true if field brand is set (has been assigned a value) and false otherwise */public boolean isSetBrand() {return this.brand != null;}public void setBrandIsSet(boolean value) {if (!value) {this.brand = null;}}public String getModel_name() {return this.model_name;}public void setModel_name(String model_name) {this.model_name = model_name;}public void unsetModel_name() {this.model_name = null;}/** Returns true if field model_name is set (has been assigned a value) and false otherwise */public boolean isSetModel_name() {return this.model_name != null;}public void setModel_nameIsSet(boolean value) {if (!value) {this.model_name = null;}}public String getModel_number() {return this.model_number;}public void setModel_number(String model_number) {this.model_number = model_number;}public void unsetModel_number() {this.model_number = null;}/** Returns true if field model_number is set (has been assigned a value) and false otherwise */public boolean isSetModel_number() {return this.model_number != null;}public void setModel_numberIsSet(boolean value) {if (!value) {this.model_number = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case NEW_ENTITY_ID:if (value == null) {unsetNew_entity_id();} else {setNew_entity_id((Long)value);}break;case CATEGORY_ID:if (value == null) {unsetCategory_id();} else {setCategory_id((Long)value);}break;case COMPATIBILITY:if (value == null) {unsetCompatibility();} else {setCompatibility((String)value);}break;case BATTERY_TYPE:if (value == null) {unsetBattery_type();} else {setBattery_type((Integer)value);}break;case BATTERY_CAPACITY:if (value == null) {unsetBattery_capacity();} else {setBattery_capacity((String)value);}break;case SUMMARY:if (value == null) {unsetSummary();} else {setSummary((String)value);}break;case EXISTING_ENTITY_ID:if (value == null) {unsetExisting_entity_id();} else {setExisting_entity_id((Long)value);}break;case BRAND:if (value == null) {unsetBrand();} else {setBrand((String)value);}break;case MODEL_NAME:if (value == null) {unsetModel_name();} else {setModel_name((String)value);}break;case MODEL_NUMBER:if (value == null) {unsetModel_number();} else {setModel_number((String)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case NEW_ENTITY_ID:return Long.valueOf(getNew_entity_id());case CATEGORY_ID:return Long.valueOf(getCategory_id());case COMPATIBILITY:return getCompatibility();case BATTERY_TYPE:return Integer.valueOf(getBattery_type());case BATTERY_CAPACITY:return getBattery_capacity();case SUMMARY:return getSummary();case EXISTING_ENTITY_ID:return Long.valueOf(getExisting_entity_id());case BRAND:return getBrand();case MODEL_NAME:return getModel_name();case MODEL_NUMBER:return getModel_number();}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 NEW_ENTITY_ID:return isSetNew_entity_id();case CATEGORY_ID:return isSetCategory_id();case COMPATIBILITY:return isSetCompatibility();case BATTERY_TYPE:return isSetBattery_type();case BATTERY_CAPACITY:return isSetBattery_capacity();case SUMMARY:return isSetSummary();case EXISTING_ENTITY_ID:return isSetExisting_entity_id();case BRAND:return isSetBrand();case MODEL_NAME:return isSetModel_name();case MODEL_NUMBER:return isSetModel_number();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof BulkContentUpload)return this.equals((BulkContentUpload)that);return false;}public boolean equals(BulkContentUpload that) {if (that == null)return false;boolean this_present_new_entity_id = true;boolean that_present_new_entity_id = true;if (this_present_new_entity_id || that_present_new_entity_id) {if (!(this_present_new_entity_id && that_present_new_entity_id))return false;if (this.new_entity_id != that.new_entity_id)return false;}boolean this_present_category_id = true;boolean that_present_category_id = true;if (this_present_category_id || that_present_category_id) {if (!(this_present_category_id && that_present_category_id))return false;if (this.category_id != that.category_id)return false;}boolean this_present_compatibility = true && this.isSetCompatibility();boolean that_present_compatibility = true && that.isSetCompatibility();if (this_present_compatibility || that_present_compatibility) {if (!(this_present_compatibility && that_present_compatibility))return false;if (!this.compatibility.equals(that.compatibility))return false;}boolean this_present_battery_type = true;boolean that_present_battery_type = true;if (this_present_battery_type || that_present_battery_type) {if (!(this_present_battery_type && that_present_battery_type))return false;if (this.battery_type != that.battery_type)return false;}boolean this_present_battery_capacity = true && this.isSetBattery_capacity();boolean that_present_battery_capacity = true && that.isSetBattery_capacity();if (this_present_battery_capacity || that_present_battery_capacity) {if (!(this_present_battery_capacity && that_present_battery_capacity))return false;if (!this.battery_capacity.equals(that.battery_capacity))return false;}boolean this_present_summary = true && this.isSetSummary();boolean that_present_summary = true && that.isSetSummary();if (this_present_summary || that_present_summary) {if (!(this_present_summary && that_present_summary))return false;if (!this.summary.equals(that.summary))return false;}boolean this_present_existing_entity_id = true;boolean that_present_existing_entity_id = true;if (this_present_existing_entity_id || that_present_existing_entity_id) {if (!(this_present_existing_entity_id && that_present_existing_entity_id))return false;if (this.existing_entity_id != that.existing_entity_id)return false;}boolean this_present_brand = true && this.isSetBrand();boolean that_present_brand = true && that.isSetBrand();if (this_present_brand || that_present_brand) {if (!(this_present_brand && that_present_brand))return false;if (!this.brand.equals(that.brand))return false;}boolean this_present_model_name = true && this.isSetModel_name();boolean that_present_model_name = true && that.isSetModel_name();if (this_present_model_name || that_present_model_name) {if (!(this_present_model_name && that_present_model_name))return false;if (!this.model_name.equals(that.model_name))return false;}boolean this_present_model_number = true && this.isSetModel_number();boolean that_present_model_number = true && that.isSetModel_number();if (this_present_model_number || that_present_model_number) {if (!(this_present_model_number && that_present_model_number))return false;if (!this.model_number.equals(that.model_number))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(BulkContentUpload other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;BulkContentUpload typedOther = (BulkContentUpload)other;lastComparison = Boolean.valueOf(isSetNew_entity_id()).compareTo(typedOther.isSetNew_entity_id());if (lastComparison != 0) {return lastComparison;}if (isSetNew_entity_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.new_entity_id, typedOther.new_entity_id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCategory_id()).compareTo(typedOther.isSetCategory_id());if (lastComparison != 0) {return lastComparison;}if (isSetCategory_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category_id, typedOther.category_id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCompatibility()).compareTo(typedOther.isSetCompatibility());if (lastComparison != 0) {return lastComparison;}if (isSetCompatibility()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compatibility, typedOther.compatibility);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetBattery_type()).compareTo(typedOther.isSetBattery_type());if (lastComparison != 0) {return lastComparison;}if (isSetBattery_type()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.battery_type, typedOther.battery_type);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetBattery_capacity()).compareTo(typedOther.isSetBattery_capacity());if (lastComparison != 0) {return lastComparison;}if (isSetBattery_capacity()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.battery_capacity, typedOther.battery_capacity);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSummary()).compareTo(typedOther.isSetSummary());if (lastComparison != 0) {return lastComparison;}if (isSetSummary()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.summary, typedOther.summary);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetExisting_entity_id()).compareTo(typedOther.isSetExisting_entity_id());if (lastComparison != 0) {return lastComparison;}if (isSetExisting_entity_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.existing_entity_id, typedOther.existing_entity_id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetBrand()).compareTo(typedOther.isSetBrand());if (lastComparison != 0) {return lastComparison;}if (isSetBrand()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brand, typedOther.brand);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetModel_name()).compareTo(typedOther.isSetModel_name());if (lastComparison != 0) {return lastComparison;}if (isSetModel_name()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.model_name, typedOther.model_name);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetModel_number()).compareTo(typedOther.isSetModel_number());if (lastComparison != 0) {return lastComparison;}if (isSetModel_number()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.model_number, typedOther.model_number);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 {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // NEW_ENTITY_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.new_entity_id = iprot.readI64();setNew_entity_idIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // CATEGORY_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.category_id = iprot.readI64();setCategory_idIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // COMPATIBILITYif (field.type == org.apache.thrift.protocol.TType.STRING) {this.compatibility = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // BATTERY_TYPEif (field.type == org.apache.thrift.protocol.TType.I32) {this.battery_type = iprot.readI32();setBattery_typeIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // BATTERY_CAPACITYif (field.type == org.apache.thrift.protocol.TType.STRING) {this.battery_capacity = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // SUMMARYif (field.type == org.apache.thrift.protocol.TType.STRING) {this.summary = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // EXISTING_ENTITY_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.existing_entity_id = iprot.readI64();setExisting_entity_idIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 8: // BRANDif (field.type == org.apache.thrift.protocol.TType.STRING) {this.brand = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 9: // MODEL_NAMEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.model_name = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 10: // MODEL_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.model_number = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(NEW_ENTITY_ID_FIELD_DESC);oprot.writeI64(this.new_entity_id);oprot.writeFieldEnd();oprot.writeFieldBegin(CATEGORY_ID_FIELD_DESC);oprot.writeI64(this.category_id);oprot.writeFieldEnd();if (this.compatibility != null) {oprot.writeFieldBegin(COMPATIBILITY_FIELD_DESC);oprot.writeString(this.compatibility);oprot.writeFieldEnd();}oprot.writeFieldBegin(BATTERY_TYPE_FIELD_DESC);oprot.writeI32(this.battery_type);oprot.writeFieldEnd();if (this.battery_capacity != null) {oprot.writeFieldBegin(BATTERY_CAPACITY_FIELD_DESC);oprot.writeString(this.battery_capacity);oprot.writeFieldEnd();}if (this.summary != null) {oprot.writeFieldBegin(SUMMARY_FIELD_DESC);oprot.writeString(this.summary);oprot.writeFieldEnd();}oprot.writeFieldBegin(EXISTING_ENTITY_ID_FIELD_DESC);oprot.writeI64(this.existing_entity_id);oprot.writeFieldEnd();if (this.brand != null) {oprot.writeFieldBegin(BRAND_FIELD_DESC);oprot.writeString(this.brand);oprot.writeFieldEnd();}if (this.model_name != null) {oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);oprot.writeString(this.model_name);oprot.writeFieldEnd();}if (this.model_number != null) {oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);oprot.writeString(this.model_number);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("BulkContentUpload(");boolean first = true;sb.append("new_entity_id:");sb.append(this.new_entity_id);first = false;if (!first) sb.append(", ");sb.append("category_id:");sb.append(this.category_id);first = false;if (!first) sb.append(", ");sb.append("compatibility:");if (this.compatibility == null) {sb.append("null");} else {sb.append(this.compatibility);}first = false;if (!first) sb.append(", ");sb.append("battery_type:");sb.append(this.battery_type);first = false;if (!first) sb.append(", ");sb.append("battery_capacity:");if (this.battery_capacity == null) {sb.append("null");} else {sb.append(this.battery_capacity);}first = false;if (!first) sb.append(", ");sb.append("summary:");if (this.summary == null) {sb.append("null");} else {sb.append(this.summary);}first = false;if (!first) sb.append(", ");sb.append("existing_entity_id:");sb.append(this.existing_entity_id);first = false;if (!first) sb.append(", ");sb.append("brand:");if (this.brand == null) {sb.append("null");} else {sb.append(this.brand);}first = false;if (!first) sb.append(", ");sb.append("model_name:");if (this.model_name == null) {sb.append("null");} else {sb.append(this.model_name);}first = false;if (!first) sb.append(", ");sb.append("model_number:");if (this.model_number == null) {sb.append("null");} else {sb.append(this.model_number);}first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}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, 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_bit_vector = new BitSet(1);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);}}}