summaryrefslogblamecommitdiffstats
path: root/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java
blob: abba44a2b674d2e559357f3435431df422073ea1 (plain) (tree)
1
2
   
                                           




























                                                                   
                                  


                               

                                                                                   







                                                                                                                                                                                         


                                                                                                                                                                                           
                                                                                                                                                                                   











                                                                                                                                     


                                          
                                           







                                                                                                                  

                                            

                                          























                                                                                      





                                

                            










































                                                                                                     


                                                       













                                                                                                                                                    





                                                                                                                                                     


                                                                                                                                            












                                                                                                           

                         

                          









                                 





                                     
                             















                                                         


                                           



                                                                            















                                         





                                
                         






















































































































                                                                                                




































































                                                                                                  






































                                                                                              









































                                                          























                                        







                                         








                                              
                             

                     
                             

                   
                           



                             
                       
                              

                  
                         

                      
                             
 


                           




















                                                                                                              





                                 

                             





























































                                                                     


























                                                                    








                                                                 




                         















































                                                             



























































                                                                                                  





























                                                                                                      









                                                                                              















































                                                                                                     










                                 







                                




















































































                                                                                                                                    























                                                                                     


                                                                            

                                                                                 

                                                               
                 

                                               







                                                                                     

































                                                                                                                                   








                                                      



                                                                                                                                      
                                                
           
                                       




                               
































                                                                                                                                  
                                       
                         

                                  
                         

                                      
                         
       
                                   
                         
       
                                      














                                             








                                             


                                                 
                                                
           
                                       


           




                                                                                                                                 
                                            




















                                               


                                               
                            


                                          
                            


                                              
                            
         

                                                                                                                                                    

                                                         
           

                                         



                                      




     
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.openslx.bwlp.thrift.iface;

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 org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
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 javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-04")
public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersionDetails, ImageVersionDetails._Fields>, java.io.Serializable, Cloneable, Comparable<ImageVersionDetails> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageVersionDetails");

  private static final org.apache.thrift.protocol.TField VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("versionId", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField EXPIRE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("expireTime", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField UPLOADER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("uploaderId", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField IS_RESTRICTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isRestricted", org.apache.thrift.protocol.TType.BOOL, (short)7);
  private static final org.apache.thrift.protocol.TField IS_VALID_FIELD_DESC = new org.apache.thrift.protocol.TField("isValid", org.apache.thrift.protocol.TType.BOOL, (short)8);
  private static final org.apache.thrift.protocol.TField IS_PROCESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("isProcessed", org.apache.thrift.protocol.TType.BOOL, (short)9);
  private static final org.apache.thrift.protocol.TField SOFTWARE_FIELD_DESC = new org.apache.thrift.protocol.TField("software", org.apache.thrift.protocol.TType.LIST, (short)10);

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

  public String versionId; // required
  public long createTime; // required
  public long expireTime; // required
  public long fileSize; // required
  public String uploaderId; // required
  public boolean isRestricted; // required
  public boolean isValid; // required
  public boolean isProcessed; // required
  public List<String> software; // 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 {
    VERSION_ID((short)1, "versionId"),
    CREATE_TIME((short)2, "createTime"),
    EXPIRE_TIME((short)3, "expireTime"),
    FILE_SIZE((short)4, "fileSize"),
    UPLOADER_ID((short)5, "uploaderId"),
    IS_RESTRICTED((short)7, "isRestricted"),
    IS_VALID((short)8, "isValid"),
    IS_PROCESSED((short)9, "isProcessed"),
    SOFTWARE((short)10, "software");

    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: // VERSION_ID
          return VERSION_ID;
        case 2: // CREATE_TIME
          return CREATE_TIME;
        case 3: // EXPIRE_TIME
          return EXPIRE_TIME;
        case 4: // FILE_SIZE
          return FILE_SIZE;
        case 5: // UPLOADER_ID
          return UPLOADER_ID;
        case 7: // IS_RESTRICTED
          return IS_RESTRICTED;
        case 8: // IS_VALID
          return IS_VALID;
        case 9: // IS_PROCESSED
          return IS_PROCESSED;
        case 10: // SOFTWARE
          return SOFTWARE;
        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 __CREATETIME_ISSET_ID = 0;
  private static final int __EXPIRETIME_ISSET_ID = 1;
  private static final int __FILESIZE_ISSET_ID = 2;
  private static final int __ISRESTRICTED_ISSET_ID = 3;
  private static final int __ISVALID_ISSET_ID = 4;
  private static final int __ISPROCESSED_ISSET_ID = 5;
  private byte __isset_bitfield = 0;
  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.VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("versionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , "UUID")));
    tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "UnixTimestamp")));
    tmpMap.put(_Fields.EXPIRE_TIME, new org.apache.thrift.meta_data.FieldMetaData("expireTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64        , "UnixTimestamp")));
    tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.UPLOADER_ID, new org.apache.thrift.meta_data.FieldMetaData("uploaderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , "UUID")));
    tmpMap.put(_Fields.IS_RESTRICTED, new org.apache.thrift.meta_data.FieldMetaData("isRestricted", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IS_VALID, new org.apache.thrift.meta_data.FieldMetaData("isValid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IS_PROCESSED, new org.apache.thrift.meta_data.FieldMetaData("isProcessed", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.SOFTWARE, new org.apache.thrift.meta_data.FieldMetaData("software", 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(ImageVersionDetails.class, metaDataMap);
  }

  public ImageVersionDetails() {
  }

  public ImageVersionDetails(
    String versionId,
    long createTime,
    long expireTime,
    long fileSize,
    String uploaderId,
    boolean isRestricted,
    boolean isValid,
    boolean isProcessed,
    List<String> software)
  {
    this();
    this.versionId = versionId;
    this.createTime = createTime;
    setCreateTimeIsSet(true);
    this.expireTime = expireTime;
    setExpireTimeIsSet(true);
    this.fileSize = fileSize;
    setFileSizeIsSet(true);
    this.uploaderId = uploaderId;
    this.isRestricted = isRestricted;
    setIsRestrictedIsSet(true);
    this.isValid = isValid;
    setIsValidIsSet(true);
    this.isProcessed = isProcessed;
    setIsProcessedIsSet(true);
    this.software = software;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public ImageVersionDetails(ImageVersionDetails other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetVersionId()) {
      this.versionId = other.versionId;
    }
    this.createTime = other.createTime;
    this.expireTime = other.expireTime;
    this.fileSize = other.fileSize;
    if (other.isSetUploaderId()) {
      this.uploaderId = other.uploaderId;
    }
    this.isRestricted = other.isRestricted;
    this.isValid = other.isValid;
    this.isProcessed = other.isProcessed;
    if (other.isSetSoftware()) {
      List<String> __this__software = new ArrayList<String>(other.software);
      this.software = __this__software;
    }
  }

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

  @Override
  public void clear() {
    this.versionId = null;
    setCreateTimeIsSet(false);
    this.createTime = 0;
    setExpireTimeIsSet(false);
    this.expireTime = 0;
    setFileSizeIsSet(false);
    this.fileSize = 0;
    this.uploaderId = null;
    setIsRestrictedIsSet(false);
    this.isRestricted = false;
    setIsValidIsSet(false);
    this.isValid = false;
    setIsProcessedIsSet(false);
    this.isProcessed = false;
    this.software = null;
  }

  public String getVersionId() {
    return this.versionId;
  }

  public ImageVersionDetails setVersionId(String versionId) {
    this.versionId = versionId;
    return this;
  }

  public void unsetVersionId() {
    this.versionId = null;
  }

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

  public void setVersionIdIsSet(boolean value) {
    if (!value) {
      this.versionId = null;
    }
  }

  public long getCreateTime() {
    return this.createTime;
  }

  public ImageVersionDetails setCreateTime(long createTime) {
    this.createTime = createTime;
    setCreateTimeIsSet(true);
    return this;
  }

  public void unsetCreateTime() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
  }

  /** Returns true if field createTime is set (has been assigned a value) and false otherwise */
  public boolean isSetCreateTime() {
    return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
  }

  public void setCreateTimeIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
  }

  public long getExpireTime() {
    return this.expireTime;
  }

  public ImageVersionDetails setExpireTime(long expireTime) {
    this.expireTime = expireTime;
    setExpireTimeIsSet(true);
    return this;
  }

  public void unsetExpireTime() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
  }

  /** Returns true if field expireTime is set (has been assigned a value) and false otherwise */
  public boolean isSetExpireTime() {
    return EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
  }

  public void setExpireTimeIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
  }

  public long getFileSize() {
    return this.fileSize;
  }

  public ImageVersionDetails setFileSize(long fileSize) {
    this.fileSize = fileSize;
    setFileSizeIsSet(true);
    return this;
  }

  public void unsetFileSize() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
  }

  /** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
  public boolean isSetFileSize() {
    return EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
  }

  public void setFileSizeIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
  }

  public String getUploaderId() {
    return this.uploaderId;
  }

  public ImageVersionDetails setUploaderId(String uploaderId) {
    this.uploaderId = uploaderId;
    return this;
  }

  public void unsetUploaderId() {
    this.uploaderId = null;
  }

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

  public void setUploaderIdIsSet(boolean value) {
    if (!value) {
      this.uploaderId = null;
    }
  }

  public boolean isIsRestricted() {
    return this.isRestricted;
  }

  public ImageVersionDetails setIsRestricted(boolean isRestricted) {
    this.isRestricted = isRestricted;
    setIsRestrictedIsSet(true);
    return this;
  }

  public void unsetIsRestricted() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
  }

  /** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */
  public boolean isSetIsRestricted() {
    return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
  }

  public void setIsRestrictedIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
  }

  public boolean isIsValid() {
    return this.isValid;
  }

  public ImageVersionDetails setIsValid(boolean isValid) {
    this.isValid = isValid;
    setIsValidIsSet(true);
    return this;
  }

  public void unsetIsValid() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID);
  }

  /** Returns true if field isValid is set (has been assigned a value) and false otherwise */
  public boolean isSetIsValid() {
    return EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID);
  }

  public void setIsValidIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value);
  }

  public boolean isIsProcessed() {
    return this.isProcessed;
  }

  public ImageVersionDetails setIsProcessed(boolean isProcessed) {
    this.isProcessed = isProcessed;
    setIsProcessedIsSet(true);
    return this;
  }

  public void unsetIsProcessed() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
  }

  /** Returns true if field isProcessed is set (has been assigned a value) and false otherwise */
  public boolean isSetIsProcessed() {
    return EncodingUtils.testBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
  }

  public void setIsProcessedIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISPROCESSED_ISSET_ID, value);
  }

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

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

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

  public List<String> getSoftware() {
    return this.software;
  }

  public ImageVersionDetails setSoftware(List<String> software) {
    this.software = software;
    return this;
  }

  public void unsetSoftware() {
    this.software = null;
  }

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

  public void setSoftwareIsSet(boolean value) {
    if (!value) {
      this.software = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case VERSION_ID:
      if (value == null) {
        unsetVersionId();
      } else {
        setVersionId((String)value);
      }
      break;

    case CREATE_TIME:
      if (value == null) {
        unsetCreateTime();
      } else {
        setCreateTime((Long)value);
      }
      break;

    case EXPIRE_TIME:
      if (value == null) {
        unsetExpireTime();
      } else {
        setExpireTime((Long)value);
      }
      break;

    case FILE_SIZE:
      if (value == null) {
        unsetFileSize();
      } else {
        setFileSize((Long)value);
      }
      break;

    case UPLOADER_ID:
      if (value == null) {
        unsetUploaderId();
      } else {
        setUploaderId((String)value);
      }
      break;

    case IS_RESTRICTED:
      if (value == null) {
        unsetIsRestricted();
      } else {
        setIsRestricted((Boolean)value);
      }
      break;

    case IS_VALID:
      if (value == null) {
        unsetIsValid();
      } else {
        setIsValid((Boolean)value);
      }
      break;

    case IS_PROCESSED:
      if (value == null) {
        unsetIsProcessed();
      } else {
        setIsProcessed((Boolean)value);
      }
      break;

    case SOFTWARE:
      if (value == null) {
        unsetSoftware();
      } else {
        setSoftware((List<String>)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case VERSION_ID:
      return getVersionId();

    case CREATE_TIME:
      return getCreateTime();

    case EXPIRE_TIME:
      return getExpireTime();

    case FILE_SIZE:
      return getFileSize();

    case UPLOADER_ID:
      return getUploaderId();

    case IS_RESTRICTED:
      return isIsRestricted();

    case IS_VALID:
      return isIsValid();

    case IS_PROCESSED:
      return isIsProcessed();

    case SOFTWARE:
      return getSoftware();

    }
    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 VERSION_ID:
      return isSetVersionId();
    case CREATE_TIME:
      return isSetCreateTime();
    case EXPIRE_TIME:
      return isSetExpireTime();
    case FILE_SIZE:
      return isSetFileSize();
    case UPLOADER_ID:
      return isSetUploaderId();
    case IS_RESTRICTED:
      return isSetIsRestricted();
    case IS_VALID:
      return isSetIsValid();
    case IS_PROCESSED:
      return isSetIsProcessed();
    case SOFTWARE:
      return isSetSoftware();
    }
    throw new IllegalStateException();
  }

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

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

    boolean this_present_versionId = true && this.isSetVersionId();
    boolean that_present_versionId = true && that.isSetVersionId();
    if (this_present_versionId || that_present_versionId) {
      if (!(this_present_versionId && that_present_versionId))
        return false;
      if (!this.versionId.equals(that.versionId))
        return false;
    }

    boolean this_present_createTime = true;
    boolean that_present_createTime = true;
    if (this_present_createTime || that_present_createTime) {
      if (!(this_present_createTime && that_present_createTime))
        return false;
      if (this.createTime != that.createTime)
        return false;
    }

    boolean this_present_expireTime = true;
    boolean that_present_expireTime = true;
    if (this_present_expireTime || that_present_expireTime) {
      if (!(this_present_expireTime && that_present_expireTime))
        return false;
      if (this.expireTime != that.expireTime)
        return false;
    }

    boolean this_present_fileSize = true;
    boolean that_present_fileSize = true;
    if (this_present_fileSize || that_present_fileSize) {
      if (!(this_present_fileSize && that_present_fileSize))
        return false;
      if (this.fileSize != that.fileSize)
        return false;
    }

    boolean this_present_uploaderId = true && this.isSetUploaderId();
    boolean that_present_uploaderId = true && that.isSetUploaderId();
    if (this_present_uploaderId || that_present_uploaderId) {
      if (!(this_present_uploaderId && that_present_uploaderId))
        return false;
      if (!this.uploaderId.equals(that.uploaderId))
        return false;
    }

    boolean this_present_isRestricted = true;
    boolean that_present_isRestricted = true;
    if (this_present_isRestricted || that_present_isRestricted) {
      if (!(this_present_isRestricted && that_present_isRestricted))
        return false;
      if (this.isRestricted != that.isRestricted)
        return false;
    }

    boolean this_present_isValid = true;
    boolean that_present_isValid = true;
    if (this_present_isValid || that_present_isValid) {
      if (!(this_present_isValid && that_present_isValid))
        return false;
      if (this.isValid != that.isValid)
        return false;
    }

    boolean this_present_isProcessed = true;
    boolean that_present_isProcessed = true;
    if (this_present_isProcessed || that_present_isProcessed) {
      if (!(this_present_isProcessed && that_present_isProcessed))
        return false;
      if (this.isProcessed != that.isProcessed)
        return false;
    }

    boolean this_present_software = true && this.isSetSoftware();
    boolean that_present_software = true && that.isSetSoftware();
    if (this_present_software || that_present_software) {
      if (!(this_present_software && that_present_software))
        return false;
      if (!this.software.equals(that.software))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List<Object> list = new ArrayList<Object>();

    boolean present_versionId = true && (isSetVersionId());
    list.add(present_versionId);
    if (present_versionId)
      list.add(versionId);

    boolean present_createTime = true;
    list.add(present_createTime);
    if (present_createTime)
      list.add(createTime);

    boolean present_expireTime = true;
    list.add(present_expireTime);
    if (present_expireTime)
      list.add(expireTime);

    boolean present_fileSize = true;
    list.add(present_fileSize);
    if (present_fileSize)
      list.add(fileSize);

    boolean present_uploaderId = true && (isSetUploaderId());
    list.add(present_uploaderId);
    if (present_uploaderId)
      list.add(uploaderId);

    boolean present_isRestricted = true;
    list.add(present_isRestricted);
    if (present_isRestricted)
      list.add(isRestricted);

    boolean present_isValid = true;
    list.add(present_isValid);
    if (present_isValid)
      list.add(isValid);

    boolean present_isProcessed = true;
    list.add(present_isProcessed);
    if (present_isProcessed)
      list.add(isProcessed);

    boolean present_software = true && (isSetSoftware());
    list.add(present_software);
    if (present_software)
      list.add(software);

    return list.hashCode();
  }

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

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetVersionId()).compareTo(other.isSetVersionId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVersionId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.versionId, other.versionId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreateTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetExpireTime()).compareTo(other.isSetExpireTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetExpireTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expireTime, other.expireTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFileSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUploaderId()).compareTo(other.isSetUploaderId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUploaderId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploaderId, other.uploaderId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsRestricted()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRestricted, other.isRestricted);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(other.isSetIsValid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsValid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isValid, other.isValid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsProcessed()).compareTo(other.isSetIsProcessed());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsProcessed()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isProcessed, other.isProcessed);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSoftware()).compareTo(other.isSetSoftware());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSoftware()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.software, other.software);
      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("ImageVersionDetails(");
    boolean first = true;

    sb.append("versionId:");
    if (this.versionId == null) {
      sb.append("null");
    } else {
      sb.append(this.versionId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("createTime:");
    sb.append(this.createTime);
    first = false;
    if (!first) sb.append(", ");
    sb.append("expireTime:");
    sb.append(this.expireTime);
    first = false;
    if (!first) sb.append(", ");
    sb.append("fileSize:");
    sb.append(this.fileSize);
    first = false;
    if (!first) sb.append(", ");
    sb.append("uploaderId:");
    if (this.uploaderId == null) {
      sb.append("null");
    } else {
      sb.append(this.uploaderId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("isRestricted:");
    sb.append(this.isRestricted);
    first = false;
    if (!first) sb.append(", ");
    sb.append("isValid:");
    sb.append(this.isValid);
    first = false;
    if (!first) sb.append(", ");
    sb.append("isProcessed:");
    sb.append(this.isProcessed);
    first = false;
    if (!first) sb.append(", ");
    sb.append("software:");
    if (this.software == null) {
      sb.append("null");
    } else {
      sb.append(this.software);
    }
    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 {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      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 ImageVersionDetailsStandardSchemeFactory implements SchemeFactory {
    public ImageVersionDetailsStandardScheme getScheme() {
      return new ImageVersionDetailsStandardScheme();
    }
  }

  private static class ImageVersionDetailsStandardScheme extends StandardScheme<ImageVersionDetails> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, ImageVersionDetails 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: // VERSION_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.versionId = iprot.readString();
              struct.setVersionIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // CREATE_TIME
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.createTime = iprot.readI64();
              struct.setCreateTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // EXPIRE_TIME
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.expireTime = iprot.readI64();
              struct.setExpireTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // FILE_SIZE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.fileSize = iprot.readI64();
              struct.setFileSizeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // UPLOADER_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.uploaderId = iprot.readString();
              struct.setUploaderIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // IS_RESTRICTED
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isRestricted = iprot.readBool();
              struct.setIsRestrictedIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // IS_VALID
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isValid = iprot.readBool();
              struct.setIsValidIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // IS_PROCESSED
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isProcessed = iprot.readBool();
              struct.setIsProcessedIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // SOFTWARE
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list50 = iprot.readListBegin();
                struct.software = new ArrayList<String>(_list50.size);
                String _elem51;
                for (int _i52 = 0; _i52 < _list50.size; ++_i52)
                {
                  _elem51 = iprot.readString();
                  struct.software.add(_elem51);
                }
                iprot.readListEnd();
              }
              struct.setSoftwareIsSet(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, ImageVersionDetails struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.versionId != null) {
        oprot.writeFieldBegin(VERSION_ID_FIELD_DESC);
        oprot.writeString(struct.versionId);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
      oprot.writeI64(struct.createTime);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(EXPIRE_TIME_FIELD_DESC);
      oprot.writeI64(struct.expireTime);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
      oprot.writeI64(struct.fileSize);
      oprot.writeFieldEnd();
      if (struct.uploaderId != null) {
        oprot.writeFieldBegin(UPLOADER_ID_FIELD_DESC);
        oprot.writeString(struct.uploaderId);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(IS_RESTRICTED_FIELD_DESC);
      oprot.writeBool(struct.isRestricted);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
      oprot.writeBool(struct.isValid);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_PROCESSED_FIELD_DESC);
      oprot.writeBool(struct.isProcessed);
      oprot.writeFieldEnd();
      if (struct.software != null) {
        oprot.writeFieldBegin(SOFTWARE_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.software.size()));
          for (String _iter53 : struct.software)
          {
            oprot.writeString(_iter53);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class ImageVersionDetailsTupleSchemeFactory implements SchemeFactory {
    public ImageVersionDetailsTupleScheme getScheme() {
      return new ImageVersionDetailsTupleScheme();
    }
  }

  private static class ImageVersionDetailsTupleScheme extends TupleScheme<ImageVersionDetails> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, ImageVersionDetails struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetVersionId()) {
        optionals.set(0);
      }
      if (struct.isSetCreateTime()) {
        optionals.set(1);
      }
      if (struct.isSetExpireTime()) {
        optionals.set(2);
      }
      if (struct.isSetFileSize()) {
        optionals.set(3);
      }
      if (struct.isSetUploaderId()) {
        optionals.set(4);
      }
      if (struct.isSetIsRestricted()) {
        optionals.set(5);
      }
      if (struct.isSetIsValid()) {
        optionals.set(6);
      }
      if (struct.isSetIsProcessed()) {
        optionals.set(7);
      }
      if (struct.isSetSoftware()) {
        optionals.set(8);
      }
      oprot.writeBitSet(optionals, 9);
      if (struct.isSetVersionId()) {
        oprot.writeString(struct.versionId);
      }
      if (struct.isSetCreateTime()) {
        oprot.writeI64(struct.createTime);
      }
      if (struct.isSetExpireTime()) {
        oprot.writeI64(struct.expireTime);
      }
      if (struct.isSetFileSize()) {
        oprot.writeI64(struct.fileSize);
      }
      if (struct.isSetUploaderId()) {
        oprot.writeString(struct.uploaderId);
      }
      if (struct.isSetIsRestricted()) {
        oprot.writeBool(struct.isRestricted);
      }
      if (struct.isSetIsValid()) {
        oprot.writeBool(struct.isValid);
      }
      if (struct.isSetIsProcessed()) {
        oprot.writeBool(struct.isProcessed);
      }
      if (struct.isSetSoftware()) {
        {
          oprot.writeI32(struct.software.size());
          for (String _iter54 : struct.software)
          {
            oprot.writeString(_iter54);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, ImageVersionDetails struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(9);
      if (incoming.get(0)) {
        struct.versionId = iprot.readString();
        struct.setVersionIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.createTime = iprot.readI64();
        struct.setCreateTimeIsSet(true);
      }
      if (incoming.get(2)) {
        struct.expireTime = iprot.readI64();
        struct.setExpireTimeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.fileSize = iprot.readI64();
        struct.setFileSizeIsSet(true);
      }
      if (incoming.get(4)) {
        struct.uploaderId = iprot.readString();
        struct.setUploaderIdIsSet(true);
      }
      if (incoming.get(5)) {
        struct.isRestricted = iprot.readBool();
        struct.setIsRestrictedIsSet(true);
      }
      if (incoming.get(6)) {
        struct.isValid = iprot.readBool();
        struct.setIsValidIsSet(true);
      }
      if (incoming.get(7)) {
        struct.isProcessed = iprot.readBool();
        struct.setIsProcessedIsSet(true);
      }
      if (incoming.get(8)) {
        {
          org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.software = new ArrayList<String>(_list55.size);
          String _elem56;
          for (int _i57 = 0; _i57 < _list55.size; ++_i57)
          {
            _elem56 = iprot.readString();
            struct.software.add(_elem56);
          }
        }
        struct.setSoftwareIsSet(true);
      }
    }
  }

}