/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ package com.flaptor.indextank.rpc; 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; import org.apache.thrift.*; import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; @SuppressWarnings("all") public class LogManager { public interface Iface { public IndexLogInfo get_index_log_info(String index_code) throws TException; public RawLogInfo get_raw_log_info() throws TException; public void enqueue_for_optimization(String index_code, int priority, double score) throws TException; public void delete_index(String index_code) throws TException; public Map<String,QueueScore> get_optimization_queue() throws TException; public List<String> list_existing_indexes() throws TException; } public interface AsyncIface { public void get_index_log_info(String index_code, AsyncMethodCallback<AsyncClient.get_index_log_info_call> resultHandler) throws TException; public void get_raw_log_info(AsyncMethodCallback<AsyncClient.get_raw_log_info_call> resultHandler) throws TException; public void enqueue_for_optimization(String index_code, int priority, double score, AsyncMethodCallback<AsyncClient.enqueue_for_optimization_call> resultHandler) throws TException; public void delete_index(String index_code, AsyncMethodCallback<AsyncClient.delete_index_call> resultHandler) throws TException; public void get_optimization_queue(AsyncMethodCallback<AsyncClient.get_optimization_queue_call> resultHandler) throws TException; public void list_existing_indexes(AsyncMethodCallback<AsyncClient.list_existing_indexes_call> resultHandler) throws TException; } public static class Client implements TServiceClient, Iface { public static class Factory implements TServiceClientFactory<Client> { public Factory() {} public Client getClient(TProtocol prot) { return new Client(prot); } public Client getClient(TProtocol iprot, TProtocol oprot) { return new Client(iprot, oprot); } } public Client(TProtocol prot) { this(prot, prot); } public Client(TProtocol iprot, TProtocol oprot) { iprot_ = iprot; oprot_ = oprot; } protected TProtocol iprot_; protected TProtocol oprot_; protected int seqid_; public TProtocol getInputProtocol() { return this.iprot_; } public TProtocol getOutputProtocol() { return this.oprot_; } public IndexLogInfo get_index_log_info(String index_code) throws TException { send_get_index_log_info(index_code); return recv_get_index_log_info(); } public void send_get_index_log_info(String index_code) throws TException { oprot_.writeMessageBegin(new TMessage("get_index_log_info", TMessageType.CALL, ++seqid_)); get_index_log_info_args args = new get_index_log_info_args(); args.set_index_code(index_code); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public IndexLogInfo recv_get_index_log_info() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_index_log_info failed: out of sequence response"); } get_index_log_info_result result = new get_index_log_info_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.is_set_success()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_index_log_info failed: unknown result"); } public RawLogInfo get_raw_log_info() throws TException { send_get_raw_log_info(); return recv_get_raw_log_info(); } public void send_get_raw_log_info() throws TException { oprot_.writeMessageBegin(new TMessage("get_raw_log_info", TMessageType.CALL, ++seqid_)); get_raw_log_info_args args = new get_raw_log_info_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public RawLogInfo recv_get_raw_log_info() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_raw_log_info failed: out of sequence response"); } get_raw_log_info_result result = new get_raw_log_info_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.is_set_success()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_raw_log_info failed: unknown result"); } public void enqueue_for_optimization(String index_code, int priority, double score) throws TException { send_enqueue_for_optimization(index_code, priority, score); recv_enqueue_for_optimization(); } public void send_enqueue_for_optimization(String index_code, int priority, double score) throws TException { oprot_.writeMessageBegin(new TMessage("enqueue_for_optimization", TMessageType.CALL, ++seqid_)); enqueue_for_optimization_args args = new enqueue_for_optimization_args(); args.set_index_code(index_code); args.set_priority(priority); args.set_score(score); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_enqueue_for_optimization() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "enqueue_for_optimization failed: out of sequence response"); } enqueue_for_optimization_result result = new enqueue_for_optimization_result(); result.read(iprot_); iprot_.readMessageEnd(); return; } public void delete_index(String index_code) throws TException { send_delete_index(index_code); recv_delete_index(); } public void send_delete_index(String index_code) throws TException { oprot_.writeMessageBegin(new TMessage("delete_index", TMessageType.CALL, ++seqid_)); delete_index_args args = new delete_index_args(); args.set_index_code(index_code); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public void recv_delete_index() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "delete_index failed: out of sequence response"); } delete_index_result result = new delete_index_result(); result.read(iprot_); iprot_.readMessageEnd(); return; } public Map<String,QueueScore> get_optimization_queue() throws TException { send_get_optimization_queue(); return recv_get_optimization_queue(); } public void send_get_optimization_queue() throws TException { oprot_.writeMessageBegin(new TMessage("get_optimization_queue", TMessageType.CALL, ++seqid_)); get_optimization_queue_args args = new get_optimization_queue_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public Map<String,QueueScore> recv_get_optimization_queue() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_optimization_queue failed: out of sequence response"); } get_optimization_queue_result result = new get_optimization_queue_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.is_set_success()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_optimization_queue failed: unknown result"); } public List<String> list_existing_indexes() throws TException { send_list_existing_indexes(); return recv_list_existing_indexes(); } public void send_list_existing_indexes() throws TException { oprot_.writeMessageBegin(new TMessage("list_existing_indexes", TMessageType.CALL, ++seqid_)); list_existing_indexes_args args = new list_existing_indexes_args(); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); } public List<String> recv_list_existing_indexes() throws TException { TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } if (msg.seqid != seqid_) { throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "list_existing_indexes failed: out of sequence response"); } list_existing_indexes_result result = new list_existing_indexes_result(); result.read(iprot_); iprot_.readMessageEnd(); if (result.is_set_success()) { return result.success; } throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_existing_indexes failed: unknown result"); } } public static class AsyncClient extends TAsyncClient implements AsyncIface { public static class Factory implements TAsyncClientFactory<AsyncClient> { private TAsyncClientManager clientManager; private TProtocolFactory protocolFactory; public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void get_index_log_info(String index_code, AsyncMethodCallback<get_index_log_info_call> resultHandler) throws TException { checkReady(); get_index_log_info_call method_call = new get_index_log_info_call(index_code, resultHandler, this, protocolFactory, transport); manager.call(method_call); } public static class get_index_log_info_call extends TAsyncMethodCall { private String index_code; public get_index_log_info_call(String index_code, AsyncMethodCallback<get_index_log_info_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); this.index_code = index_code; } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("get_index_log_info", TMessageType.CALL, 0)); get_index_log_info_args args = new get_index_log_info_args(); args.set_index_code(index_code); args.write(prot); prot.writeMessageEnd(); } public IndexLogInfo getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_index_log_info(); } } public void get_raw_log_info(AsyncMethodCallback<get_raw_log_info_call> resultHandler) throws TException { checkReady(); get_raw_log_info_call method_call = new get_raw_log_info_call(resultHandler, this, protocolFactory, transport); manager.call(method_call); } public static class get_raw_log_info_call extends TAsyncMethodCall { public get_raw_log_info_call(AsyncMethodCallback<get_raw_log_info_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("get_raw_log_info", TMessageType.CALL, 0)); get_raw_log_info_args args = new get_raw_log_info_args(); args.write(prot); prot.writeMessageEnd(); } public RawLogInfo getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_raw_log_info(); } } public void enqueue_for_optimization(String index_code, int priority, double score, AsyncMethodCallback<enqueue_for_optimization_call> resultHandler) throws TException { checkReady(); enqueue_for_optimization_call method_call = new enqueue_for_optimization_call(index_code, priority, score, resultHandler, this, protocolFactory, transport); manager.call(method_call); } public static class enqueue_for_optimization_call extends TAsyncMethodCall { private String index_code; private int priority; private double score; public enqueue_for_optimization_call(String index_code, int priority, double score, AsyncMethodCallback<enqueue_for_optimization_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); this.index_code = index_code; this.priority = priority; this.score = score; } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("enqueue_for_optimization", TMessageType.CALL, 0)); enqueue_for_optimization_args args = new enqueue_for_optimization_args(); args.set_index_code(index_code); args.set_priority(priority); args.set_score(score); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_enqueue_for_optimization(); } } public void delete_index(String index_code, AsyncMethodCallback<delete_index_call> resultHandler) throws TException { checkReady(); delete_index_call method_call = new delete_index_call(index_code, resultHandler, this, protocolFactory, transport); manager.call(method_call); } public static class delete_index_call extends TAsyncMethodCall { private String index_code; public delete_index_call(String index_code, AsyncMethodCallback<delete_index_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); this.index_code = index_code; } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("delete_index", TMessageType.CALL, 0)); delete_index_args args = new delete_index_args(); args.set_index_code(index_code); args.write(prot); prot.writeMessageEnd(); } public void getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_delete_index(); } } public void get_optimization_queue(AsyncMethodCallback<get_optimization_queue_call> resultHandler) throws TException { checkReady(); get_optimization_queue_call method_call = new get_optimization_queue_call(resultHandler, this, protocolFactory, transport); manager.call(method_call); } public static class get_optimization_queue_call extends TAsyncMethodCall { public get_optimization_queue_call(AsyncMethodCallback<get_optimization_queue_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("get_optimization_queue", TMessageType.CALL, 0)); get_optimization_queue_args args = new get_optimization_queue_args(); args.write(prot); prot.writeMessageEnd(); } public Map<String,QueueScore> getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_optimization_queue(); } } public void list_existing_indexes(AsyncMethodCallback<list_existing_indexes_call> resultHandler) throws TException { checkReady(); list_existing_indexes_call method_call = new list_existing_indexes_call(resultHandler, this, protocolFactory, transport); manager.call(method_call); } public static class list_existing_indexes_call extends TAsyncMethodCall { public list_existing_indexes_call(AsyncMethodCallback<list_existing_indexes_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(TProtocol prot) throws TException { prot.writeMessageBegin(new TMessage("list_existing_indexes", TMessageType.CALL, 0)); list_existing_indexes_args args = new list_existing_indexes_args(); args.write(prot); prot.writeMessageEnd(); } public List<String> getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_list_existing_indexes(); } } } public static class Processor implements TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(Iface iface) { iface_ = iface; processMap_.put("get_index_log_info", new get_index_log_info()); processMap_.put("get_raw_log_info", new get_raw_log_info()); processMap_.put("enqueue_for_optimization", new enqueue_for_optimization()); processMap_.put("delete_index", new delete_index()); processMap_.put("get_optimization_queue", new get_optimization_queue()); processMap_.put("list_existing_indexes", new list_existing_indexes()); } protected static interface ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException; } private Iface iface_; protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>(); public boolean process(TProtocol iprot, TProtocol oprot) throws TException { TMessage msg = iprot.readMessageBegin(); ProcessFunction fn = processMap_.get(msg.name); if (fn == null) { TProtocolUtil.skip(iprot, TType.STRUCT); iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return true; } fn.process(msg.seqid, iprot, oprot); return true; } private class get_index_log_info implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_index_log_info_args args = new get_index_log_info_args(); try { args.read(iprot); } catch (TProtocolException e) { iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new TMessage("get_index_log_info", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_index_log_info_result result = new get_index_log_info_result(); result.success = iface_.get_index_log_info(args.index_code); oprot.writeMessageBegin(new TMessage("get_index_log_info", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_raw_log_info implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_raw_log_info_args args = new get_raw_log_info_args(); try { args.read(iprot); } catch (TProtocolException e) { iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new TMessage("get_raw_log_info", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_raw_log_info_result result = new get_raw_log_info_result(); result.success = iface_.get_raw_log_info(); oprot.writeMessageBegin(new TMessage("get_raw_log_info", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class enqueue_for_optimization implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { enqueue_for_optimization_args args = new enqueue_for_optimization_args(); try { args.read(iprot); } catch (TProtocolException e) { iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new TMessage("enqueue_for_optimization", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); enqueue_for_optimization_result result = new enqueue_for_optimization_result(); iface_.enqueue_for_optimization(args.index_code, args.priority, args.score); oprot.writeMessageBegin(new TMessage("enqueue_for_optimization", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class delete_index implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { delete_index_args args = new delete_index_args(); try { args.read(iprot); } catch (TProtocolException e) { iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new TMessage("delete_index", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); delete_index_result result = new delete_index_result(); iface_.delete_index(args.index_code); oprot.writeMessageBegin(new TMessage("delete_index", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class get_optimization_queue implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_optimization_queue_args args = new get_optimization_queue_args(); try { args.read(iprot); } catch (TProtocolException e) { iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new TMessage("get_optimization_queue", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); get_optimization_queue_result result = new get_optimization_queue_result(); result.success = iface_.get_optimization_queue(); oprot.writeMessageBegin(new TMessage("get_optimization_queue", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } private class list_existing_indexes implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { list_existing_indexes_args args = new list_existing_indexes_args(); try { args.read(iprot); } catch (TProtocolException e) { iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new TMessage("list_existing_indexes", TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); return; } iprot.readMessageEnd(); list_existing_indexes_result result = new list_existing_indexes_result(); result.success = iface_.list_existing_indexes(); oprot.writeMessageBegin(new TMessage("list_existing_indexes", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } } } public static class get_index_log_info_args implements TBase<get_index_log_info_args, get_index_log_info_args._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_index_log_info_args"); private static final TField INDEX_CODE_FIELD_DESC = new TField("index_code", TType.STRING, (short)1); private String index_code; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { INDEX_CODE((short)1, "index_code"); 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: // INDEX_CODE return INDEX_CODE; 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 public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); tmpMap.put(_Fields.INDEX_CODE, new FieldMetaData("index_code", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_index_log_info_args.class, metaDataMap); } public get_index_log_info_args() { } public get_index_log_info_args( String index_code) { this(); this.index_code = index_code; } /** * Performs a deep copy on <i>other</i>. */ public get_index_log_info_args(get_index_log_info_args other) { if (other.is_set_index_code()) { this.index_code = other.index_code; } } public get_index_log_info_args deepCopy() { return new get_index_log_info_args(this); } @Override public void clear() { this.index_code = null; } public String get_index_code() { return this.index_code; } public get_index_log_info_args set_index_code(String index_code) { this.index_code = index_code; return this; } public void unset_index_code() { this.index_code = null; } /** Returns true if field index_code is set (has been asigned a value) and false otherwise */ public boolean is_set_index_code() { return this.index_code != null; } public void set_index_code_isSet(boolean value) { if (!value) { this.index_code = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case INDEX_CODE: if (value == null) { unset_index_code(); } else { set_index_code((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case INDEX_CODE: return get_index_code(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case INDEX_CODE: return is_set_index_code(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_index_log_info_args) return this.equals((get_index_log_info_args)that); return false; } public boolean equals(get_index_log_info_args that) { if (that == null) return false; boolean this_present_index_code = true && this.is_set_index_code(); boolean that_present_index_code = true && that.is_set_index_code(); if (this_present_index_code || that_present_index_code) { if (!(this_present_index_code && that_present_index_code)) return false; if (!this.index_code.equals(that.index_code)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(get_index_log_info_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_log_info_args typedOther = (get_index_log_info_args)other; lastComparison = Boolean.valueOf(is_set_index_code()).compareTo(typedOther.is_set_index_code()); if (lastComparison != 0) { return lastComparison; } if (is_set_index_code()) { lastComparison = TBaseHelper.compareTo(this.index_code, typedOther.index_code); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case 1: // INDEX_CODE if (field.type == TType.STRING) { this.index_code = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.index_code != null) { oprot.writeFieldBegin(INDEX_CODE_FIELD_DESC); oprot.writeString(this.index_code); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_index_log_info_args("); boolean first = true; sb.append("index_code:"); if (this.index_code == null) { sb.append("null"); } else { sb.append(this.index_code); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } } public static class get_index_log_info_result implements TBase<get_index_log_info_result, get_index_log_info_result._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_index_log_info_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private IndexLogInfo success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements 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: // SUCCESS return 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 assignments public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, IndexLogInfo.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_index_log_info_result.class, metaDataMap); } public get_index_log_info_result() { } public get_index_log_info_result( IndexLogInfo success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_index_log_info_result(get_index_log_info_result other) { if (other.is_set_success()) { this.success = new IndexLogInfo(other.success); } } public get_index_log_info_result deepCopy() { return new get_index_log_info_result(this); } @Override public void clear() { this.success = null; } public IndexLogInfo get_success() { return this.success; } public get_index_log_info_result set_success(IndexLogInfo success) { this.success = success; return this; } public void unset_success() { this.success = null; } /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } public void set_success_isSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((IndexLogInfo)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_index_log_info_result) return this.equals((get_index_log_info_result)that); return false; } public boolean equals(get_index_log_info_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); 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; } @Override public int hashCode() { return 0; } public int compareTo(get_index_log_info_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_index_log_info_result typedOther = (get_index_log_info_result)other; lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new IndexLogInfo(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_index_log_info_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 TException { // check for required fields } } public static class get_raw_log_info_args implements TBase<get_raw_log_info_args, get_raw_log_info_args._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_raw_log_info_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { ; 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) { 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; } } public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_raw_log_info_args.class, metaDataMap); } public get_raw_log_info_args() { } /** * Performs a deep copy on <i>other</i>. */ public get_raw_log_info_args(get_raw_log_info_args other) { } public get_raw_log_info_args deepCopy() { return new get_raw_log_info_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_raw_log_info_args) return this.equals((get_raw_log_info_args)that); return false; } public boolean equals(get_raw_log_info_args that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(get_raw_log_info_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_raw_log_info_args typedOther = (get_raw_log_info_args)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_raw_log_info_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } } public static class get_raw_log_info_result implements TBase<get_raw_log_info_result, get_raw_log_info_result._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_raw_log_info_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private RawLogInfo success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements 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: // SUCCESS return 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 assignments public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, RawLogInfo.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_raw_log_info_result.class, metaDataMap); } public get_raw_log_info_result() { } public get_raw_log_info_result( RawLogInfo success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_raw_log_info_result(get_raw_log_info_result other) { if (other.is_set_success()) { this.success = new RawLogInfo(other.success); } } public get_raw_log_info_result deepCopy() { return new get_raw_log_info_result(this); } @Override public void clear() { this.success = null; } public RawLogInfo get_success() { return this.success; } public get_raw_log_info_result set_success(RawLogInfo success) { this.success = success; return this; } public void unset_success() { this.success = null; } /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } public void set_success_isSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((RawLogInfo)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_raw_log_info_result) return this.equals((get_raw_log_info_result)that); return false; } public boolean equals(get_raw_log_info_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); 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; } @Override public int hashCode() { return 0; } public int compareTo(get_raw_log_info_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_raw_log_info_result typedOther = (get_raw_log_info_result)other; lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new RawLogInfo(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); this.success.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_raw_log_info_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 TException { // check for required fields } } public static class enqueue_for_optimization_args implements TBase<enqueue_for_optimization_args, enqueue_for_optimization_args._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("enqueue_for_optimization_args"); private static final TField INDEX_CODE_FIELD_DESC = new TField("index_code", TType.STRING, (short)1); private static final TField PRIORITY_FIELD_DESC = new TField("priority", TType.I32, (short)2); private static final TField SCORE_FIELD_DESC = new TField("score", TType.DOUBLE, (short)3); private String index_code; private int priority; private double score; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { INDEX_CODE((short)1, "index_code"), PRIORITY((short)2, "priority"), SCORE((short)3, "score"); 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: // INDEX_CODE return INDEX_CODE; case 2: // PRIORITY return PRIORITY; case 3: // SCORE return SCORE; 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 __PRIORITY_ISSET_ID = 0; private static final int __SCORE_ISSET_ID = 1; private BitSet __isset_bit_vector = new BitSet(2); public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); tmpMap.put(_Fields.INDEX_CODE, new FieldMetaData("index_code", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); tmpMap.put(_Fields.PRIORITY, new FieldMetaData("priority", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); tmpMap.put(_Fields.SCORE, new FieldMetaData("score", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.DOUBLE))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(enqueue_for_optimization_args.class, metaDataMap); } public enqueue_for_optimization_args() { } public enqueue_for_optimization_args( String index_code, int priority, double score) { this(); this.index_code = index_code; this.priority = priority; set_priority_isSet(true); this.score = score; set_score_isSet(true); } /** * Performs a deep copy on <i>other</i>. */ public enqueue_for_optimization_args(enqueue_for_optimization_args other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.is_set_index_code()) { this.index_code = other.index_code; } this.priority = other.priority; this.score = other.score; } public enqueue_for_optimization_args deepCopy() { return new enqueue_for_optimization_args(this); } @Override public void clear() { this.index_code = null; set_priority_isSet(false); this.priority = 0; set_score_isSet(false); this.score = 0.0; } public String get_index_code() { return this.index_code; } public enqueue_for_optimization_args set_index_code(String index_code) { this.index_code = index_code; return this; } public void unset_index_code() { this.index_code = null; } /** Returns true if field index_code is set (has been asigned a value) and false otherwise */ public boolean is_set_index_code() { return this.index_code != null; } public void set_index_code_isSet(boolean value) { if (!value) { this.index_code = null; } } public int get_priority() { return this.priority; } public enqueue_for_optimization_args set_priority(int priority) { this.priority = priority; set_priority_isSet(true); return this; } public void unset_priority() { __isset_bit_vector.clear(__PRIORITY_ISSET_ID); } /** Returns true if field priority is set (has been asigned a value) and false otherwise */ public boolean is_set_priority() { return __isset_bit_vector.get(__PRIORITY_ISSET_ID); } public void set_priority_isSet(boolean value) { __isset_bit_vector.set(__PRIORITY_ISSET_ID, value); } public double get_score() { return this.score; } public enqueue_for_optimization_args set_score(double score) { this.score = score; set_score_isSet(true); return this; } public void unset_score() { __isset_bit_vector.clear(__SCORE_ISSET_ID); } /** Returns true if field score is set (has been asigned a value) and false otherwise */ public boolean is_set_score() { return __isset_bit_vector.get(__SCORE_ISSET_ID); } public void set_score_isSet(boolean value) { __isset_bit_vector.set(__SCORE_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case INDEX_CODE: if (value == null) { unset_index_code(); } else { set_index_code((String)value); } break; case PRIORITY: if (value == null) { unset_priority(); } else { set_priority((Integer)value); } break; case SCORE: if (value == null) { unset_score(); } else { set_score((Double)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case INDEX_CODE: return get_index_code(); case PRIORITY: return new Integer(get_priority()); case SCORE: return new Double(get_score()); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case INDEX_CODE: return is_set_index_code(); case PRIORITY: return is_set_priority(); case SCORE: return is_set_score(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof enqueue_for_optimization_args) return this.equals((enqueue_for_optimization_args)that); return false; } public boolean equals(enqueue_for_optimization_args that) { if (that == null) return false; boolean this_present_index_code = true && this.is_set_index_code(); boolean that_present_index_code = true && that.is_set_index_code(); if (this_present_index_code || that_present_index_code) { if (!(this_present_index_code && that_present_index_code)) return false; if (!this.index_code.equals(that.index_code)) return false; } boolean this_present_priority = true; boolean that_present_priority = true; if (this_present_priority || that_present_priority) { if (!(this_present_priority && that_present_priority)) return false; if (this.priority != that.priority) return false; } boolean this_present_score = true; boolean that_present_score = true; if (this_present_score || that_present_score) { if (!(this_present_score && that_present_score)) return false; if (this.score != that.score) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(enqueue_for_optimization_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; enqueue_for_optimization_args typedOther = (enqueue_for_optimization_args)other; lastComparison = Boolean.valueOf(is_set_index_code()).compareTo(typedOther.is_set_index_code()); if (lastComparison != 0) { return lastComparison; } if (is_set_index_code()) { lastComparison = TBaseHelper.compareTo(this.index_code, typedOther.index_code); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_priority()).compareTo(typedOther.is_set_priority()); if (lastComparison != 0) { return lastComparison; } if (is_set_priority()) { lastComparison = TBaseHelper.compareTo(this.priority, typedOther.priority); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_score()).compareTo(typedOther.is_set_score()); if (lastComparison != 0) { return lastComparison; } if (is_set_score()) { lastComparison = TBaseHelper.compareTo(this.score, typedOther.score); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case 1: // INDEX_CODE if (field.type == TType.STRING) { this.index_code = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; case 2: // PRIORITY if (field.type == TType.I32) { this.priority = iprot.readI32(); set_priority_isSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; case 3: // SCORE if (field.type == TType.DOUBLE) { this.score = iprot.readDouble(); set_score_isSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.index_code != null) { oprot.writeFieldBegin(INDEX_CODE_FIELD_DESC); oprot.writeString(this.index_code); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PRIORITY_FIELD_DESC); oprot.writeI32(this.priority); oprot.writeFieldEnd(); oprot.writeFieldBegin(SCORE_FIELD_DESC); oprot.writeDouble(this.score); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("enqueue_for_optimization_args("); boolean first = true; sb.append("index_code:"); if (this.index_code == null) { sb.append("null"); } else { sb.append(this.index_code); } first = false; if (!first) sb.append(", "); sb.append("priority:"); sb.append(this.priority); first = false; if (!first) sb.append(", "); sb.append("score:"); sb.append(this.score); first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } } public static class enqueue_for_optimization_result implements TBase<enqueue_for_optimization_result, enqueue_for_optimization_result._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("enqueue_for_optimization_result"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { ; 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) { 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; } } public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(enqueue_for_optimization_result.class, metaDataMap); } public enqueue_for_optimization_result() { } /** * Performs a deep copy on <i>other</i>. */ public enqueue_for_optimization_result(enqueue_for_optimization_result other) { } public enqueue_for_optimization_result deepCopy() { return new enqueue_for_optimization_result(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof enqueue_for_optimization_result) return this.equals((enqueue_for_optimization_result)that); return false; } public boolean equals(enqueue_for_optimization_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(enqueue_for_optimization_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; enqueue_for_optimization_result typedOther = (enqueue_for_optimization_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("enqueue_for_optimization_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } } public static class delete_index_args implements TBase<delete_index_args, delete_index_args._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("delete_index_args"); private static final TField INDEX_CODE_FIELD_DESC = new TField("index_code", TType.STRING, (short)1); private String index_code; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { INDEX_CODE((short)1, "index_code"); 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: // INDEX_CODE return INDEX_CODE; 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 public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); tmpMap.put(_Fields.INDEX_CODE, new FieldMetaData("index_code", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(delete_index_args.class, metaDataMap); } public delete_index_args() { } public delete_index_args( String index_code) { this(); this.index_code = index_code; } /** * Performs a deep copy on <i>other</i>. */ public delete_index_args(delete_index_args other) { if (other.is_set_index_code()) { this.index_code = other.index_code; } } public delete_index_args deepCopy() { return new delete_index_args(this); } @Override public void clear() { this.index_code = null; } public String get_index_code() { return this.index_code; } public delete_index_args set_index_code(String index_code) { this.index_code = index_code; return this; } public void unset_index_code() { this.index_code = null; } /** Returns true if field index_code is set (has been asigned a value) and false otherwise */ public boolean is_set_index_code() { return this.index_code != null; } public void set_index_code_isSet(boolean value) { if (!value) { this.index_code = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case INDEX_CODE: if (value == null) { unset_index_code(); } else { set_index_code((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case INDEX_CODE: return get_index_code(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case INDEX_CODE: return is_set_index_code(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof delete_index_args) return this.equals((delete_index_args)that); return false; } public boolean equals(delete_index_args that) { if (that == null) return false; boolean this_present_index_code = true && this.is_set_index_code(); boolean that_present_index_code = true && that.is_set_index_code(); if (this_present_index_code || that_present_index_code) { if (!(this_present_index_code && that_present_index_code)) return false; if (!this.index_code.equals(that.index_code)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(delete_index_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; delete_index_args typedOther = (delete_index_args)other; lastComparison = Boolean.valueOf(is_set_index_code()).compareTo(typedOther.is_set_index_code()); if (lastComparison != 0) { return lastComparison; } if (is_set_index_code()) { lastComparison = TBaseHelper.compareTo(this.index_code, typedOther.index_code); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case 1: // INDEX_CODE if (field.type == TType.STRING) { this.index_code = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.index_code != null) { oprot.writeFieldBegin(INDEX_CODE_FIELD_DESC); oprot.writeString(this.index_code); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("delete_index_args("); boolean first = true; sb.append("index_code:"); if (this.index_code == null) { sb.append("null"); } else { sb.append(this.index_code); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } } public static class delete_index_result implements TBase<delete_index_result, delete_index_result._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("delete_index_result"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { ; 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) { 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; } } public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(delete_index_result.class, metaDataMap); } public delete_index_result() { } /** * Performs a deep copy on <i>other</i>. */ public delete_index_result(delete_index_result other) { } public delete_index_result deepCopy() { return new delete_index_result(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof delete_index_result) return this.equals((delete_index_result)that); return false; } public boolean equals(delete_index_result that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(delete_index_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; delete_index_result typedOther = (delete_index_result)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("delete_index_result("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } } public static class get_optimization_queue_args implements TBase<get_optimization_queue_args, get_optimization_queue_args._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_optimization_queue_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { ; 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) { 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; } } public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_optimization_queue_args.class, metaDataMap); } public get_optimization_queue_args() { } /** * Performs a deep copy on <i>other</i>. */ public get_optimization_queue_args(get_optimization_queue_args other) { } public get_optimization_queue_args deepCopy() { return new get_optimization_queue_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_optimization_queue_args) return this.equals((get_optimization_queue_args)that); return false; } public boolean equals(get_optimization_queue_args that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(get_optimization_queue_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_optimization_queue_args typedOther = (get_optimization_queue_args)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_optimization_queue_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } } public static class get_optimization_queue_result implements TBase<get_optimization_queue_result, get_optimization_queue_result._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_optimization_queue_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); private Map<String,QueueScore> success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements 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: // SUCCESS return 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 assignments public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new StructMetaData(TType.STRUCT, QueueScore.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_optimization_queue_result.class, metaDataMap); } public get_optimization_queue_result() { } public get_optimization_queue_result( Map<String,QueueScore> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public get_optimization_queue_result(get_optimization_queue_result other) { if (other.is_set_success()) { Map<String,QueueScore> __this__success = new HashMap<String,QueueScore>(); for (Map.Entry<String, QueueScore> other_element : other.success.entrySet()) { String other_element_key = other_element.getKey(); QueueScore other_element_value = other_element.getValue(); String __this__success_copy_key = other_element_key; QueueScore __this__success_copy_value = new QueueScore(other_element_value); __this__success.put(__this__success_copy_key, __this__success_copy_value); } this.success = __this__success; } } public get_optimization_queue_result deepCopy() { return new get_optimization_queue_result(this); } @Override public void clear() { this.success = null; } public int get_success_size() { return (this.success == null) ? 0 : this.success.size(); } public void put_to_success(String key, QueueScore val) { if (this.success == null) { this.success = new HashMap<String,QueueScore>(); } this.success.put(key, val); } public Map<String,QueueScore> get_success() { return this.success; } public get_optimization_queue_result set_success(Map<String,QueueScore> success) { this.success = success; return this; } public void unset_success() { this.success = null; } /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } public void set_success_isSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((Map<String,QueueScore>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof get_optimization_queue_result) return this.equals((get_optimization_queue_result)that); return false; } public boolean equals(get_optimization_queue_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); 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; } @Override public int hashCode() { return 0; } public int compareTo(get_optimization_queue_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; get_optimization_queue_result typedOther = (get_optimization_queue_result)other; lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == TType.MAP) { { TMap _map169 = iprot.readMapBegin(); this.success = new HashMap<String,QueueScore>(2*_map169.size); for (int _i170 = 0; _i170 < _map169.size; ++_i170) { String _key171; QueueScore _val172; _key171 = iprot.readString(); _val172 = new QueueScore(); _val172.read(iprot); this.success.put(_key171, _val172); } iprot.readMapEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); for (Map.Entry<String, QueueScore> _iter173 : this.success.entrySet()) { oprot.writeString(_iter173.getKey()); _iter173.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("get_optimization_queue_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 TException { // check for required fields } } public static class list_existing_indexes_args implements TBase<list_existing_indexes_args, list_existing_indexes_args._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("list_existing_indexes_args"); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements TFieldIdEnum { ; 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) { 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; } } public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(list_existing_indexes_args.class, metaDataMap); } public list_existing_indexes_args() { } /** * Performs a deep copy on <i>other</i>. */ public list_existing_indexes_args(list_existing_indexes_args other) { } public list_existing_indexes_args deepCopy() { return new list_existing_indexes_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof list_existing_indexes_args) return this.equals((list_existing_indexes_args)that); return false; } public boolean equals(list_existing_indexes_args that) { if (that == null) return false; return true; } @Override public int hashCode() { return 0; } public int compareTo(list_existing_indexes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_existing_indexes_args typedOther = (list_existing_indexes_args)other; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("list_existing_indexes_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws TException { // check for required fields } } public static class list_existing_indexes_result implements TBase<list_existing_indexes_result, list_existing_indexes_result._Fields>, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("list_existing_indexes_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private List<String> success; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements 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: // SUCCESS return 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 assignments public static final Map<_Fields, FieldMetaData> metaDataMap; static { Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(list_existing_indexes_result.class, metaDataMap); } public list_existing_indexes_result() { } public list_existing_indexes_result( List<String> success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public list_existing_indexes_result(list_existing_indexes_result other) { if (other.is_set_success()) { List<String> __this__success = new ArrayList<String>(); for (String other_element : other.success) { __this__success.add(other_element); } this.success = __this__success; } } public list_existing_indexes_result deepCopy() { return new list_existing_indexes_result(this); } @Override public void clear() { this.success = null; } public int get_success_size() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<String> get_success_iterator() { return (this.success == null) ? null : this.success.iterator(); } public void add_to_success(String elem) { if (this.success == null) { this.success = new ArrayList<String>(); } this.success.add(elem); } public List<String> get_success() { return this.success; } public list_existing_indexes_result set_success(List<String> success) { this.success = success; return this; } public void unset_success() { this.success = null; } /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean is_set_success() { return this.success != null; } public void set_success_isSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((List<String>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return is_set_success(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof list_existing_indexes_result) return this.equals((list_existing_indexes_result)that); return false; } public boolean equals(list_existing_indexes_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); 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; } @Override public int hashCode() { return 0; } public int compareTo(list_existing_indexes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; list_existing_indexes_result typedOther = (list_existing_indexes_result)other; lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == TType.STOP) { break; } switch (field.id) { case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list174 = iprot.readListBegin(); this.success = new ArrayList<String>(_list174.size); for (int _i175 = 0; _i175 < _list174.size; ++_i175) { String _elem176; _elem176 = iprot.readString(); this.success.add(_elem176); } iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method validate(); } public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); for (String _iter177 : this.success) { oprot.writeString(_iter177); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { StringBuilder sb = new StringBuilder("list_existing_indexes_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 TException { // check for required fields } } }