Rev 15167 | Blame | Compare with Previous | 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.model.v1.dtr;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 DtrService {public interface Iface extends in.shop2020.generic.GenericService.Iface {public List<LivePricing> getLatestPricing(long skuBundleId, long source_id) throws org.apache.thrift.TException;public void updateLatestPriceForItem(long id) throws org.apache.thrift.TException;public List<String> addItemsInBulk(List<BulkItems> bulkItemsList) throws org.apache.thrift.TException;}public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {public void getLatestPricing(long skuBundleId, long source_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLatestPricing_call> resultHandler) throws org.apache.thrift.TException;public void updateLatestPriceForItem(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateLatestPriceForItem_call> resultHandler) throws org.apache.thrift.TException;public void addItemsInBulk(List<BulkItems> bulkItemsList, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addItemsInBulk_call> resultHandler) throws org.apache.thrift.TException;}public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {public Factory() {}public Client getClient(org.apache.thrift.protocol.TProtocol prot) {return new Client(prot);}public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {return new Client(iprot, oprot);}}public Client(org.apache.thrift.protocol.TProtocol prot){super(prot, prot);}public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {super(iprot, oprot);}public List<LivePricing> getLatestPricing(long skuBundleId, long source_id) throws org.apache.thrift.TException{send_getLatestPricing(skuBundleId, source_id);return recv_getLatestPricing();}public void send_getLatestPricing(long skuBundleId, long source_id) throws org.apache.thrift.TException{getLatestPricing_args args = new getLatestPricing_args();args.setSkuBundleId(skuBundleId);args.setSource_id(source_id);sendBase("getLatestPricing", args);}public List<LivePricing> recv_getLatestPricing() throws org.apache.thrift.TException{getLatestPricing_result result = new getLatestPricing_result();receiveBase(result, "getLatestPricing");if (result.isSetSuccess()) {return result.success;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLatestPricing failed: unknown result");}public void updateLatestPriceForItem(long id) throws org.apache.thrift.TException{send_updateLatestPriceForItem(id);}public void send_updateLatestPriceForItem(long id) throws org.apache.thrift.TException{updateLatestPriceForItem_args args = new updateLatestPriceForItem_args();args.setId(id);sendBase("updateLatestPriceForItem", args);}public List<String> addItemsInBulk(List<BulkItems> bulkItemsList) throws org.apache.thrift.TException{send_addItemsInBulk(bulkItemsList);return recv_addItemsInBulk();}public void send_addItemsInBulk(List<BulkItems> bulkItemsList) throws org.apache.thrift.TException{addItemsInBulk_args args = new addItemsInBulk_args();args.setBulkItemsList(bulkItemsList);sendBase("addItemsInBulk", args);}public List<String> recv_addItemsInBulk() throws org.apache.thrift.TException{addItemsInBulk_result result = new addItemsInBulk_result();receiveBase(result, "addItemsInBulk");if (result.isSetSuccess()) {return result.success;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addItemsInBulk failed: unknown result");}}public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {private org.apache.thrift.async.TAsyncClientManager clientManager;private org.apache.thrift.protocol.TProtocolFactory protocolFactory;public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {this.clientManager = clientManager;this.protocolFactory = protocolFactory;}public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {return new AsyncClient(protocolFactory, clientManager, transport);}}public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {super(protocolFactory, clientManager, transport);}public void getLatestPricing(long skuBundleId, long source_id, org.apache.thrift.async.AsyncMethodCallback<getLatestPricing_call> resultHandler) throws org.apache.thrift.TException {checkReady();getLatestPricing_call method_call = new getLatestPricing_call(skuBundleId, source_id, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getLatestPricing_call extends org.apache.thrift.async.TAsyncMethodCall {private long skuBundleId;private long source_id;public getLatestPricing_call(long skuBundleId, long source_id, org.apache.thrift.async.AsyncMethodCallback<getLatestPricing_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {super(client, protocolFactory, transport, resultHandler, false);this.skuBundleId = skuBundleId;this.source_id = source_id;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLatestPricing", org.apache.thrift.protocol.TMessageType.CALL, 0));getLatestPricing_args args = new getLatestPricing_args();args.setSkuBundleId(skuBundleId);args.setSource_id(source_id);args.write(prot);prot.writeMessageEnd();}public List<LivePricing> getResult() throws org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);return (new Client(prot)).recv_getLatestPricing();}}public void updateLatestPriceForItem(long id, org.apache.thrift.async.AsyncMethodCallback<updateLatestPriceForItem_call> resultHandler) throws org.apache.thrift.TException {checkReady();updateLatestPriceForItem_call method_call = new updateLatestPriceForItem_call(id, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class updateLatestPriceForItem_call extends org.apache.thrift.async.TAsyncMethodCall {private long id;public updateLatestPriceForItem_call(long id, org.apache.thrift.async.AsyncMethodCallback<updateLatestPriceForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {super(client, protocolFactory, transport, resultHandler, true);this.id = id;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLatestPriceForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));updateLatestPriceForItem_args args = new updateLatestPriceForItem_args();args.setId(id);args.write(prot);prot.writeMessageEnd();}public void getResult() throws org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);}}public void addItemsInBulk(List<BulkItems> bulkItemsList, org.apache.thrift.async.AsyncMethodCallback<addItemsInBulk_call> resultHandler) throws org.apache.thrift.TException {checkReady();addItemsInBulk_call method_call = new addItemsInBulk_call(bulkItemsList, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class addItemsInBulk_call extends org.apache.thrift.async.TAsyncMethodCall {private List<BulkItems> bulkItemsList;public addItemsInBulk_call(List<BulkItems> bulkItemsList, org.apache.thrift.async.AsyncMethodCallback<addItemsInBulk_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {super(client, protocolFactory, transport, resultHandler, false);this.bulkItemsList = bulkItemsList;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addItemsInBulk", org.apache.thrift.protocol.TMessageType.CALL, 0));addItemsInBulk_args args = new addItemsInBulk_args();args.setBulkItemsList(bulkItemsList);args.write(prot);prot.writeMessageEnd();}public List<String> getResult() throws org.apache.thrift.TException {if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {throw new IllegalStateException("Method call not finished!");}org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);return (new Client(prot)).recv_addItemsInBulk();}}}public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());public Processor(I iface) {super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));}protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {super(iface, getProcessMap(processMap));}private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {processMap.put("getLatestPricing", new getLatestPricing());processMap.put("updateLatestPriceForItem", new updateLatestPriceForItem());processMap.put("addItemsInBulk", new addItemsInBulk());return processMap;}private static class getLatestPricing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLatestPricing_args> {public getLatestPricing() {super("getLatestPricing");}protected getLatestPricing_args getEmptyArgsInstance() {return new getLatestPricing_args();}protected getLatestPricing_result getResult(I iface, getLatestPricing_args args) throws org.apache.thrift.TException {getLatestPricing_result result = new getLatestPricing_result();result.success = iface.getLatestPricing(args.skuBundleId, args.source_id);return result;}}private static class updateLatestPriceForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateLatestPriceForItem_args> {public updateLatestPriceForItem() {super("updateLatestPriceForItem");}protected updateLatestPriceForItem_args getEmptyArgsInstance() {return new updateLatestPriceForItem_args();}protected org.apache.thrift.TBase getResult(I iface, updateLatestPriceForItem_args args) throws org.apache.thrift.TException {iface.updateLatestPriceForItem(args.id);return null;}}private static class addItemsInBulk<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addItemsInBulk_args> {public addItemsInBulk() {super("addItemsInBulk");}protected addItemsInBulk_args getEmptyArgsInstance() {return new addItemsInBulk_args();}protected addItemsInBulk_result getResult(I iface, addItemsInBulk_args args) throws org.apache.thrift.TException {addItemsInBulk_result result = new addItemsInBulk_result();result.success = iface.addItemsInBulk(args.bulkItemsList);return result;}}}public static class getLatestPricing_args implements org.apache.thrift.TBase<getLatestPricing_args, getLatestPricing_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLatestPricing_args");private static final org.apache.thrift.protocol.TField SKU_BUNDLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("skuBundleId", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("source_id", org.apache.thrift.protocol.TType.I64, (short)2);private long skuBundleId; // requiredprivate long source_id; // 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 {SKU_BUNDLE_ID((short)1, "skuBundleId"),SOURCE_ID((short)2, "source_id");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: // SKU_BUNDLE_IDreturn SKU_BUNDLE_ID;case 2: // SOURCE_IDreturn SOURCE_ID;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 __SKUBUNDLEID_ISSET_ID = 0;private static final int __SOURCE_ID_ISSET_ID = 1;private BitSet __isset_bit_vector = new BitSet(2);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.SKU_BUNDLE_ID, new org.apache.thrift.meta_data.FieldMetaData("skuBundleId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("source_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLatestPricing_args.class, metaDataMap);}public getLatestPricing_args() {}public getLatestPricing_args(long skuBundleId,long source_id){this();this.skuBundleId = skuBundleId;setSkuBundleIdIsSet(true);this.source_id = source_id;setSource_idIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getLatestPricing_args(getLatestPricing_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.skuBundleId = other.skuBundleId;this.source_id = other.source_id;}public getLatestPricing_args deepCopy() {return new getLatestPricing_args(this);}@Overridepublic void clear() {setSkuBundleIdIsSet(false);this.skuBundleId = 0;setSource_idIsSet(false);this.source_id = 0;}public long getSkuBundleId() {return this.skuBundleId;}public void setSkuBundleId(long skuBundleId) {this.skuBundleId = skuBundleId;setSkuBundleIdIsSet(true);}public void unsetSkuBundleId() {__isset_bit_vector.clear(__SKUBUNDLEID_ISSET_ID);}/** Returns true if field skuBundleId is set (has been assigned a value) and false otherwise */public boolean isSetSkuBundleId() {return __isset_bit_vector.get(__SKUBUNDLEID_ISSET_ID);}public void setSkuBundleIdIsSet(boolean value) {__isset_bit_vector.set(__SKUBUNDLEID_ISSET_ID, value);}public long getSource_id() {return this.source_id;}public void setSource_id(long source_id) {this.source_id = source_id;setSource_idIsSet(true);}public void unsetSource_id() {__isset_bit_vector.clear(__SOURCE_ID_ISSET_ID);}/** Returns true if field source_id is set (has been assigned a value) and false otherwise */public boolean isSetSource_id() {return __isset_bit_vector.get(__SOURCE_ID_ISSET_ID);}public void setSource_idIsSet(boolean value) {__isset_bit_vector.set(__SOURCE_ID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case SKU_BUNDLE_ID:if (value == null) {unsetSkuBundleId();} else {setSkuBundleId((Long)value);}break;case SOURCE_ID:if (value == null) {unsetSource_id();} else {setSource_id((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SKU_BUNDLE_ID:return Long.valueOf(getSkuBundleId());case SOURCE_ID:return Long.valueOf(getSource_id());}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 SKU_BUNDLE_ID:return isSetSkuBundleId();case SOURCE_ID:return isSetSource_id();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getLatestPricing_args)return this.equals((getLatestPricing_args)that);return false;}public boolean equals(getLatestPricing_args that) {if (that == null)return false;boolean this_present_skuBundleId = true;boolean that_present_skuBundleId = true;if (this_present_skuBundleId || that_present_skuBundleId) {if (!(this_present_skuBundleId && that_present_skuBundleId))return false;if (this.skuBundleId != that.skuBundleId)return false;}boolean this_present_source_id = true;boolean that_present_source_id = true;if (this_present_source_id || that_present_source_id) {if (!(this_present_source_id && that_present_source_id))return false;if (this.source_id != that.source_id)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getLatestPricing_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getLatestPricing_args typedOther = (getLatestPricing_args)other;lastComparison = Boolean.valueOf(isSetSkuBundleId()).compareTo(typedOther.isSetSkuBundleId());if (lastComparison != 0) {return lastComparison;}if (isSetSkuBundleId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skuBundleId, typedOther.skuBundleId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSource_id()).compareTo(typedOther.isSetSource_id());if (lastComparison != 0) {return lastComparison;}if (isSetSource_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_id, typedOther.source_id);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: // SKU_BUNDLE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.skuBundleId = iprot.readI64();setSkuBundleIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // SOURCE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.source_id = iprot.readI64();setSource_idIsSet(true);} 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(SKU_BUNDLE_ID_FIELD_DESC);oprot.writeI64(this.skuBundleId);oprot.writeFieldEnd();oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);oprot.writeI64(this.source_id);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getLatestPricing_args(");boolean first = true;sb.append("skuBundleId:");sb.append(this.skuBundleId);first = false;if (!first) sb.append(", ");sb.append("source_id:");sb.append(this.source_id);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);}}}public static class getLatestPricing_result implements org.apache.thrift.TBase<getLatestPricing_result, getLatestPricing_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLatestPricing_result");private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);private List<LivePricing> success; // 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 {SUCCESS((short)0, "success");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 0: // SUCCESSreturn SUCCESS;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 assignmentspublic 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LivePricing.class))));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLatestPricing_result.class, metaDataMap);}public getLatestPricing_result() {}public getLatestPricing_result(List<LivePricing> success){this();this.success = success;}/*** Performs a deep copy on <i>other</i>.*/public getLatestPricing_result(getLatestPricing_result other) {if (other.isSetSuccess()) {List<LivePricing> __this__success = new ArrayList<LivePricing>();for (LivePricing other_element : other.success) {__this__success.add(new LivePricing(other_element));}this.success = __this__success;}}public getLatestPricing_result deepCopy() {return new getLatestPricing_result(this);}@Overridepublic void clear() {this.success = null;}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<LivePricing> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(LivePricing elem) {if (this.success == null) {this.success = new ArrayList<LivePricing>();}this.success.add(elem);}public List<LivePricing> getSuccess() {return this.success;}public void setSuccess(List<LivePricing> success) {this.success = success;}public void unsetSuccess() {this.success = null;}/** Returns true if field success is set (has been assigned a value) and false otherwise */public boolean isSetSuccess() {return this.success != null;}public void setSuccessIsSet(boolean value) {if (!value) {this.success = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((List<LivePricing>)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();}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 SUCCESS:return isSetSuccess();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getLatestPricing_result)return this.equals((getLatestPricing_result)that);return false;}public boolean equals(getLatestPricing_result that) {if (that == null)return false;boolean this_present_success = true && this.isSetSuccess();boolean that_present_success = true && that.isSetSuccess();if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (!this.success.equals(that.success))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getLatestPricing_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getLatestPricing_result typedOther = (getLatestPricing_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());if (lastComparison != 0) {return lastComparison;}if (isSetSuccess()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);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 0: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();this.success = new ArrayList<LivePricing>(_list0.size);for (int _i1 = 0; _i1 < _list0.size; ++_i1){LivePricing _elem2; // required_elem2 = new LivePricing();_elem2.read(iprot);this.success.add(_elem2);}iprot.readListEnd();}} 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 {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));for (LivePricing _iter3 : this.success){_iter3.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getLatestPricing_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}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 {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);}}}public static class updateLatestPriceForItem_args implements org.apache.thrift.TBase<updateLatestPriceForItem_args, updateLatestPriceForItem_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLatestPriceForItem_args");private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);private long id; // 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 {ID((short)1, "id");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: // IDreturn ID;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 __ID_ISSET_ID = 0;private BitSet __isset_bit_vector = new BitSet(1);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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLatestPriceForItem_args.class, metaDataMap);}public updateLatestPriceForItem_args() {}public updateLatestPriceForItem_args(long id){this();this.id = id;setIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public updateLatestPriceForItem_args(updateLatestPriceForItem_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;}public updateLatestPriceForItem_args deepCopy() {return new updateLatestPriceForItem_args(this);}@Overridepublic void clear() {setIdIsSet(false);this.id = 0;}public long getId() {return this.id;}public void setId(long id) {this.id = id;setIdIsSet(true);}public void unsetId() {__isset_bit_vector.clear(__ID_ISSET_ID);}/** Returns true if field id is set (has been assigned a value) and false otherwise */public boolean isSetId() {return __isset_bit_vector.get(__ID_ISSET_ID);}public void setIdIsSet(boolean value) {__isset_bit_vector.set(__ID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ID:return Long.valueOf(getId());}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 ID:return isSetId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof updateLatestPriceForItem_args)return this.equals((updateLatestPriceForItem_args)that);return false;}public boolean equals(updateLatestPriceForItem_args 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;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(updateLatestPriceForItem_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;updateLatestPriceForItem_args typedOther = (updateLatestPriceForItem_args)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());if (lastComparison != 0) {return lastComparison;}if (isSetId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);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: // IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.id = iprot.readI64();setIdIsSet(true);} 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(ID_FIELD_DESC);oprot.writeI64(this.id);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("updateLatestPriceForItem_args(");boolean first = true;sb.append("id:");sb.append(this.id);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);}}}public static class addItemsInBulk_args implements org.apache.thrift.TBase<addItemsInBulk_args, addItemsInBulk_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItemsInBulk_args");private static final org.apache.thrift.protocol.TField BULK_ITEMS_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkItemsList", org.apache.thrift.protocol.TType.LIST, (short)1);private List<BulkItems> bulkItemsList; // 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 {BULK_ITEMS_LIST((short)1, "bulkItemsList");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: // BULK_ITEMS_LISTreturn BULK_ITEMS_LIST;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 assignmentspublic 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.BULK_ITEMS_LIST, new org.apache.thrift.meta_data.FieldMetaData("bulkItemsList", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkItems.class))));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addItemsInBulk_args.class, metaDataMap);}public addItemsInBulk_args() {}public addItemsInBulk_args(List<BulkItems> bulkItemsList){this();this.bulkItemsList = bulkItemsList;}/*** Performs a deep copy on <i>other</i>.*/public addItemsInBulk_args(addItemsInBulk_args other) {if (other.isSetBulkItemsList()) {List<BulkItems> __this__bulkItemsList = new ArrayList<BulkItems>();for (BulkItems other_element : other.bulkItemsList) {__this__bulkItemsList.add(new BulkItems(other_element));}this.bulkItemsList = __this__bulkItemsList;}}public addItemsInBulk_args deepCopy() {return new addItemsInBulk_args(this);}@Overridepublic void clear() {this.bulkItemsList = null;}public int getBulkItemsListSize() {return (this.bulkItemsList == null) ? 0 : this.bulkItemsList.size();}public java.util.Iterator<BulkItems> getBulkItemsListIterator() {return (this.bulkItemsList == null) ? null : this.bulkItemsList.iterator();}public void addToBulkItemsList(BulkItems elem) {if (this.bulkItemsList == null) {this.bulkItemsList = new ArrayList<BulkItems>();}this.bulkItemsList.add(elem);}public List<BulkItems> getBulkItemsList() {return this.bulkItemsList;}public void setBulkItemsList(List<BulkItems> bulkItemsList) {this.bulkItemsList = bulkItemsList;}public void unsetBulkItemsList() {this.bulkItemsList = null;}/** Returns true if field bulkItemsList is set (has been assigned a value) and false otherwise */public boolean isSetBulkItemsList() {return this.bulkItemsList != null;}public void setBulkItemsListIsSet(boolean value) {if (!value) {this.bulkItemsList = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case BULK_ITEMS_LIST:if (value == null) {unsetBulkItemsList();} else {setBulkItemsList((List<BulkItems>)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case BULK_ITEMS_LIST:return getBulkItemsList();}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 BULK_ITEMS_LIST:return isSetBulkItemsList();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof addItemsInBulk_args)return this.equals((addItemsInBulk_args)that);return false;}public boolean equals(addItemsInBulk_args that) {if (that == null)return false;boolean this_present_bulkItemsList = true && this.isSetBulkItemsList();boolean that_present_bulkItemsList = true && that.isSetBulkItemsList();if (this_present_bulkItemsList || that_present_bulkItemsList) {if (!(this_present_bulkItemsList && that_present_bulkItemsList))return false;if (!this.bulkItemsList.equals(that.bulkItemsList))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(addItemsInBulk_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;addItemsInBulk_args typedOther = (addItemsInBulk_args)other;lastComparison = Boolean.valueOf(isSetBulkItemsList()).compareTo(typedOther.isSetBulkItemsList());if (lastComparison != 0) {return lastComparison;}if (isSetBulkItemsList()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkItemsList, typedOther.bulkItemsList);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: // BULK_ITEMS_LISTif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();this.bulkItemsList = new ArrayList<BulkItems>(_list4.size);for (int _i5 = 0; _i5 < _list4.size; ++_i5){BulkItems _elem6; // required_elem6 = new BulkItems();_elem6.read(iprot);this.bulkItemsList.add(_elem6);}iprot.readListEnd();}} 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);if (this.bulkItemsList != null) {oprot.writeFieldBegin(BULK_ITEMS_LIST_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.bulkItemsList.size()));for (BulkItems _iter7 : this.bulkItemsList){_iter7.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("addItemsInBulk_args(");boolean first = true;sb.append("bulkItemsList:");if (this.bulkItemsList == null) {sb.append("null");} else {sb.append(this.bulkItemsList);}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 {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);}}}public static class addItemsInBulk_result implements org.apache.thrift.TBase<addItemsInBulk_result, addItemsInBulk_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItemsInBulk_result");private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);private List<String> success; // 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 {SUCCESS((short)0, "success");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 0: // SUCCESSreturn SUCCESS;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 assignmentspublic 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addItemsInBulk_result.class, metaDataMap);}public addItemsInBulk_result() {}public addItemsInBulk_result(List<String> success){this();this.success = success;}/*** Performs a deep copy on <i>other</i>.*/public addItemsInBulk_result(addItemsInBulk_result other) {if (other.isSetSuccess()) {List<String> __this__success = new ArrayList<String>();for (String other_element : other.success) {__this__success.add(other_element);}this.success = __this__success;}}public addItemsInBulk_result deepCopy() {return new addItemsInBulk_result(this);}@Overridepublic void clear() {this.success = null;}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<String> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(String elem) {if (this.success == null) {this.success = new ArrayList<String>();}this.success.add(elem);}public List<String> getSuccess() {return this.success;}public void setSuccess(List<String> success) {this.success = success;}public void unsetSuccess() {this.success = null;}/** Returns true if field success is set (has been assigned a value) and false otherwise */public boolean isSetSuccess() {return this.success != null;}public void setSuccessIsSet(boolean value) {if (!value) {this.success = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((List<String>)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();}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 SUCCESS:return isSetSuccess();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof addItemsInBulk_result)return this.equals((addItemsInBulk_result)that);return false;}public boolean equals(addItemsInBulk_result that) {if (that == null)return false;boolean this_present_success = true && this.isSetSuccess();boolean that_present_success = true && that.isSetSuccess();if (this_present_success || that_present_success) {if (!(this_present_success && that_present_success))return false;if (!this.success.equals(that.success))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(addItemsInBulk_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;addItemsInBulk_result typedOther = (addItemsInBulk_result)other;lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());if (lastComparison != 0) {return lastComparison;}if (isSetSuccess()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);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 0: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();this.success = new ArrayList<String>(_list8.size);for (int _i9 = 0; _i9 < _list8.size; ++_i9){String _elem10; // required_elem10 = iprot.readString();this.success.add(_elem10);}iprot.readListEnd();}} 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 {oprot.writeStructBegin(STRUCT_DESC);if (this.isSetSuccess()) {oprot.writeFieldBegin(SUCCESS_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));for (String _iter11 : this.success){oprot.writeString(_iter11);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("addItemsInBulk_result(");boolean first = true;sb.append("success:");if (this.success == null) {sb.append("null");} else {sb.append(this.success);}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 {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);}}}}