diff options
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 | 442 |
1 files changed, 206 insertions, 236 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 index 9226df6..541b4ea 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.15.0) * * 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-04-20") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17") 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"); @@ -53,26 +26,23 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRUCT, (short)13); private static final org.apache.thrift.protocol.TField MACHINE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("machineDescription", org.apache.thrift.protocol.TType.STRING, (short)14); - 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()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImagePublishDataStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImagePublishDataTupleSchemeFactory(); - public String imageBaseId; // required - public String imageVersionId; // required - public String imageName; // required - public String description; // required + public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String imageName; // required + public @org.apache.thrift.annotation.Nullable java.lang.String description; // required public long createTime; // required - public UserInfo uploader; // required + public @org.apache.thrift.annotation.Nullable UserInfo uploader; // required public long fileSize; // required - public List<String> software; // required - public List<String> tags; // required + public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> software; // required + public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> tags; // required public int osId; // required - public String virtId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String virtId; // required public boolean isTemplate; // required - public UserInfo owner; // required - public ByteBuffer machineDescription; // required + public @org.apache.thrift.annotation.Nullable UserInfo owner; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription; // 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 { @@ -91,10 +61,10 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat OWNER((short)13, "owner"), MACHINE_DESCRIPTION((short)14, "machineDescription"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -102,6 +72,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // IMAGE_BASE_ID @@ -143,21 +114,22 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -166,7 +138,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -177,9 +149,9 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat private static final int __OSID_ISSET_ID = 2; private static final int __ISTEMPLATE_ISSET_ID = 3; private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -210,7 +182,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class))); tmpMap.put(_Fields.MACHINE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("machineDescription", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImagePublishData.class, metaDataMap); } @@ -218,20 +190,20 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } public ImagePublishData( - String imageBaseId, - String imageVersionId, - String imageName, - String description, + java.lang.String imageBaseId, + java.lang.String imageVersionId, + java.lang.String imageName, + java.lang.String description, long createTime, UserInfo uploader, long fileSize, - List<String> software, - List<String> tags, + java.util.List<java.lang.String> software, + java.util.List<java.lang.String> tags, int osId, - String virtId, + java.lang.String virtId, boolean isTemplate, UserInfo owner, - ByteBuffer machineDescription) + java.nio.ByteBuffer machineDescription) { this(); this.imageBaseId = imageBaseId; @@ -277,11 +249,11 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } this.fileSize = other.fileSize; if (other.isSetSoftware()) { - List<String> __this__software = new ArrayList<String>(other.software); + java.util.List<java.lang.String> __this__software = new java.util.ArrayList<java.lang.String>(other.software); this.software = __this__software; } if (other.isSetTags()) { - List<String> __this__tags = new ArrayList<String>(other.tags); + java.util.List<java.lang.String> __this__tags = new java.util.ArrayList<java.lang.String>(other.tags); this.tags = __this__tags; } this.osId = other.osId; @@ -323,11 +295,12 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat this.machineDescription = null; } - public String getImageBaseId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getImageBaseId() { return this.imageBaseId; } - public ImagePublishData setImageBaseId(String imageBaseId) { + public ImagePublishData setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) { this.imageBaseId = imageBaseId; return this; } @@ -347,11 +320,12 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } } - public String getImageVersionId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getImageVersionId() { return this.imageVersionId; } - public ImagePublishData setImageVersionId(String imageVersionId) { + public ImagePublishData setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) { this.imageVersionId = imageVersionId; return this; } @@ -371,11 +345,12 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } } - public String getImageName() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getImageName() { return this.imageName; } - public ImagePublishData setImageName(String imageName) { + public ImagePublishData setImageName(@org.apache.thrift.annotation.Nullable java.lang.String imageName) { this.imageName = imageName; return this; } @@ -395,11 +370,12 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } } - public String getDescription() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getDescription() { return this.description; } - public ImagePublishData setDescription(String description) { + public ImagePublishData setDescription(@org.apache.thrift.annotation.Nullable java.lang.String description) { this.description = description; return this; } @@ -430,23 +406,24 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } public void unsetCreateTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); + __isset_bitfield = org.apache.thrift.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); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); } public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); } + @org.apache.thrift.annotation.Nullable public UserInfo getUploader() { return this.uploader; } - public ImagePublishData setUploader(UserInfo uploader) { + public ImagePublishData setUploader(@org.apache.thrift.annotation.Nullable UserInfo uploader) { this.uploader = uploader; return this; } @@ -477,38 +454,40 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } public void unsetFileSize() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID); + __isset_bitfield = org.apache.thrift.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); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID); } public void setFileSizeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value); } public int getSoftwareSize() { return (this.software == null) ? 0 : this.software.size(); } - public java.util.Iterator<String> getSoftwareIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator<java.lang.String> getSoftwareIterator() { return (this.software == null) ? null : this.software.iterator(); } - public void addToSoftware(String elem) { + public void addToSoftware(java.lang.String elem) { if (this.software == null) { - this.software = new ArrayList<String>(); + this.software = new java.util.ArrayList<java.lang.String>(); } this.software.add(elem); } - public List<String> getSoftware() { + @org.apache.thrift.annotation.Nullable + public java.util.List<java.lang.String> getSoftware() { return this.software; } - public ImagePublishData setSoftware(List<String> software) { + public ImagePublishData setSoftware(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> software) { this.software = software; return this; } @@ -532,22 +511,24 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return (this.tags == null) ? 0 : this.tags.size(); } - public java.util.Iterator<String> getTagsIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator<java.lang.String> getTagsIterator() { return (this.tags == null) ? null : this.tags.iterator(); } - public void addToTags(String elem) { + public void addToTags(java.lang.String elem) { if (this.tags == null) { - this.tags = new ArrayList<String>(); + this.tags = new java.util.ArrayList<java.lang.String>(); } this.tags.add(elem); } - public List<String> getTags() { + @org.apache.thrift.annotation.Nullable + public java.util.List<java.lang.String> getTags() { return this.tags; } - public ImagePublishData setTags(List<String> tags) { + public ImagePublishData setTags(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> tags) { this.tags = tags; return this; } @@ -578,23 +559,24 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } public void unsetOsId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID); + __isset_bitfield = org.apache.thrift.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); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID); } public void setOsIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value); } - public String getVirtId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getVirtId() { return this.virtId; } - public ImagePublishData setVirtId(String virtId) { + public ImagePublishData setVirtId(@org.apache.thrift.annotation.Nullable java.lang.String virtId) { this.virtId = virtId; return this; } @@ -625,23 +607,24 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } public void unsetIsTemplate() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); + __isset_bitfield = org.apache.thrift.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); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); } public void setIsTemplateIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value); } + @org.apache.thrift.annotation.Nullable public UserInfo getOwner() { return this.owner; } - public ImagePublishData setOwner(UserInfo owner) { + public ImagePublishData setOwner(@org.apache.thrift.annotation.Nullable UserInfo owner) { this.owner = owner; return this; } @@ -666,16 +649,16 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return machineDescription == null ? null : machineDescription.array(); } - public ByteBuffer bufferForMachineDescription() { + public java.nio.ByteBuffer bufferForMachineDescription() { return org.apache.thrift.TBaseHelper.copyBinary(machineDescription); } public ImagePublishData setMachineDescription(byte[] machineDescription) { - this.machineDescription = machineDescription == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(machineDescription, machineDescription.length)); + this.machineDescription = machineDescription == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(machineDescription.clone()); return this; } - public ImagePublishData setMachineDescription(ByteBuffer machineDescription) { + public ImagePublishData setMachineDescription(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription) { this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription); return this; } @@ -695,13 +678,13 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case IMAGE_BASE_ID: if (value == null) { unsetImageBaseId(); } else { - setImageBaseId((String)value); + setImageBaseId((java.lang.String)value); } break; @@ -709,7 +692,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetImageVersionId(); } else { - setImageVersionId((String)value); + setImageVersionId((java.lang.String)value); } break; @@ -717,7 +700,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetImageName(); } else { - setImageName((String)value); + setImageName((java.lang.String)value); } break; @@ -725,7 +708,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetDescription(); } else { - setDescription((String)value); + setDescription((java.lang.String)value); } break; @@ -733,7 +716,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetCreateTime(); } else { - setCreateTime((Long)value); + setCreateTime((java.lang.Long)value); } break; @@ -749,7 +732,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetFileSize(); } else { - setFileSize((Long)value); + setFileSize((java.lang.Long)value); } break; @@ -757,7 +740,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetSoftware(); } else { - setSoftware((List<String>)value); + setSoftware((java.util.List<java.lang.String>)value); } break; @@ -765,7 +748,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetTags(); } else { - setTags((List<String>)value); + setTags((java.util.List<java.lang.String>)value); } break; @@ -773,7 +756,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetOsId(); } else { - setOsId((Integer)value); + setOsId((java.lang.Integer)value); } break; @@ -781,7 +764,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetVirtId(); } else { - setVirtId((String)value); + setVirtId((java.lang.String)value); } break; @@ -789,7 +772,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetIsTemplate(); } else { - setIsTemplate((Boolean)value); + setIsTemplate((java.lang.Boolean)value); } break; @@ -805,14 +788,19 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (value == null) { unsetMachineDescription(); } else { - setMachineDescription((ByteBuffer)value); + if (value instanceof byte[]) { + setMachineDescription((byte[])value); + } else { + setMachineDescription((java.nio.ByteBuffer)value); + } } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case IMAGE_BASE_ID: return getImageBaseId(); @@ -857,13 +845,13 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return getMachineDescription(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -896,13 +884,11 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat case MACHINE_DESCRIPTION: return isSetMachineDescription(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof ImagePublishData) return this.equals((ImagePublishData)that); return false; @@ -911,6 +897,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat public boolean equals(ImagePublishData that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_imageBaseId = true && this.isSetImageBaseId(); boolean that_present_imageBaseId = true && that.isSetImageBaseId(); @@ -1043,79 +1031,57 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_imageBaseId = true && (isSetImageBaseId()); - list.add(present_imageBaseId); - if (present_imageBaseId) - list.add(imageBaseId); - - boolean present_imageVersionId = true && (isSetImageVersionId()); - list.add(present_imageVersionId); - if (present_imageVersionId) - list.add(imageVersionId); - - boolean present_imageName = true && (isSetImageName()); - list.add(present_imageName); - if (present_imageName) - list.add(imageName); - - boolean present_description = true && (isSetDescription()); - list.add(present_description); - if (present_description) - list.add(description); - - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_uploader = true && (isSetUploader()); - list.add(present_uploader); - if (present_uploader) - list.add(uploader); - - boolean present_fileSize = true; - list.add(present_fileSize); - if (present_fileSize) - list.add(fileSize); - - boolean present_software = true && (isSetSoftware()); - list.add(present_software); - if (present_software) - list.add(software); - - boolean present_tags = true && (isSetTags()); - list.add(present_tags); - if (present_tags) - list.add(tags); - - boolean present_osId = true; - list.add(present_osId); - if (present_osId) - list.add(osId); - - boolean present_virtId = true && (isSetVirtId()); - list.add(present_virtId); - if (present_virtId) - list.add(virtId); - - boolean present_isTemplate = true; - list.add(present_isTemplate); - if (present_isTemplate) - list.add(isTemplate); - - boolean present_owner = true && (isSetOwner()); - list.add(present_owner); - if (present_owner) - list.add(owner); - - boolean present_machineDescription = true && (isSetMachineDescription()); - list.add(present_machineDescription); - if (present_machineDescription) - list.add(machineDescription); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); + if (isSetImageBaseId()) + hashCode = hashCode * 8191 + imageBaseId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287); + if (isSetImageVersionId()) + hashCode = hashCode * 8191 + imageVersionId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetImageName()) ? 131071 : 524287); + if (isSetImageName()) + hashCode = hashCode * 8191 + imageName.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287); + if (isSetDescription()) + hashCode = hashCode * 8191 + description.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createTime); + + hashCode = hashCode * 8191 + ((isSetUploader()) ? 131071 : 524287); + if (isSetUploader()) + hashCode = hashCode * 8191 + uploader.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fileSize); + + hashCode = hashCode * 8191 + ((isSetSoftware()) ? 131071 : 524287); + if (isSetSoftware()) + hashCode = hashCode * 8191 + software.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTags()) ? 131071 : 524287); + if (isSetTags()) + hashCode = hashCode * 8191 + tags.hashCode(); + + hashCode = hashCode * 8191 + osId; + + hashCode = hashCode * 8191 + ((isSetVirtId()) ? 131071 : 524287); + if (isSetVirtId()) + hashCode = hashCode * 8191 + virtId.hashCode(); + + hashCode = hashCode * 8191 + ((isTemplate) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetOwner()) ? 131071 : 524287); + if (isSetOwner()) + hashCode = hashCode * 8191 + owner.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMachineDescription()) ? 131071 : 524287); + if (isSetMachineDescription()) + hashCode = hashCode * 8191 + machineDescription.hashCode(); + + return hashCode; } @Override @@ -1126,7 +1092,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId()); + lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId()); if (lastComparison != 0) { return lastComparison; } @@ -1136,7 +1102,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId()); + lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId()); if (lastComparison != 0) { return lastComparison; } @@ -1146,7 +1112,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName()); + lastComparison = java.lang.Boolean.compare(isSetImageName(), other.isSetImageName()); if (lastComparison != 0) { return lastComparison; } @@ -1156,7 +1122,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); + lastComparison = java.lang.Boolean.compare(isSetDescription(), other.isSetDescription()); if (lastComparison != 0) { return lastComparison; } @@ -1166,7 +1132,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime()); if (lastComparison != 0) { return lastComparison; } @@ -1176,7 +1142,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUploader()).compareTo(other.isSetUploader()); + lastComparison = java.lang.Boolean.compare(isSetUploader(), other.isSetUploader()); if (lastComparison != 0) { return lastComparison; } @@ -1186,7 +1152,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize()); + lastComparison = java.lang.Boolean.compare(isSetFileSize(), other.isSetFileSize()); if (lastComparison != 0) { return lastComparison; } @@ -1196,7 +1162,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSoftware()).compareTo(other.isSetSoftware()); + lastComparison = java.lang.Boolean.compare(isSetSoftware(), other.isSetSoftware()); if (lastComparison != 0) { return lastComparison; } @@ -1206,7 +1172,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTags()).compareTo(other.isSetTags()); + lastComparison = java.lang.Boolean.compare(isSetTags(), other.isSetTags()); if (lastComparison != 0) { return lastComparison; } @@ -1216,7 +1182,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId()); + lastComparison = java.lang.Boolean.compare(isSetOsId(), other.isSetOsId()); if (lastComparison != 0) { return lastComparison; } @@ -1226,7 +1192,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId()); + lastComparison = java.lang.Boolean.compare(isSetVirtId(), other.isSetVirtId()); if (lastComparison != 0) { return lastComparison; } @@ -1236,7 +1202,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate()); + lastComparison = java.lang.Boolean.compare(isSetIsTemplate(), other.isSetIsTemplate()); if (lastComparison != 0) { return lastComparison; } @@ -1246,7 +1212,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOwner()).compareTo(other.isSetOwner()); + lastComparison = java.lang.Boolean.compare(isSetOwner(), other.isSetOwner()); if (lastComparison != 0) { return lastComparison; } @@ -1256,7 +1222,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMachineDescription()).compareTo(other.isSetMachineDescription()); + lastComparison = java.lang.Boolean.compare(isSetMachineDescription(), other.isSetMachineDescription()); if (lastComparison != 0) { return lastComparison; } @@ -1269,21 +1235,22 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return 0; } + @org.apache.thrift.annotation.Nullable 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); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("ImagePublishData("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("ImagePublishData("); boolean first = true; sb.append("imageBaseId:"); @@ -1404,7 +1371,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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; @@ -1414,13 +1381,13 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } } - private static class ImagePublishDataStandardSchemeFactory implements SchemeFactory { + private static class ImagePublishDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ImagePublishDataStandardScheme getScheme() { return new ImagePublishDataStandardScheme(); } } - private static class ImagePublishDataStandardScheme extends StandardScheme<ImagePublishData> { + private static class ImagePublishDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<ImagePublishData> { public void read(org.apache.thrift.protocol.TProtocol iprot, ImagePublishData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1493,8 +1460,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list74 = iprot.readListBegin(); - struct.software = new ArrayList<String>(_list74.size); - String _elem75; + struct.software = new java.util.ArrayList<java.lang.String>(_list74.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem75; for (int _i76 = 0; _i76 < _list74.size; ++_i76) { _elem75 = iprot.readString(); @@ -1511,8 +1478,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list77 = iprot.readListBegin(); - struct.tags = new ArrayList<String>(_list77.size); - String _elem78; + struct.tags = new java.util.ArrayList<java.lang.String>(_list77.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem78; for (int _i79 = 0; _i79 < _list77.size; ++_i79) { _elem78 = iprot.readString(); @@ -1616,7 +1583,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat oprot.writeFieldBegin(SOFTWARE_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.software.size())); - for (String _iter80 : struct.software) + for (java.lang.String _iter80 : struct.software) { oprot.writeString(_iter80); } @@ -1628,7 +1595,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat oprot.writeFieldBegin(TAGS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tags.size())); - for (String _iter81 : struct.tags) + for (java.lang.String _iter81 : struct.tags) { oprot.writeString(_iter81); } @@ -1663,18 +1630,18 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } - private static class ImagePublishDataTupleSchemeFactory implements SchemeFactory { + private static class ImagePublishDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public ImagePublishDataTupleScheme getScheme() { return new ImagePublishDataTupleScheme(); } } - private static class ImagePublishDataTupleScheme extends TupleScheme<ImagePublishData> { + private static class ImagePublishDataTupleScheme extends org.apache.thrift.scheme.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(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetImageBaseId()) { optionals.set(0); } @@ -1742,7 +1709,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (struct.isSetSoftware()) { { oprot.writeI32(struct.software.size()); - for (String _iter82 : struct.software) + for (java.lang.String _iter82 : struct.software) { oprot.writeString(_iter82); } @@ -1751,7 +1718,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (struct.isSetTags()) { { oprot.writeI32(struct.tags.size()); - for (String _iter83 : struct.tags) + for (java.lang.String _iter83 : struct.tags) { oprot.writeString(_iter83); } @@ -1776,8 +1743,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat @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(14); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(14); if (incoming.get(0)) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); @@ -1809,9 +1776,9 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } if (incoming.get(7)) { { - org.apache.thrift.protocol.TList _list84 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.software = new ArrayList<String>(_list84.size); - String _elem85; + org.apache.thrift.protocol.TList _list84 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.software = new java.util.ArrayList<java.lang.String>(_list84.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem85; for (int _i86 = 0; _i86 < _list84.size; ++_i86) { _elem85 = iprot.readString(); @@ -1822,9 +1789,9 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } if (incoming.get(8)) { { - org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tags = new ArrayList<String>(_list87.size); - String _elem88; + org.apache.thrift.protocol.TList _list87 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.tags = new java.util.ArrayList<java.lang.String>(_list87.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem88; for (int _i89 = 0; _i89 < _list87.size; ++_i89) { _elem88 = iprot.readString(); @@ -1857,5 +1824,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } |