Subversion Repositories SmartDukaan

Rev

Rev 3896 | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package in.shop2020.content;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ContentService {

  public interface Iface extends in.shop2020.generic.GenericService.Iface {

    /**
     * Push the content of the given entity to production
     * 
     * @param entityId
     */
    public boolean pushContentToProduction(long entityId) throws ContentServiceException, org.apache.thrift.TException;

    public List<BulkContentUploadResult> uploadContent(List<BulkContentUpload> bulkUploadContentList) throws org.apache.thrift.TException;

  }

  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {

    public void pushContentToProduction(long entityId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.pushContentToProduction_call> resultHandler) throws org.apache.thrift.TException;

    public void uploadContent(List<BulkContentUpload> bulkUploadContentList, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.uploadContent_call> resultHandler) throws org.apache.thrift.TException;

  }

  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
      public Factory() {}
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

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

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

    public boolean pushContentToProduction(long entityId) throws ContentServiceException, org.apache.thrift.TException
    {
      send_pushContentToProduction(entityId);
      return recv_pushContentToProduction();
    }

    public void send_pushContentToProduction(long entityId) throws org.apache.thrift.TException
    {
      pushContentToProduction_args args = new pushContentToProduction_args();
      args.setEntityId(entityId);
      sendBase("pushContentToProduction", args);
    }

    public boolean recv_pushContentToProduction() throws ContentServiceException, org.apache.thrift.TException
    {
      pushContentToProduction_result result = new pushContentToProduction_result();
      receiveBase(result, "pushContentToProduction");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cse != null) {
        throw result.cse;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "pushContentToProduction failed: unknown result");
    }

    public List<BulkContentUploadResult> uploadContent(List<BulkContentUpload> bulkUploadContentList) throws org.apache.thrift.TException
    {
      send_uploadContent(bulkUploadContentList);
      return recv_uploadContent();
    }

    public void send_uploadContent(List<BulkContentUpload> bulkUploadContentList) throws org.apache.thrift.TException
    {
      uploadContent_args args = new uploadContent_args();
      args.setBulkUploadContentList(bulkUploadContentList);
      sendBase("uploadContent", args);
    }

    public List<BulkContentUploadResult> recv_uploadContent() throws org.apache.thrift.TException
    {
      uploadContent_result result = new uploadContent_result();
      receiveBase(result, "uploadContent");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "uploadContent failed: unknown result");
    }

  }
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
      private org.apache.thrift.async.TAsyncClientManager clientManager;
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

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

    public void pushContentToProduction(long entityId, org.apache.thrift.async.AsyncMethodCallback<pushContentToProduction_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      pushContentToProduction_call method_call = new pushContentToProduction_call(entityId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class pushContentToProduction_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long entityId;
      public pushContentToProduction_call(long entityId, org.apache.thrift.async.AsyncMethodCallback<pushContentToProduction_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.entityId = entityId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pushContentToProduction", org.apache.thrift.protocol.TMessageType.CALL, 0));
        pushContentToProduction_args args = new pushContentToProduction_args();
        args.setEntityId(entityId);
        args.write(prot);
        prot.writeMessageEnd();
      }

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

    public void uploadContent(List<BulkContentUpload> bulkUploadContentList, org.apache.thrift.async.AsyncMethodCallback<uploadContent_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      uploadContent_call method_call = new uploadContent_call(bulkUploadContentList, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class uploadContent_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<BulkContentUpload> bulkUploadContentList;
      public uploadContent_call(List<BulkContentUpload> bulkUploadContentList, org.apache.thrift.async.AsyncMethodCallback<uploadContent_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.bulkUploadContentList = bulkUploadContentList;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("uploadContent", org.apache.thrift.protocol.TMessageType.CALL, 0));
        uploadContent_args args = new uploadContent_args();
        args.setBulkUploadContentList(bulkUploadContentList);
        args.write(prot);
        prot.writeMessageEnd();
      }

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

  }

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

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

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

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

      protected pushContentToProduction_args getEmptyArgsInstance() {
        return new pushContentToProduction_args();
      }

      protected pushContentToProduction_result getResult(I iface, pushContentToProduction_args args) throws org.apache.thrift.TException {
        pushContentToProduction_result result = new pushContentToProduction_result();
        try {
          result.success = iface.pushContentToProduction(args.entityId);
          result.setSuccessIsSet(true);
        } catch (ContentServiceException cse) {
          result.cse = cse;
        }
        return result;
      }
    }

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

      protected uploadContent_args getEmptyArgsInstance() {
        return new uploadContent_args();
      }

      protected uploadContent_result getResult(I iface, uploadContent_args args) throws org.apache.thrift.TException {
        uploadContent_result result = new uploadContent_result();
        result.success = iface.uploadContent(args.bulkUploadContentList);
        return result;
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long entityId; // 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 {
      ENTITY_ID((short)1, "entityId");

      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: // ENTITY_ID
            return ENTITY_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ENTITYID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pushContentToProduction_args.class, metaDataMap);
    }

    public pushContentToProduction_args() {
    }

    public pushContentToProduction_args(
      long entityId)
    {
      this();
      this.entityId = entityId;
      setEntityIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public pushContentToProduction_args(pushContentToProduction_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.entityId = other.entityId;
    }

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

    @Override
    public void clear() {
      setEntityIdIsSet(false);
      this.entityId = 0;
    }

    public long getEntityId() {
      return this.entityId;
    }

    public void setEntityId(long entityId) {
      this.entityId = entityId;
      setEntityIdIsSet(true);
    }

    public void unsetEntityId() {
      __isset_bit_vector.clear(__ENTITYID_ISSET_ID);
    }

    /** Returns true if field entityId is set (has been assigned a value) and false otherwise */
    public boolean isSetEntityId() {
      return __isset_bit_vector.get(__ENTITYID_ISSET_ID);
    }

    public void setEntityIdIsSet(boolean value) {
      __isset_bit_vector.set(__ENTITYID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ENTITY_ID:
        if (value == null) {
          unsetEntityId();
        } else {
          setEntityId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ENTITY_ID:
        return Long.valueOf(getEntityId());

      }
      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 ENTITY_ID:
        return isSetEntityId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_entityId = true;
      boolean that_present_entityId = true;
      if (this_present_entityId || that_present_entityId) {
        if (!(this_present_entityId && that_present_entityId))
          return false;
        if (this.entityId != that.entityId)
          return false;
      }

      return true;
    }

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

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

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

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

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

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ENTITY_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.entityId = iprot.readI64();
              setEntityIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
      oprot.writeI64(this.entityId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("entityId:");
      sb.append(this.entityId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

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

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

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

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
    private static final org.apache.thrift.protocol.TField CSE_FIELD_DESC = new org.apache.thrift.protocol.TField("cse", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private ContentServiceException cse; // required

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

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CSE
            return CSE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.CSE, new org.apache.thrift.meta_data.FieldMetaData("cse", 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(pushContentToProduction_result.class, metaDataMap);
    }

    public pushContentToProduction_result() {
    }

    public pushContentToProduction_result(
      boolean success,
      ContentServiceException cse)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.cse = cse;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public pushContentToProduction_result(pushContentToProduction_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetCse()) {
        this.cse = new ContentServiceException(other.cse);
      }
    }

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

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.cse = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public ContentServiceException getCse() {
      return this.cse;
    }

    public void setCse(ContentServiceException cse) {
      this.cse = cse;
    }

    public void unsetCse() {
      this.cse = null;
    }

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

    public void setCseIsSet(boolean value) {
      if (!value) {
        this.cse = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case CSE:
        if (value == null) {
          unsetCse();
        } else {
          setCse((ContentServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case CSE:
        return getCse();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CSE:
        return isSetCse();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_cse = true && this.isSetCse();
      boolean that_present_cse = true && that.isSetCse();
      if (this_present_cse || that_present_cse) {
        if (!(this_present_cse && that_present_cse))
          return false;
        if (!this.cse.equals(that.cse))
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCse()).compareTo(typedOther.isSetCse());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCse()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cse, typedOther.cse);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CSE
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cse = new ContentServiceException();
              this.cse.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetCse()) {
        oprot.writeFieldBegin(CSE_FIELD_DESC);
        this.cse.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

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

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

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

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

  }

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

    private static final org.apache.thrift.protocol.TField BULK_UPLOAD_CONTENT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkUploadContentList", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<BulkContentUpload> bulkUploadContentList; // required

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

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // BULK_UPLOAD_CONTENT_LIST
            return BULK_UPLOAD_CONTENT_LIST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id 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.BULK_UPLOAD_CONTENT_LIST, new org.apache.thrift.meta_data.FieldMetaData("bulkUploadContentList", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkContentUpload.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadContent_args.class, metaDataMap);
    }

    public uploadContent_args() {
    }

    public uploadContent_args(
      List<BulkContentUpload> bulkUploadContentList)
    {
      this();
      this.bulkUploadContentList = bulkUploadContentList;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public uploadContent_args(uploadContent_args other) {
      if (other.isSetBulkUploadContentList()) {
        List<BulkContentUpload> __this__bulkUploadContentList = new ArrayList<BulkContentUpload>();
        for (BulkContentUpload other_element : other.bulkUploadContentList) {
          __this__bulkUploadContentList.add(new BulkContentUpload(other_element));
        }
        this.bulkUploadContentList = __this__bulkUploadContentList;
      }
    }

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

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

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

    public java.util.Iterator<BulkContentUpload> getBulkUploadContentListIterator() {
      return (this.bulkUploadContentList == null) ? null : this.bulkUploadContentList.iterator();
    }

    public void addToBulkUploadContentList(BulkContentUpload elem) {
      if (this.bulkUploadContentList == null) {
        this.bulkUploadContentList = new ArrayList<BulkContentUpload>();
      }
      this.bulkUploadContentList.add(elem);
    }

    public List<BulkContentUpload> getBulkUploadContentList() {
      return this.bulkUploadContentList;
    }

    public void setBulkUploadContentList(List<BulkContentUpload> bulkUploadContentList) {
      this.bulkUploadContentList = bulkUploadContentList;
    }

    public void unsetBulkUploadContentList() {
      this.bulkUploadContentList = null;
    }

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

    public void setBulkUploadContentListIsSet(boolean value) {
      if (!value) {
        this.bulkUploadContentList = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case BULK_UPLOAD_CONTENT_LIST:
        if (value == null) {
          unsetBulkUploadContentList();
        } else {
          setBulkUploadContentList((List<BulkContentUpload>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case BULK_UPLOAD_CONTENT_LIST:
        return getBulkUploadContentList();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case BULK_UPLOAD_CONTENT_LIST:
        return isSetBulkUploadContentList();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_bulkUploadContentList = true && this.isSetBulkUploadContentList();
      boolean that_present_bulkUploadContentList = true && that.isSetBulkUploadContentList();
      if (this_present_bulkUploadContentList || that_present_bulkUploadContentList) {
        if (!(this_present_bulkUploadContentList && that_present_bulkUploadContentList))
          return false;
        if (!this.bulkUploadContentList.equals(that.bulkUploadContentList))
          return false;
      }

      return true;
    }

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

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

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

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

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

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // BULK_UPLOAD_CONTENT_LIST
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                this.bulkUploadContentList = new ArrayList<BulkContentUpload>(_list0.size);
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
                {
                  BulkContentUpload _elem2; // required
                  _elem2 = new BulkContentUpload();
                  _elem2.read(iprot);
                  this.bulkUploadContentList.add(_elem2);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.bulkUploadContentList != null) {
        oprot.writeFieldBegin(BULK_UPLOAD_CONTENT_LIST_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.bulkUploadContentList.size()));
          for (BulkContentUpload _iter3 : this.bulkUploadContentList)
          {
            _iter3.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

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

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

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

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

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<BulkContentUploadResult> success; // required

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

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkContentUploadResult.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadContent_result.class, metaDataMap);
    }

    public uploadContent_result() {
    }

    public uploadContent_result(
      List<BulkContentUploadResult> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public uploadContent_result(uploadContent_result other) {
      if (other.isSetSuccess()) {
        List<BulkContentUploadResult> __this__success = new ArrayList<BulkContentUploadResult>();
        for (BulkContentUploadResult other_element : other.success) {
          __this__success.add(new BulkContentUploadResult(other_element));
        }
        this.success = __this__success;
      }
    }

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

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

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

    public java.util.Iterator<BulkContentUploadResult> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(BulkContentUploadResult elem) {
      if (this.success == null) {
        this.success = new ArrayList<BulkContentUploadResult>();
      }
      this.success.add(elem);
    }

    public List<BulkContentUploadResult> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<BulkContentUploadResult> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<BulkContentUploadResult>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

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

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

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

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

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

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
                this.success = new ArrayList<BulkContentUploadResult>(_list4.size);
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
                {
                  BulkContentUploadResult _elem6; // required
                  _elem6 = new BulkContentUploadResult();
                  _elem6.read(iprot);
                  this.success.add(_elem6);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (BulkContentUploadResult _iter7 : this.success)
          {
            _iter7.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

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

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

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

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

  }

}