Package com.twitter.zipkin.gen

Source Code of com.twitter.zipkin.gen.ZipkinCollector$storeDependencies_result$storeDependencies_resultTupleSchemeFactory

/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*  @generated
*/
package com.twitter.zipkin.gen;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ZipkinCollector {

  public interface Iface extends com.twitter.zipkin.gen.scribe.Iface {

    /**
     * Aggregates methods
     *
     * @param service_name
     * @param annotations
     */
    public void storeTopAnnotations(String service_name, List<String> annotations) throws StoreAggregatesException, org.apache.thrift.TException;

    public void storeTopKeyValueAnnotations(String service_name, List<String> annotations) throws StoreAggregatesException, org.apache.thrift.TException;

    public void storeDependencies(String service_name, List<String> endpoints) throws StoreAggregatesException, org.apache.thrift.TException;

  }

  public interface AsyncIface extends com.twitter.zipkin.gen.scribe .AsyncIface {

    public void storeTopAnnotations(String service_name, List<String> annotations, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.storeTopAnnotations_call> resultHandler) throws org.apache.thrift.TException;

    public void storeTopKeyValueAnnotations(String service_name, List<String> annotations, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.storeTopKeyValueAnnotations_call> resultHandler) throws org.apache.thrift.TException;

    public void storeDependencies(String service_name, List<String> endpoints, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.storeDependencies_call> resultHandler) throws org.apache.thrift.TException;

  }

  public static class Client extends com.twitter.zipkin.gen.scribe.Client implements Iface {
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
      public Factory() {}
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

    public Client(org.apache.thrift.protocol.TProtocol prot)
    {
      super(prot, prot);
    }

    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
      super(iprot, oprot);
    }

    public void storeTopAnnotations(String service_name, List<String> annotations) throws StoreAggregatesException, org.apache.thrift.TException
    {
      send_storeTopAnnotations(service_name, annotations);
      recv_storeTopAnnotations();
    }

    public void send_storeTopAnnotations(String service_name, List<String> annotations) throws org.apache.thrift.TException
    {
      storeTopAnnotations_args args = new storeTopAnnotations_args();
      args.setService_name(service_name);
      args.setAnnotations(annotations);
      sendBase("storeTopAnnotations", args);
    }

    public void recv_storeTopAnnotations() throws StoreAggregatesException, org.apache.thrift.TException
    {
      storeTopAnnotations_result result = new storeTopAnnotations_result();
      receiveBase(result, "storeTopAnnotations");
      if (result.e != null) {
        throw result.e;
      }
      return;
    }

    public void storeTopKeyValueAnnotations(String service_name, List<String> annotations) throws StoreAggregatesException, org.apache.thrift.TException
    {
      send_storeTopKeyValueAnnotations(service_name, annotations);
      recv_storeTopKeyValueAnnotations();
    }

    public void send_storeTopKeyValueAnnotations(String service_name, List<String> annotations) throws org.apache.thrift.TException
    {
      storeTopKeyValueAnnotations_args args = new storeTopKeyValueAnnotations_args();
      args.setService_name(service_name);
      args.setAnnotations(annotations);
      sendBase("storeTopKeyValueAnnotations", args);
    }

    public void recv_storeTopKeyValueAnnotations() throws StoreAggregatesException, org.apache.thrift.TException
    {
      storeTopKeyValueAnnotations_result result = new storeTopKeyValueAnnotations_result();
      receiveBase(result, "storeTopKeyValueAnnotations");
      if (result.e != null) {
        throw result.e;
      }
      return;
    }

    public void storeDependencies(String service_name, List<String> endpoints) throws StoreAggregatesException, org.apache.thrift.TException
    {
      send_storeDependencies(service_name, endpoints);
      recv_storeDependencies();
    }

    public void send_storeDependencies(String service_name, List<String> endpoints) throws org.apache.thrift.TException
    {
      storeDependencies_args args = new storeDependencies_args();
      args.setService_name(service_name);
      args.setEndpoints(endpoints);
      sendBase("storeDependencies", args);
    }

    public void recv_storeDependencies() throws StoreAggregatesException, org.apache.thrift.TException
    {
      storeDependencies_result result = new storeDependencies_result();
      receiveBase(result, "storeDependencies");
      if (result.e != null) {
        throw result.e;
      }
      return;
    }

  }
  public static class AsyncClient extends com.twitter.zipkin.gen.scribe.AsyncClient implements AsyncIface {
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
      private org.apache.thrift.async.TAsyncClientManager clientManager;
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
      super(protocolFactory, clientManager, transport);
    }

    public void storeTopAnnotations(String service_name, List<String> annotations, org.apache.thrift.async.AsyncMethodCallback<storeTopAnnotations_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      storeTopAnnotations_call method_call = new storeTopAnnotations_call(service_name, annotations, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class storeTopAnnotations_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String service_name;
      private List<String> annotations;
      public storeTopAnnotations_call(String service_name, List<String> annotations, org.apache.thrift.async.AsyncMethodCallback<storeTopAnnotations_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.service_name = service_name;
        this.annotations = annotations;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("storeTopAnnotations", org.apache.thrift.protocol.TMessageType.CALL, 0));
        storeTopAnnotations_args args = new storeTopAnnotations_args();
        args.setService_name(service_name);
        args.setAnnotations(annotations);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws StoreAggregatesException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_storeTopAnnotations();
      }
    }

    public void storeTopKeyValueAnnotations(String service_name, List<String> annotations, org.apache.thrift.async.AsyncMethodCallback<storeTopKeyValueAnnotations_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      storeTopKeyValueAnnotations_call method_call = new storeTopKeyValueAnnotations_call(service_name, annotations, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class storeTopKeyValueAnnotations_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String service_name;
      private List<String> annotations;
      public storeTopKeyValueAnnotations_call(String service_name, List<String> annotations, org.apache.thrift.async.AsyncMethodCallback<storeTopKeyValueAnnotations_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.service_name = service_name;
        this.annotations = annotations;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("storeTopKeyValueAnnotations", org.apache.thrift.protocol.TMessageType.CALL, 0));
        storeTopKeyValueAnnotations_args args = new storeTopKeyValueAnnotations_args();
        args.setService_name(service_name);
        args.setAnnotations(annotations);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws StoreAggregatesException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_storeTopKeyValueAnnotations();
      }
    }

    public void storeDependencies(String service_name, List<String> endpoints, org.apache.thrift.async.AsyncMethodCallback<storeDependencies_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      storeDependencies_call method_call = new storeDependencies_call(service_name, endpoints, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class storeDependencies_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String service_name;
      private List<String> endpoints;
      public storeDependencies_call(String service_name, List<String> endpoints, org.apache.thrift.async.AsyncMethodCallback<storeDependencies_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.service_name = service_name;
        this.endpoints = endpoints;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("storeDependencies", org.apache.thrift.protocol.TMessageType.CALL, 0));
        storeDependencies_args args = new storeDependencies_args();
        args.setService_name(service_name);
        args.setEndpoints(endpoints);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws StoreAggregatesException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_storeDependencies();
      }
    }

  }

  public static class Processor<I extends Iface> extends com.twitter.zipkin.gen.scribe.Processor<I> implements org.apache.thrift.TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
    }

    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      processMap.put("storeTopAnnotations", new storeTopAnnotations());
      processMap.put("storeTopKeyValueAnnotations", new storeTopKeyValueAnnotations());
      processMap.put("storeDependencies", new storeDependencies());
      return processMap;
    }

    public static class storeTopAnnotations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, storeTopAnnotations_args> {
      public storeTopAnnotations() {
        super("storeTopAnnotations");
      }

      public storeTopAnnotations_args getEmptyArgsInstance() {
        return new storeTopAnnotations_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public storeTopAnnotations_result getResult(I iface, storeTopAnnotations_args args) throws org.apache.thrift.TException {
        storeTopAnnotations_result result = new storeTopAnnotations_result();
        try {
          iface.storeTopAnnotations(args.service_name, args.annotations);
        } catch (StoreAggregatesException e) {
          result.e = e;
        }
        return result;
      }
    }

    public static class storeTopKeyValueAnnotations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, storeTopKeyValueAnnotations_args> {
      public storeTopKeyValueAnnotations() {
        super("storeTopKeyValueAnnotations");
      }

      public storeTopKeyValueAnnotations_args getEmptyArgsInstance() {
        return new storeTopKeyValueAnnotations_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public storeTopKeyValueAnnotations_result getResult(I iface, storeTopKeyValueAnnotations_args args) throws org.apache.thrift.TException {
        storeTopKeyValueAnnotations_result result = new storeTopKeyValueAnnotations_result();
        try {
          iface.storeTopKeyValueAnnotations(args.service_name, args.annotations);
        } catch (StoreAggregatesException e) {
          result.e = e;
        }
        return result;
      }
    }

    public static class storeDependencies<I extends Iface> extends org.apache.thrift.ProcessFunction<I, storeDependencies_args> {
      public storeDependencies() {
        super("storeDependencies");
      }

      public storeDependencies_args getEmptyArgsInstance() {
        return new storeDependencies_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public storeDependencies_result getResult(I iface, storeDependencies_args args) throws org.apache.thrift.TException {
        storeDependencies_result result = new storeDependencies_result();
        try {
          iface.storeDependencies(args.service_name, args.endpoints);
        } catch (StoreAggregatesException e) {
          result.e = e;
        }
        return result;
      }
    }

  }

  public static class storeTopAnnotations_args implements org.apache.thrift.TBase<storeTopAnnotations_args, storeTopAnnotations_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeTopAnnotations_args");

    private static final org.apache.thrift.protocol.TField SERVICE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("service_name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new storeTopAnnotations_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new storeTopAnnotations_argsTupleSchemeFactory());
    }

    private String service_name; // required
    private List<String> annotations; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SERVICE_NAME((short)1, "service_name"),
      ANNOTATIONS((short)2, "annotations");

      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: // SERVICE_NAME
            return SERVICE_NAME;
          case 2: // ANNOTATIONS
            return ANNOTATIONS;
          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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("service_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeTopAnnotations_args.class, metaDataMap);
    }

    public storeTopAnnotations_args() {
    }

    public storeTopAnnotations_args(
      String service_name,
      List<String> annotations)
    {
      this();
      this.service_name = service_name;
      this.annotations = annotations;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public storeTopAnnotations_args(storeTopAnnotations_args other) {
      if (other.isSetService_name()) {
        this.service_name = other.service_name;
      }
      if (other.isSetAnnotations()) {
        List<String> __this__annotations = new ArrayList<String>();
        for (String other_element : other.annotations) {
          __this__annotations.add(other_element);
        }
        this.annotations = __this__annotations;
      }
    }

    public storeTopAnnotations_args deepCopy() {
      return new storeTopAnnotations_args(this);
    }

    @Override
    public void clear() {
      this.service_name = null;
      this.annotations = null;
    }

    public String getService_name() {
      return this.service_name;
    }

    public storeTopAnnotations_args setService_name(String service_name) {
      this.service_name = service_name;
      return this;
    }

    public void unsetService_name() {
      this.service_name = null;
    }

    /** Returns true if field service_name is set (has been assigned a value) and false otherwise */
    public boolean isSetService_name() {
      return this.service_name != null;
    }

    public void setService_nameIsSet(boolean value) {
      if (!value) {
        this.service_name = null;
      }
    }

    public int getAnnotationsSize() {
      return (this.annotations == null) ? 0 : this.annotations.size();
    }

    public java.util.Iterator<String> getAnnotationsIterator() {
      return (this.annotations == null) ? null : this.annotations.iterator();
    }

    public void addToAnnotations(String elem) {
      if (this.annotations == null) {
        this.annotations = new ArrayList<String>();
      }
      this.annotations.add(elem);
    }

    public List<String> getAnnotations() {
      return this.annotations;
    }

    public storeTopAnnotations_args setAnnotations(List<String> annotations) {
      this.annotations = annotations;
      return this;
    }

    public void unsetAnnotations() {
      this.annotations = null;
    }

    /** Returns true if field annotations is set (has been assigned a value) and false otherwise */
    public boolean isSetAnnotations() {
      return this.annotations != null;
    }

    public void setAnnotationsIsSet(boolean value) {
      if (!value) {
        this.annotations = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SERVICE_NAME:
        if (value == null) {
          unsetService_name();
        } else {
          setService_name((String)value);
        }
        break;

      case ANNOTATIONS:
        if (value == null) {
          unsetAnnotations();
        } else {
          setAnnotations((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SERVICE_NAME:
        return getService_name();

      case ANNOTATIONS:
        return getAnnotations();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SERVICE_NAME:
        return isSetService_name();
      case ANNOTATIONS:
        return isSetAnnotations();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof storeTopAnnotations_args)
        return this.equals((storeTopAnnotations_args)that);
      return false;
    }

    public boolean equals(storeTopAnnotations_args that) {
      if (that == null)
        return false;

      boolean this_present_service_name = true && this.isSetService_name();
      boolean that_present_service_name = true && that.isSetService_name();
      if (this_present_service_name || that_present_service_name) {
        if (!(this_present_service_name && that_present_service_name))
          return false;
        if (!this.service_name.equals(that.service_name))
          return false;
      }

      boolean this_present_annotations = true && this.isSetAnnotations();
      boolean that_present_annotations = true && that.isSetAnnotations();
      if (this_present_annotations || that_present_annotations) {
        if (!(this_present_annotations && that_present_annotations))
          return false;
        if (!this.annotations.equals(that.annotations))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(storeTopAnnotations_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      storeTopAnnotations_args typedOther = (storeTopAnnotations_args)other;

      lastComparison = Boolean.valueOf(isSetService_name()).compareTo(typedOther.isSetService_name());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetService_name()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.service_name, typedOther.service_name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(typedOther.isSetAnnotations());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAnnotations()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotations, typedOther.annotations);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("storeTopAnnotations_args(");
      boolean first = true;

      sb.append("service_name:");
      if (this.service_name == null) {
        sb.append("null");
      } else {
        sb.append(this.service_name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("annotations:");
      if (this.annotations == null) {
        sb.append("null");
      } else {
        sb.append(this.annotations);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class storeTopAnnotations_argsStandardSchemeFactory implements SchemeFactory {
      public storeTopAnnotations_argsStandardScheme getScheme() {
        return new storeTopAnnotations_argsStandardScheme();
      }
    }

    private static class storeTopAnnotations_argsStandardScheme extends StandardScheme<storeTopAnnotations_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, storeTopAnnotations_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // SERVICE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.service_name = iprot.readString();
                struct.setService_nameIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ANNOTATIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                  struct.annotations = new ArrayList<String>(_list0.size);
                  for (int _i1 = 0; _i1 < _list0.size; ++_i1)
                  {
                    String _elem2; // required
                    _elem2 = iprot.readString();
                    struct.annotations.add(_elem2);
                  }
                  iprot.readListEnd();
                }
                struct.setAnnotationsIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, storeTopAnnotations_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.service_name != null) {
          oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC);
          oprot.writeString(struct.service_name);
          oprot.writeFieldEnd();
        }
        if (struct.annotations != null) {
          oprot.writeFieldBegin(ANNOTATIONS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.annotations.size()));
            for (String _iter3 : struct.annotations)
            {
              oprot.writeString(_iter3);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class storeTopAnnotations_argsTupleSchemeFactory implements SchemeFactory {
      public storeTopAnnotations_argsTupleScheme getScheme() {
        return new storeTopAnnotations_argsTupleScheme();
      }
    }

    private static class storeTopAnnotations_argsTupleScheme extends TupleScheme<storeTopAnnotations_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeTopAnnotations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetService_name()) {
          optionals.set(0);
        }
        if (struct.isSetAnnotations()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetService_name()) {
          oprot.writeString(struct.service_name);
        }
        if (struct.isSetAnnotations()) {
          {
            oprot.writeI32(struct.annotations.size());
            for (String _iter4 : struct.annotations)
            {
              oprot.writeString(_iter4);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeTopAnnotations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.service_name = iprot.readString();
          struct.setService_nameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.annotations = new ArrayList<String>(_list5.size);
            for (int _i6 = 0; _i6 < _list5.size; ++_i6)
            {
              String _elem7; // required
              _elem7 = iprot.readString();
              struct.annotations.add(_elem7);
            }
          }
          struct.setAnnotationsIsSet(true);
        }
      }
    }

  }

  public static class storeTopAnnotations_result implements org.apache.thrift.TBase<storeTopAnnotations_result, storeTopAnnotations_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeTopAnnotations_result");

    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new storeTopAnnotations_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new storeTopAnnotations_resultTupleSchemeFactory());
    }

    private StoreAggregatesException e; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      E((short)1, "e");

      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: // E
            return E;
          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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeTopAnnotations_result.class, metaDataMap);
    }

    public storeTopAnnotations_result() {
    }

    public storeTopAnnotations_result(
      StoreAggregatesException e)
    {
      this();
      this.e = e;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public storeTopAnnotations_result(storeTopAnnotations_result other) {
      if (other.isSetE()) {
        this.e = new StoreAggregatesException(other.e);
      }
    }

    public storeTopAnnotations_result deepCopy() {
      return new storeTopAnnotations_result(this);
    }

    @Override
    public void clear() {
      this.e = null;
    }

    public StoreAggregatesException getE() {
      return this.e;
    }

    public storeTopAnnotations_result setE(StoreAggregatesException e) {
      this.e = e;
      return this;
    }

    public void unsetE() {
      this.e = null;
    }

    /** Returns true if field e is set (has been assigned a value) and false otherwise */
    public boolean isSetE() {
      return this.e != null;
    }

    public void setEIsSet(boolean value) {
      if (!value) {
        this.e = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case E:
        if (value == null) {
          unsetE();
        } else {
          setE((StoreAggregatesException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case E:
        return isSetE();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof storeTopAnnotations_result)
        return this.equals((storeTopAnnotations_result)that);
      return false;
    }

    public boolean equals(storeTopAnnotations_result that) {
      if (that == null)
        return false;

      boolean this_present_e = true && this.isSetE();
      boolean that_present_e = true && that.isSetE();
      if (this_present_e || that_present_e) {
        if (!(this_present_e && that_present_e))
          return false;
        if (!this.e.equals(that.e))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(storeTopAnnotations_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      storeTopAnnotations_result typedOther = (storeTopAnnotations_result)other;

      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("storeTopAnnotations_result(");
      boolean first = true;

      sb.append("e:");
      if (this.e == null) {
        sb.append("null");
      } else {
        sb.append(this.e);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class storeTopAnnotations_resultStandardSchemeFactory implements SchemeFactory {
      public storeTopAnnotations_resultStandardScheme getScheme() {
        return new storeTopAnnotations_resultStandardScheme();
      }
    }

    private static class storeTopAnnotations_resultStandardScheme extends StandardScheme<storeTopAnnotations_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, storeTopAnnotations_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // E
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.e = new StoreAggregatesException();
                struct.e.read(iprot);
                struct.setEIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, storeTopAnnotations_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.e != null) {
          oprot.writeFieldBegin(E_FIELD_DESC);
          struct.e.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class storeTopAnnotations_resultTupleSchemeFactory implements SchemeFactory {
      public storeTopAnnotations_resultTupleScheme getScheme() {
        return new storeTopAnnotations_resultTupleScheme();
      }
    }

    private static class storeTopAnnotations_resultTupleScheme extends TupleScheme<storeTopAnnotations_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeTopAnnotations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetE()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeTopAnnotations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e = new StoreAggregatesException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
      }
    }

  }

  public static class storeTopKeyValueAnnotations_args implements org.apache.thrift.TBase<storeTopKeyValueAnnotations_args, storeTopKeyValueAnnotations_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeTopKeyValueAnnotations_args");

    private static final org.apache.thrift.protocol.TField SERVICE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("service_name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations", org.apache.thrift.protocol.TType.LIST, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new storeTopKeyValueAnnotations_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new storeTopKeyValueAnnotations_argsTupleSchemeFactory());
    }

    private String service_name; // required
    private List<String> annotations; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SERVICE_NAME((short)1, "service_name"),
      ANNOTATIONS((short)2, "annotations");

      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: // SERVICE_NAME
            return SERVICE_NAME;
          case 2: // ANNOTATIONS
            return ANNOTATIONS;
          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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("service_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeTopKeyValueAnnotations_args.class, metaDataMap);
    }

    public storeTopKeyValueAnnotations_args() {
    }

    public storeTopKeyValueAnnotations_args(
      String service_name,
      List<String> annotations)
    {
      this();
      this.service_name = service_name;
      this.annotations = annotations;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public storeTopKeyValueAnnotations_args(storeTopKeyValueAnnotations_args other) {
      if (other.isSetService_name()) {
        this.service_name = other.service_name;
      }
      if (other.isSetAnnotations()) {
        List<String> __this__annotations = new ArrayList<String>();
        for (String other_element : other.annotations) {
          __this__annotations.add(other_element);
        }
        this.annotations = __this__annotations;
      }
    }

    public storeTopKeyValueAnnotations_args deepCopy() {
      return new storeTopKeyValueAnnotations_args(this);
    }

    @Override
    public void clear() {
      this.service_name = null;
      this.annotations = null;
    }

    public String getService_name() {
      return this.service_name;
    }

    public storeTopKeyValueAnnotations_args setService_name(String service_name) {
      this.service_name = service_name;
      return this;
    }

    public void unsetService_name() {
      this.service_name = null;
    }

    /** Returns true if field service_name is set (has been assigned a value) and false otherwise */
    public boolean isSetService_name() {
      return this.service_name != null;
    }

    public void setService_nameIsSet(boolean value) {
      if (!value) {
        this.service_name = null;
      }
    }

    public int getAnnotationsSize() {
      return (this.annotations == null) ? 0 : this.annotations.size();
    }

    public java.util.Iterator<String> getAnnotationsIterator() {
      return (this.annotations == null) ? null : this.annotations.iterator();
    }

    public void addToAnnotations(String elem) {
      if (this.annotations == null) {
        this.annotations = new ArrayList<String>();
      }
      this.annotations.add(elem);
    }

    public List<String> getAnnotations() {
      return this.annotations;
    }

    public storeTopKeyValueAnnotations_args setAnnotations(List<String> annotations) {
      this.annotations = annotations;
      return this;
    }

    public void unsetAnnotations() {
      this.annotations = null;
    }

    /** Returns true if field annotations is set (has been assigned a value) and false otherwise */
    public boolean isSetAnnotations() {
      return this.annotations != null;
    }

    public void setAnnotationsIsSet(boolean value) {
      if (!value) {
        this.annotations = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SERVICE_NAME:
        if (value == null) {
          unsetService_name();
        } else {
          setService_name((String)value);
        }
        break;

      case ANNOTATIONS:
        if (value == null) {
          unsetAnnotations();
        } else {
          setAnnotations((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SERVICE_NAME:
        return getService_name();

      case ANNOTATIONS:
        return getAnnotations();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SERVICE_NAME:
        return isSetService_name();
      case ANNOTATIONS:
        return isSetAnnotations();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof storeTopKeyValueAnnotations_args)
        return this.equals((storeTopKeyValueAnnotations_args)that);
      return false;
    }

    public boolean equals(storeTopKeyValueAnnotations_args that) {
      if (that == null)
        return false;

      boolean this_present_service_name = true && this.isSetService_name();
      boolean that_present_service_name = true && that.isSetService_name();
      if (this_present_service_name || that_present_service_name) {
        if (!(this_present_service_name && that_present_service_name))
          return false;
        if (!this.service_name.equals(that.service_name))
          return false;
      }

      boolean this_present_annotations = true && this.isSetAnnotations();
      boolean that_present_annotations = true && that.isSetAnnotations();
      if (this_present_annotations || that_present_annotations) {
        if (!(this_present_annotations && that_present_annotations))
          return false;
        if (!this.annotations.equals(that.annotations))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(storeTopKeyValueAnnotations_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      storeTopKeyValueAnnotations_args typedOther = (storeTopKeyValueAnnotations_args)other;

      lastComparison = Boolean.valueOf(isSetService_name()).compareTo(typedOther.isSetService_name());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetService_name()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.service_name, typedOther.service_name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAnnotations()).compareTo(typedOther.isSetAnnotations());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAnnotations()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.annotations, typedOther.annotations);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("storeTopKeyValueAnnotations_args(");
      boolean first = true;

      sb.append("service_name:");
      if (this.service_name == null) {
        sb.append("null");
      } else {
        sb.append(this.service_name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("annotations:");
      if (this.annotations == null) {
        sb.append("null");
      } else {
        sb.append(this.annotations);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class storeTopKeyValueAnnotations_argsStandardSchemeFactory implements SchemeFactory {
      public storeTopKeyValueAnnotations_argsStandardScheme getScheme() {
        return new storeTopKeyValueAnnotations_argsStandardScheme();
      }
    }

    private static class storeTopKeyValueAnnotations_argsStandardScheme extends StandardScheme<storeTopKeyValueAnnotations_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, storeTopKeyValueAnnotations_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // SERVICE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.service_name = iprot.readString();
                struct.setService_nameIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ANNOTATIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
                  struct.annotations = new ArrayList<String>(_list8.size);
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
                  {
                    String _elem10; // required
                    _elem10 = iprot.readString();
                    struct.annotations.add(_elem10);
                  }
                  iprot.readListEnd();
                }
                struct.setAnnotationsIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, storeTopKeyValueAnnotations_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.service_name != null) {
          oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC);
          oprot.writeString(struct.service_name);
          oprot.writeFieldEnd();
        }
        if (struct.annotations != null) {
          oprot.writeFieldBegin(ANNOTATIONS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.annotations.size()));
            for (String _iter11 : struct.annotations)
            {
              oprot.writeString(_iter11);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class storeTopKeyValueAnnotations_argsTupleSchemeFactory implements SchemeFactory {
      public storeTopKeyValueAnnotations_argsTupleScheme getScheme() {
        return new storeTopKeyValueAnnotations_argsTupleScheme();
      }
    }

    private static class storeTopKeyValueAnnotations_argsTupleScheme extends TupleScheme<storeTopKeyValueAnnotations_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeTopKeyValueAnnotations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetService_name()) {
          optionals.set(0);
        }
        if (struct.isSetAnnotations()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetService_name()) {
          oprot.writeString(struct.service_name);
        }
        if (struct.isSetAnnotations()) {
          {
            oprot.writeI32(struct.annotations.size());
            for (String _iter12 : struct.annotations)
            {
              oprot.writeString(_iter12);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeTopKeyValueAnnotations_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.service_name = iprot.readString();
          struct.setService_nameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.annotations = new ArrayList<String>(_list13.size);
            for (int _i14 = 0; _i14 < _list13.size; ++_i14)
            {
              String _elem15; // required
              _elem15 = iprot.readString();
              struct.annotations.add(_elem15);
            }
          }
          struct.setAnnotationsIsSet(true);
        }
      }
    }

  }

  public static class storeTopKeyValueAnnotations_result implements org.apache.thrift.TBase<storeTopKeyValueAnnotations_result, storeTopKeyValueAnnotations_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeTopKeyValueAnnotations_result");

    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new storeTopKeyValueAnnotations_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new storeTopKeyValueAnnotations_resultTupleSchemeFactory());
    }

    private StoreAggregatesException e; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      E((short)1, "e");

      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: // E
            return E;
          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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeTopKeyValueAnnotations_result.class, metaDataMap);
    }

    public storeTopKeyValueAnnotations_result() {
    }

    public storeTopKeyValueAnnotations_result(
      StoreAggregatesException e)
    {
      this();
      this.e = e;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public storeTopKeyValueAnnotations_result(storeTopKeyValueAnnotations_result other) {
      if (other.isSetE()) {
        this.e = new StoreAggregatesException(other.e);
      }
    }

    public storeTopKeyValueAnnotations_result deepCopy() {
      return new storeTopKeyValueAnnotations_result(this);
    }

    @Override
    public void clear() {
      this.e = null;
    }

    public StoreAggregatesException getE() {
      return this.e;
    }

    public storeTopKeyValueAnnotations_result setE(StoreAggregatesException e) {
      this.e = e;
      return this;
    }

    public void unsetE() {
      this.e = null;
    }

    /** Returns true if field e is set (has been assigned a value) and false otherwise */
    public boolean isSetE() {
      return this.e != null;
    }

    public void setEIsSet(boolean value) {
      if (!value) {
        this.e = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case E:
        if (value == null) {
          unsetE();
        } else {
          setE((StoreAggregatesException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case E:
        return isSetE();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof storeTopKeyValueAnnotations_result)
        return this.equals((storeTopKeyValueAnnotations_result)that);
      return false;
    }

    public boolean equals(storeTopKeyValueAnnotations_result that) {
      if (that == null)
        return false;

      boolean this_present_e = true && this.isSetE();
      boolean that_present_e = true && that.isSetE();
      if (this_present_e || that_present_e) {
        if (!(this_present_e && that_present_e))
          return false;
        if (!this.e.equals(that.e))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(storeTopKeyValueAnnotations_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      storeTopKeyValueAnnotations_result typedOther = (storeTopKeyValueAnnotations_result)other;

      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("storeTopKeyValueAnnotations_result(");
      boolean first = true;

      sb.append("e:");
      if (this.e == null) {
        sb.append("null");
      } else {
        sb.append(this.e);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class storeTopKeyValueAnnotations_resultStandardSchemeFactory implements SchemeFactory {
      public storeTopKeyValueAnnotations_resultStandardScheme getScheme() {
        return new storeTopKeyValueAnnotations_resultStandardScheme();
      }
    }

    private static class storeTopKeyValueAnnotations_resultStandardScheme extends StandardScheme<storeTopKeyValueAnnotations_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, storeTopKeyValueAnnotations_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // E
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.e = new StoreAggregatesException();
                struct.e.read(iprot);
                struct.setEIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, storeTopKeyValueAnnotations_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.e != null) {
          oprot.writeFieldBegin(E_FIELD_DESC);
          struct.e.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class storeTopKeyValueAnnotations_resultTupleSchemeFactory implements SchemeFactory {
      public storeTopKeyValueAnnotations_resultTupleScheme getScheme() {
        return new storeTopKeyValueAnnotations_resultTupleScheme();
      }
    }

    private static class storeTopKeyValueAnnotations_resultTupleScheme extends TupleScheme<storeTopKeyValueAnnotations_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeTopKeyValueAnnotations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetE()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeTopKeyValueAnnotations_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e = new StoreAggregatesException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
      }
    }

  }

  public static class storeDependencies_args implements org.apache.thrift.TBase<storeDependencies_args, storeDependencies_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeDependencies_args");

    private static final org.apache.thrift.protocol.TField SERVICE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("service_name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField ENDPOINTS_FIELD_DESC = new org.apache.thrift.protocol.TField("endpoints", org.apache.thrift.protocol.TType.LIST, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new storeDependencies_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new storeDependencies_argsTupleSchemeFactory());
    }

    private String service_name; // required
    private List<String> endpoints; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SERVICE_NAME((short)1, "service_name"),
      ENDPOINTS((short)2, "endpoints");

      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: // SERVICE_NAME
            return SERVICE_NAME;
          case 2: // ENDPOINTS
            return ENDPOINTS;
          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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("service_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ENDPOINTS, new org.apache.thrift.meta_data.FieldMetaData("endpoints", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeDependencies_args.class, metaDataMap);
    }

    public storeDependencies_args() {
    }

    public storeDependencies_args(
      String service_name,
      List<String> endpoints)
    {
      this();
      this.service_name = service_name;
      this.endpoints = endpoints;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public storeDependencies_args(storeDependencies_args other) {
      if (other.isSetService_name()) {
        this.service_name = other.service_name;
      }
      if (other.isSetEndpoints()) {
        List<String> __this__endpoints = new ArrayList<String>();
        for (String other_element : other.endpoints) {
          __this__endpoints.add(other_element);
        }
        this.endpoints = __this__endpoints;
      }
    }

    public storeDependencies_args deepCopy() {
      return new storeDependencies_args(this);
    }

    @Override
    public void clear() {
      this.service_name = null;
      this.endpoints = null;
    }

    public String getService_name() {
      return this.service_name;
    }

    public storeDependencies_args setService_name(String service_name) {
      this.service_name = service_name;
      return this;
    }

    public void unsetService_name() {
      this.service_name = null;
    }

    /** Returns true if field service_name is set (has been assigned a value) and false otherwise */
    public boolean isSetService_name() {
      return this.service_name != null;
    }

    public void setService_nameIsSet(boolean value) {
      if (!value) {
        this.service_name = null;
      }
    }

    public int getEndpointsSize() {
      return (this.endpoints == null) ? 0 : this.endpoints.size();
    }

    public java.util.Iterator<String> getEndpointsIterator() {
      return (this.endpoints == null) ? null : this.endpoints.iterator();
    }

    public void addToEndpoints(String elem) {
      if (this.endpoints == null) {
        this.endpoints = new ArrayList<String>();
      }
      this.endpoints.add(elem);
    }

    public List<String> getEndpoints() {
      return this.endpoints;
    }

    public storeDependencies_args setEndpoints(List<String> endpoints) {
      this.endpoints = endpoints;
      return this;
    }

    public void unsetEndpoints() {
      this.endpoints = null;
    }

    /** Returns true if field endpoints is set (has been assigned a value) and false otherwise */
    public boolean isSetEndpoints() {
      return this.endpoints != null;
    }

    public void setEndpointsIsSet(boolean value) {
      if (!value) {
        this.endpoints = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SERVICE_NAME:
        if (value == null) {
          unsetService_name();
        } else {
          setService_name((String)value);
        }
        break;

      case ENDPOINTS:
        if (value == null) {
          unsetEndpoints();
        } else {
          setEndpoints((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SERVICE_NAME:
        return getService_name();

      case ENDPOINTS:
        return getEndpoints();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SERVICE_NAME:
        return isSetService_name();
      case ENDPOINTS:
        return isSetEndpoints();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof storeDependencies_args)
        return this.equals((storeDependencies_args)that);
      return false;
    }

    public boolean equals(storeDependencies_args that) {
      if (that == null)
        return false;

      boolean this_present_service_name = true && this.isSetService_name();
      boolean that_present_service_name = true && that.isSetService_name();
      if (this_present_service_name || that_present_service_name) {
        if (!(this_present_service_name && that_present_service_name))
          return false;
        if (!this.service_name.equals(that.service_name))
          return false;
      }

      boolean this_present_endpoints = true && this.isSetEndpoints();
      boolean that_present_endpoints = true && that.isSetEndpoints();
      if (this_present_endpoints || that_present_endpoints) {
        if (!(this_present_endpoints && that_present_endpoints))
          return false;
        if (!this.endpoints.equals(that.endpoints))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(storeDependencies_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      storeDependencies_args typedOther = (storeDependencies_args)other;

      lastComparison = Boolean.valueOf(isSetService_name()).compareTo(typedOther.isSetService_name());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetService_name()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.service_name, typedOther.service_name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEndpoints()).compareTo(typedOther.isSetEndpoints());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndpoints()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endpoints, typedOther.endpoints);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("storeDependencies_args(");
      boolean first = true;

      sb.append("service_name:");
      if (this.service_name == null) {
        sb.append("null");
      } else {
        sb.append(this.service_name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("endpoints:");
      if (this.endpoints == null) {
        sb.append("null");
      } else {
        sb.append(this.endpoints);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class storeDependencies_argsStandardSchemeFactory implements SchemeFactory {
      public storeDependencies_argsStandardScheme getScheme() {
        return new storeDependencies_argsStandardScheme();
      }
    }

    private static class storeDependencies_argsStandardScheme extends StandardScheme<storeDependencies_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, storeDependencies_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // SERVICE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.service_name = iprot.readString();
                struct.setService_nameIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ENDPOINTS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
                  struct.endpoints = new ArrayList<String>(_list16.size);
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
                  {
                    String _elem18; // required
                    _elem18 = iprot.readString();
                    struct.endpoints.add(_elem18);
                  }
                  iprot.readListEnd();
                }
                struct.setEndpointsIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, storeDependencies_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.service_name != null) {
          oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC);
          oprot.writeString(struct.service_name);
          oprot.writeFieldEnd();
        }
        if (struct.endpoints != null) {
          oprot.writeFieldBegin(ENDPOINTS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.endpoints.size()));
            for (String _iter19 : struct.endpoints)
            {
              oprot.writeString(_iter19);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class storeDependencies_argsTupleSchemeFactory implements SchemeFactory {
      public storeDependencies_argsTupleScheme getScheme() {
        return new storeDependencies_argsTupleScheme();
      }
    }

    private static class storeDependencies_argsTupleScheme extends TupleScheme<storeDependencies_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeDependencies_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetService_name()) {
          optionals.set(0);
        }
        if (struct.isSetEndpoints()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetService_name()) {
          oprot.writeString(struct.service_name);
        }
        if (struct.isSetEndpoints()) {
          {
            oprot.writeI32(struct.endpoints.size());
            for (String _iter20 : struct.endpoints)
            {
              oprot.writeString(_iter20);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeDependencies_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.service_name = iprot.readString();
          struct.setService_nameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.endpoints = new ArrayList<String>(_list21.size);
            for (int _i22 = 0; _i22 < _list21.size; ++_i22)
            {
              String _elem23; // required
              _elem23 = iprot.readString();
              struct.endpoints.add(_elem23);
            }
          }
          struct.setEndpointsIsSet(true);
        }
      }
    }

  }

  public static class storeDependencies_result implements org.apache.thrift.TBase<storeDependencies_result, storeDependencies_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("storeDependencies_result");

    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new storeDependencies_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new storeDependencies_resultTupleSchemeFactory());
    }

    private StoreAggregatesException e; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      E((short)1, "e");

      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: // E
            return E;
          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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(storeDependencies_result.class, metaDataMap);
    }

    public storeDependencies_result() {
    }

    public storeDependencies_result(
      StoreAggregatesException e)
    {
      this();
      this.e = e;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public storeDependencies_result(storeDependencies_result other) {
      if (other.isSetE()) {
        this.e = new StoreAggregatesException(other.e);
      }
    }

    public storeDependencies_result deepCopy() {
      return new storeDependencies_result(this);
    }

    @Override
    public void clear() {
      this.e = null;
    }

    public StoreAggregatesException getE() {
      return this.e;
    }

    public storeDependencies_result setE(StoreAggregatesException e) {
      this.e = e;
      return this;
    }

    public void unsetE() {
      this.e = null;
    }

    /** Returns true if field e is set (has been assigned a value) and false otherwise */
    public boolean isSetE() {
      return this.e != null;
    }

    public void setEIsSet(boolean value) {
      if (!value) {
        this.e = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case E:
        if (value == null) {
          unsetE();
        } else {
          setE((StoreAggregatesException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case E:
        return isSetE();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof storeDependencies_result)
        return this.equals((storeDependencies_result)that);
      return false;
    }

    public boolean equals(storeDependencies_result that) {
      if (that == null)
        return false;

      boolean this_present_e = true && this.isSetE();
      boolean that_present_e = true && that.isSetE();
      if (this_present_e || that_present_e) {
        if (!(this_present_e && that_present_e))
          return false;
        if (!this.e.equals(that.e))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(storeDependencies_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      storeDependencies_result typedOther = (storeDependencies_result)other;

      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("storeDependencies_result(");
      boolean first = true;

      sb.append("e:");
      if (this.e == null) {
        sb.append("null");
      } else {
        sb.append(this.e);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class storeDependencies_resultStandardSchemeFactory implements SchemeFactory {
      public storeDependencies_resultStandardScheme getScheme() {
        return new storeDependencies_resultStandardScheme();
      }
    }

    private static class storeDependencies_resultStandardScheme extends StandardScheme<storeDependencies_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, storeDependencies_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // E
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.e = new StoreAggregatesException();
                struct.e.read(iprot);
                struct.setEIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, storeDependencies_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.e != null) {
          oprot.writeFieldBegin(E_FIELD_DESC);
          struct.e.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class storeDependencies_resultTupleSchemeFactory implements SchemeFactory {
      public storeDependencies_resultTupleScheme getScheme() {
        return new storeDependencies_resultTupleScheme();
      }
    }

    private static class storeDependencies_resultTupleScheme extends TupleScheme<storeDependencies_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, storeDependencies_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetE()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, storeDependencies_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e = new StoreAggregatesException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
      }
    }

  }

}
TOP

Related Classes of com.twitter.zipkin.gen.ZipkinCollector$storeDependencies_result$storeDependencies_resultTupleSchemeFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.