diff options
author | Simon Rettberg | 2015-06-09 18:57:14 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-06-09 18:57:14 +0200 |
commit | c121d65bb33a42c324b746f6dc5300aee68487dd (patch) | |
tree | fd72496dcf56338af387ff0345636e2d77b6ff86 /src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java | |
parent | Changes for Dozmod v1.1 (diff) | |
download | master-sync-shared-c121d65bb33a42c324b746f6dc5300aee68487dd.tar.gz master-sync-shared-c121d65bb33a42c324b746f6dc5300aee68487dd.tar.xz master-sync-shared-c121d65bb33a42c324b746f6dc5300aee68487dd.zip |
Unified thrift definitions for master and satellite
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java | 1362 |
1 files changed, 1362 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java new file mode 100644 index 0000000..e8c93a1 --- /dev/null +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java @@ -0,0 +1,1362 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * 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 org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishData, ImagePublishData._Fields>, java.io.Serializable, Cloneable, Comparable<ImagePublishData> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImagePublishData"); + + private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField CURRENT_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("currentVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField OS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("osId", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField VIRT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("virtId", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField BASE_CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("baseCreateTime", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField VERSION_CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("versionCreateTime", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)8); + 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)9); + 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)11); + private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)16); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ImagePublishDataStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ImagePublishDataTupleSchemeFactory()); + } + + public String imageBaseId; // required + public String currentVersionId; // required + public String imageName; // required + public int osId; // required + public String virtId; // required + public long baseCreateTime; // required + public long versionCreateTime; // required + public String ownerId; // required + public String uploaderId; // required + public long fileSize; // required + public boolean isTemplate; // 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 { + IMAGE_BASE_ID((short)1, "imageBaseId"), + CURRENT_VERSION_ID((short)2, "currentVersionId"), + IMAGE_NAME((short)3, "imageName"), + OS_ID((short)4, "osId"), + VIRT_ID((short)5, "virtId"), + BASE_CREATE_TIME((short)6, "baseCreateTime"), + VERSION_CREATE_TIME((short)7, "versionCreateTime"), + OWNER_ID((short)8, "ownerId"), + UPLOADER_ID((short)9, "uploaderId"), + FILE_SIZE((short)11, "fileSize"), + IS_TEMPLATE((short)16, "isTemplate"); + + 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: // IMAGE_BASE_ID + return IMAGE_BASE_ID; + case 2: // CURRENT_VERSION_ID + return CURRENT_VERSION_ID; + case 3: // IMAGE_NAME + return IMAGE_NAME; + case 4: // OS_ID + return OS_ID; + case 5: // VIRT_ID + return VIRT_ID; + case 6: // BASE_CREATE_TIME + return BASE_CREATE_TIME; + case 7: // VERSION_CREATE_TIME + return VERSION_CREATE_TIME; + case 8: // OWNER_ID + return OWNER_ID; + case 9: // UPLOADER_ID + return UPLOADER_ID; + case 11: // FILE_SIZE + return FILE_SIZE; + case 16: // IS_TEMPLATE + return IS_TEMPLATE; + 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 __OSID_ISSET_ID = 0; + private static final int __BASECREATETIME_ISSET_ID = 1; + private static final int __VERSIONCREATETIME_ISSET_ID = 2; + private static final int __FILESIZE_ISSET_ID = 3; + private static final int __ISTEMPLATE_ISSET_ID = 4; + 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.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.CURRENT_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("currentVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.OS_ID, new org.apache.thrift.meta_data.FieldMetaData("osId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.VIRT_ID, new org.apache.thrift.meta_data.FieldMetaData("virtId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.BASE_CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("baseCreateTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); + tmpMap.put(_Fields.VERSION_CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("versionCreateTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); + tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + 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.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.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImagePublishData.class, metaDataMap); + } + + public ImagePublishData() { + } + + public ImagePublishData( + String imageBaseId, + String currentVersionId, + String imageName, + int osId, + String virtId, + long baseCreateTime, + long versionCreateTime, + String ownerId, + String uploaderId, + long fileSize, + boolean isTemplate) + { + this(); + this.imageBaseId = imageBaseId; + this.currentVersionId = currentVersionId; + this.imageName = imageName; + this.osId = osId; + setOsIdIsSet(true); + this.virtId = virtId; + this.baseCreateTime = baseCreateTime; + setBaseCreateTimeIsSet(true); + this.versionCreateTime = versionCreateTime; + setVersionCreateTimeIsSet(true); + this.ownerId = ownerId; + this.uploaderId = uploaderId; + this.fileSize = fileSize; + setFileSizeIsSet(true); + this.isTemplate = isTemplate; + setIsTemplateIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public ImagePublishData(ImagePublishData other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetImageBaseId()) { + this.imageBaseId = other.imageBaseId; + } + if (other.isSetCurrentVersionId()) { + this.currentVersionId = other.currentVersionId; + } + if (other.isSetImageName()) { + this.imageName = other.imageName; + } + this.osId = other.osId; + if (other.isSetVirtId()) { + this.virtId = other.virtId; + } + this.baseCreateTime = other.baseCreateTime; + this.versionCreateTime = other.versionCreateTime; + if (other.isSetOwnerId()) { + this.ownerId = other.ownerId; + } + if (other.isSetUploaderId()) { + this.uploaderId = other.uploaderId; + } + this.fileSize = other.fileSize; + this.isTemplate = other.isTemplate; + } + + public ImagePublishData deepCopy() { + return new ImagePublishData(this); + } + + @Override + public void clear() { + this.imageBaseId = null; + this.currentVersionId = null; + this.imageName = null; + setOsIdIsSet(false); + this.osId = 0; + this.virtId = null; + setBaseCreateTimeIsSet(false); + this.baseCreateTime = 0; + setVersionCreateTimeIsSet(false); + this.versionCreateTime = 0; + this.ownerId = null; + this.uploaderId = null; + setFileSizeIsSet(false); + this.fileSize = 0; + setIsTemplateIsSet(false); + this.isTemplate = false; + } + + public String getImageBaseId() { + return this.imageBaseId; + } + + public ImagePublishData setImageBaseId(String imageBaseId) { + this.imageBaseId = imageBaseId; + return this; + } + + public void unsetImageBaseId() { + this.imageBaseId = null; + } + + /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageBaseId() { + return this.imageBaseId != null; + } + + public void setImageBaseIdIsSet(boolean value) { + if (!value) { + this.imageBaseId = null; + } + } + + public String getCurrentVersionId() { + return this.currentVersionId; + } + + public ImagePublishData setCurrentVersionId(String currentVersionId) { + this.currentVersionId = currentVersionId; + return this; + } + + public void unsetCurrentVersionId() { + this.currentVersionId = null; + } + + /** Returns true if field currentVersionId is set (has been assigned a value) and false otherwise */ + public boolean isSetCurrentVersionId() { + return this.currentVersionId != null; + } + + public void setCurrentVersionIdIsSet(boolean value) { + if (!value) { + this.currentVersionId = null; + } + } + + public String getImageName() { + return this.imageName; + } + + public ImagePublishData setImageName(String imageName) { + this.imageName = imageName; + return this; + } + + public void unsetImageName() { + this.imageName = null; + } + + /** Returns true if field imageName is set (has been assigned a value) and false otherwise */ + public boolean isSetImageName() { + return this.imageName != null; + } + + public void setImageNameIsSet(boolean value) { + if (!value) { + this.imageName = null; + } + } + + public int getOsId() { + return this.osId; + } + + public ImagePublishData setOsId(int osId) { + this.osId = osId; + setOsIdIsSet(true); + return this; + } + + public void unsetOsId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID); + } + + /** Returns true if field osId is set (has been assigned a value) and false otherwise */ + public boolean isSetOsId() { + return EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID); + } + + public void setOsIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value); + } + + public String getVirtId() { + return this.virtId; + } + + public ImagePublishData setVirtId(String virtId) { + this.virtId = virtId; + return this; + } + + public void unsetVirtId() { + this.virtId = null; + } + + /** Returns true if field virtId is set (has been assigned a value) and false otherwise */ + public boolean isSetVirtId() { + return this.virtId != null; + } + + public void setVirtIdIsSet(boolean value) { + if (!value) { + this.virtId = null; + } + } + + public long getBaseCreateTime() { + return this.baseCreateTime; + } + + public ImagePublishData setBaseCreateTime(long baseCreateTime) { + this.baseCreateTime = baseCreateTime; + setBaseCreateTimeIsSet(true); + return this; + } + + public void unsetBaseCreateTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BASECREATETIME_ISSET_ID); + } + + /** Returns true if field baseCreateTime is set (has been assigned a value) and false otherwise */ + public boolean isSetBaseCreateTime() { + return EncodingUtils.testBit(__isset_bitfield, __BASECREATETIME_ISSET_ID); + } + + public void setBaseCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BASECREATETIME_ISSET_ID, value); + } + + public long getVersionCreateTime() { + return this.versionCreateTime; + } + + public ImagePublishData setVersionCreateTime(long versionCreateTime) { + this.versionCreateTime = versionCreateTime; + setVersionCreateTimeIsSet(true); + return this; + } + + public void unsetVersionCreateTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSIONCREATETIME_ISSET_ID); + } + + /** Returns true if field versionCreateTime is set (has been assigned a value) and false otherwise */ + public boolean isSetVersionCreateTime() { + return EncodingUtils.testBit(__isset_bitfield, __VERSIONCREATETIME_ISSET_ID); + } + + public void setVersionCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSIONCREATETIME_ISSET_ID, value); + } + + public String getOwnerId() { + return this.ownerId; + } + + public ImagePublishData setOwnerId(String ownerId) { + this.ownerId = ownerId; + return this; + } + + public void unsetOwnerId() { + this.ownerId = null; + } + + /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */ + public boolean isSetOwnerId() { + return this.ownerId != null; + } + + public void setOwnerIdIsSet(boolean value) { + if (!value) { + this.ownerId = null; + } + } + + public String getUploaderId() { + return this.uploaderId; + } + + public ImagePublishData 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 long getFileSize() { + return this.fileSize; + } + + public ImagePublishData 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 boolean isIsTemplate() { + return this.isTemplate; + } + + public ImagePublishData setIsTemplate(boolean isTemplate) { + this.isTemplate = isTemplate; + setIsTemplateIsSet(true); + return this; + } + + public void unsetIsTemplate() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); + } + + /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */ + public boolean isSetIsTemplate() { + return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); + } + + public void setIsTemplateIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IMAGE_BASE_ID: + if (value == null) { + unsetImageBaseId(); + } else { + setImageBaseId((String)value); + } + break; + + case CURRENT_VERSION_ID: + if (value == null) { + unsetCurrentVersionId(); + } else { + setCurrentVersionId((String)value); + } + break; + + case IMAGE_NAME: + if (value == null) { + unsetImageName(); + } else { + setImageName((String)value); + } + break; + + case OS_ID: + if (value == null) { + unsetOsId(); + } else { + setOsId((Integer)value); + } + break; + + case VIRT_ID: + if (value == null) { + unsetVirtId(); + } else { + setVirtId((String)value); + } + break; + + case BASE_CREATE_TIME: + if (value == null) { + unsetBaseCreateTime(); + } else { + setBaseCreateTime((Long)value); + } + break; + + case VERSION_CREATE_TIME: + if (value == null) { + unsetVersionCreateTime(); + } else { + setVersionCreateTime((Long)value); + } + break; + + case OWNER_ID: + if (value == null) { + unsetOwnerId(); + } else { + setOwnerId((String)value); + } + break; + + case UPLOADER_ID: + if (value == null) { + unsetUploaderId(); + } else { + setUploaderId((String)value); + } + break; + + case FILE_SIZE: + if (value == null) { + unsetFileSize(); + } else { + setFileSize((Long)value); + } + break; + + case IS_TEMPLATE: + if (value == null) { + unsetIsTemplate(); + } else { + setIsTemplate((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IMAGE_BASE_ID: + return getImageBaseId(); + + case CURRENT_VERSION_ID: + return getCurrentVersionId(); + + case IMAGE_NAME: + return getImageName(); + + case OS_ID: + return Integer.valueOf(getOsId()); + + case VIRT_ID: + return getVirtId(); + + case BASE_CREATE_TIME: + return Long.valueOf(getBaseCreateTime()); + + case VERSION_CREATE_TIME: + return Long.valueOf(getVersionCreateTime()); + + case OWNER_ID: + return getOwnerId(); + + case UPLOADER_ID: + return getUploaderId(); + + case FILE_SIZE: + return Long.valueOf(getFileSize()); + + case IS_TEMPLATE: + return Boolean.valueOf(isIsTemplate()); + + } + 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 IMAGE_BASE_ID: + return isSetImageBaseId(); + case CURRENT_VERSION_ID: + return isSetCurrentVersionId(); + case IMAGE_NAME: + return isSetImageName(); + case OS_ID: + return isSetOsId(); + case VIRT_ID: + return isSetVirtId(); + case BASE_CREATE_TIME: + return isSetBaseCreateTime(); + case VERSION_CREATE_TIME: + return isSetVersionCreateTime(); + case OWNER_ID: + return isSetOwnerId(); + case UPLOADER_ID: + return isSetUploaderId(); + case FILE_SIZE: + return isSetFileSize(); + case IS_TEMPLATE: + return isSetIsTemplate(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ImagePublishData) + return this.equals((ImagePublishData)that); + return false; + } + + public boolean equals(ImagePublishData that) { + if (that == null) + return false; + + boolean this_present_imageBaseId = true && this.isSetImageBaseId(); + boolean that_present_imageBaseId = true && that.isSetImageBaseId(); + if (this_present_imageBaseId || that_present_imageBaseId) { + if (!(this_present_imageBaseId && that_present_imageBaseId)) + return false; + if (!this.imageBaseId.equals(that.imageBaseId)) + return false; + } + + boolean this_present_currentVersionId = true && this.isSetCurrentVersionId(); + boolean that_present_currentVersionId = true && that.isSetCurrentVersionId(); + if (this_present_currentVersionId || that_present_currentVersionId) { + if (!(this_present_currentVersionId && that_present_currentVersionId)) + return false; + if (!this.currentVersionId.equals(that.currentVersionId)) + return false; + } + + boolean this_present_imageName = true && this.isSetImageName(); + boolean that_present_imageName = true && that.isSetImageName(); + if (this_present_imageName || that_present_imageName) { + if (!(this_present_imageName && that_present_imageName)) + return false; + if (!this.imageName.equals(that.imageName)) + return false; + } + + boolean this_present_osId = true; + boolean that_present_osId = true; + if (this_present_osId || that_present_osId) { + if (!(this_present_osId && that_present_osId)) + return false; + if (this.osId != that.osId) + return false; + } + + boolean this_present_virtId = true && this.isSetVirtId(); + boolean that_present_virtId = true && that.isSetVirtId(); + if (this_present_virtId || that_present_virtId) { + if (!(this_present_virtId && that_present_virtId)) + return false; + if (!this.virtId.equals(that.virtId)) + return false; + } + + boolean this_present_baseCreateTime = true; + boolean that_present_baseCreateTime = true; + if (this_present_baseCreateTime || that_present_baseCreateTime) { + if (!(this_present_baseCreateTime && that_present_baseCreateTime)) + return false; + if (this.baseCreateTime != that.baseCreateTime) + return false; + } + + boolean this_present_versionCreateTime = true; + boolean that_present_versionCreateTime = true; + if (this_present_versionCreateTime || that_present_versionCreateTime) { + if (!(this_present_versionCreateTime && that_present_versionCreateTime)) + return false; + if (this.versionCreateTime != that.versionCreateTime) + return false; + } + + boolean this_present_ownerId = true && this.isSetOwnerId(); + boolean that_present_ownerId = true && that.isSetOwnerId(); + if (this_present_ownerId || that_present_ownerId) { + if (!(this_present_ownerId && that_present_ownerId)) + return false; + if (!this.ownerId.equals(that.ownerId)) + 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_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_isTemplate = true; + boolean that_present_isTemplate = true; + if (this_present_isTemplate || that_present_isTemplate) { + if (!(this_present_isTemplate && that_present_isTemplate)) + return false; + if (this.isTemplate != that.isTemplate) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(ImagePublishData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageBaseId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCurrentVersionId()).compareTo(other.isSetCurrentVersionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCurrentVersionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currentVersionId, other.currentVersionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOsId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osId, other.osId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVirtId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.virtId, other.virtId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBaseCreateTime()).compareTo(other.isSetBaseCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBaseCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.baseCreateTime, other.baseCreateTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetVersionCreateTime()).compareTo(other.isSetVersionCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersionCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.versionCreateTime, other.versionCreateTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwnerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId); + 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(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(isSetIsTemplate()).compareTo(other.isSetIsTemplate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsTemplate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate); + 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("ImagePublishData("); + boolean first = true; + + sb.append("imageBaseId:"); + if (this.imageBaseId == null) { + sb.append("null"); + } else { + sb.append(this.imageBaseId); + } + first = false; + if (!first) sb.append(", "); + sb.append("currentVersionId:"); + if (this.currentVersionId == null) { + sb.append("null"); + } else { + sb.append(this.currentVersionId); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageName:"); + if (this.imageName == null) { + sb.append("null"); + } else { + sb.append(this.imageName); + } + first = false; + if (!first) sb.append(", "); + sb.append("osId:"); + sb.append(this.osId); + first = false; + if (!first) sb.append(", "); + sb.append("virtId:"); + if (this.virtId == null) { + sb.append("null"); + } else { + sb.append(this.virtId); + } + first = false; + if (!first) sb.append(", "); + sb.append("baseCreateTime:"); + sb.append(this.baseCreateTime); + first = false; + if (!first) sb.append(", "); + sb.append("versionCreateTime:"); + sb.append(this.versionCreateTime); + first = false; + if (!first) sb.append(", "); + sb.append("ownerId:"); + if (this.ownerId == null) { + sb.append("null"); + } else { + sb.append(this.ownerId); + } + 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("fileSize:"); + sb.append(this.fileSize); + first = false; + if (!first) sb.append(", "); + sb.append("isTemplate:"); + sb.append(this.isTemplate); + 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 ImagePublishDataStandardSchemeFactory implements SchemeFactory { + public ImagePublishDataStandardScheme getScheme() { + return new ImagePublishDataStandardScheme(); + } + } + + private static class ImagePublishDataStandardScheme extends StandardScheme<ImagePublishData> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ImagePublishData 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: // IMAGE_BASE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CURRENT_VERSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.currentVersionId = iprot.readString(); + struct.setCurrentVersionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // IMAGE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageName = iprot.readString(); + struct.setImageNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // OS_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.osId = iprot.readI32(); + struct.setOsIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // VIRT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.virtId = iprot.readString(); + struct.setVirtIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // BASE_CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.baseCreateTime = iprot.readI64(); + struct.setBaseCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // VERSION_CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.versionCreateTime = iprot.readI64(); + struct.setVersionCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // OWNER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.ownerId = iprot.readString(); + struct.setOwnerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // 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 11: // 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 16: // IS_TEMPLATE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isTemplate = iprot.readBool(); + struct.setIsTemplateIsSet(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, ImagePublishData struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.imageBaseId != null) { + oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); + oprot.writeString(struct.imageBaseId); + oprot.writeFieldEnd(); + } + if (struct.currentVersionId != null) { + oprot.writeFieldBegin(CURRENT_VERSION_ID_FIELD_DESC); + oprot.writeString(struct.currentVersionId); + oprot.writeFieldEnd(); + } + if (struct.imageName != null) { + oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC); + oprot.writeString(struct.imageName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(OS_ID_FIELD_DESC); + oprot.writeI32(struct.osId); + oprot.writeFieldEnd(); + if (struct.virtId != null) { + oprot.writeFieldBegin(VIRT_ID_FIELD_DESC); + oprot.writeString(struct.virtId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(BASE_CREATE_TIME_FIELD_DESC); + oprot.writeI64(struct.baseCreateTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(VERSION_CREATE_TIME_FIELD_DESC); + oprot.writeI64(struct.versionCreateTime); + oprot.writeFieldEnd(); + if (struct.ownerId != null) { + oprot.writeFieldBegin(OWNER_ID_FIELD_DESC); + oprot.writeString(struct.ownerId); + oprot.writeFieldEnd(); + } + if (struct.uploaderId != null) { + oprot.writeFieldBegin(UPLOADER_ID_FIELD_DESC); + oprot.writeString(struct.uploaderId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC); + oprot.writeI64(struct.fileSize); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC); + oprot.writeBool(struct.isTemplate); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ImagePublishDataTupleSchemeFactory implements SchemeFactory { + public ImagePublishDataTupleScheme getScheme() { + return new ImagePublishDataTupleScheme(); + } + } + + private static class ImagePublishDataTupleScheme extends TupleScheme<ImagePublishData> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ImagePublishData struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetImageBaseId()) { + optionals.set(0); + } + if (struct.isSetCurrentVersionId()) { + optionals.set(1); + } + if (struct.isSetImageName()) { + optionals.set(2); + } + if (struct.isSetOsId()) { + optionals.set(3); + } + if (struct.isSetVirtId()) { + optionals.set(4); + } + if (struct.isSetBaseCreateTime()) { + optionals.set(5); + } + if (struct.isSetVersionCreateTime()) { + optionals.set(6); + } + if (struct.isSetOwnerId()) { + optionals.set(7); + } + if (struct.isSetUploaderId()) { + optionals.set(8); + } + if (struct.isSetFileSize()) { + optionals.set(9); + } + if (struct.isSetIsTemplate()) { + optionals.set(10); + } + oprot.writeBitSet(optionals, 11); + if (struct.isSetImageBaseId()) { + oprot.writeString(struct.imageBaseId); + } + if (struct.isSetCurrentVersionId()) { + oprot.writeString(struct.currentVersionId); + } + if (struct.isSetImageName()) { + oprot.writeString(struct.imageName); + } + if (struct.isSetOsId()) { + oprot.writeI32(struct.osId); + } + if (struct.isSetVirtId()) { + oprot.writeString(struct.virtId); + } + if (struct.isSetBaseCreateTime()) { + oprot.writeI64(struct.baseCreateTime); + } + if (struct.isSetVersionCreateTime()) { + oprot.writeI64(struct.versionCreateTime); + } + if (struct.isSetOwnerId()) { + oprot.writeString(struct.ownerId); + } + if (struct.isSetUploaderId()) { + oprot.writeString(struct.uploaderId); + } + if (struct.isSetFileSize()) { + oprot.writeI64(struct.fileSize); + } + if (struct.isSetIsTemplate()) { + oprot.writeBool(struct.isTemplate); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ImagePublishData struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(11); + if (incoming.get(0)) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } + if (incoming.get(1)) { + struct.currentVersionId = iprot.readString(); + struct.setCurrentVersionIdIsSet(true); + } + if (incoming.get(2)) { + struct.imageName = iprot.readString(); + struct.setImageNameIsSet(true); + } + if (incoming.get(3)) { + struct.osId = iprot.readI32(); + struct.setOsIdIsSet(true); + } + if (incoming.get(4)) { + struct.virtId = iprot.readString(); + struct.setVirtIdIsSet(true); + } + if (incoming.get(5)) { + struct.baseCreateTime = iprot.readI64(); + struct.setBaseCreateTimeIsSet(true); + } + if (incoming.get(6)) { + struct.versionCreateTime = iprot.readI64(); + struct.setVersionCreateTimeIsSet(true); + } + if (incoming.get(7)) { + struct.ownerId = iprot.readString(); + struct.setOwnerIdIsSet(true); + } + if (incoming.get(8)) { + struct.uploaderId = iprot.readString(); + struct.setUploaderIdIsSet(true); + } + if (incoming.get(9)) { + struct.fileSize = iprot.readI64(); + struct.setFileSizeIsSet(true); + } + if (incoming.get(10)) { + struct.isTemplate = iprot.readBool(); + struct.setIsTemplateIsSet(true); + } + } + } + +} + |