diff options
author | Stephan Schwär | 2020-11-11 01:37:38 +0100 |
---|---|---|
committer | Stephan Schwär | 2020-11-11 01:37:38 +0100 |
commit | 1d51a067cc6c75bf67ea8893a5b3009b19d3119f (patch) | |
tree | 4c5fd8d8d4d39aaf88e17f48a583e7fad53ac783 /src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java | |
parent | Use master sync shared code formatting style (diff) | |
parent | Add new field to structs (diff) | |
download | master-sync-shared-1d51a067cc6c75bf67ea8893a5b3009b19d3119f.tar.gz master-sync-shared-1d51a067cc6c75bf67ea8893a5b3009b19d3119f.tar.xz master-sync-shared-1d51a067cc6c75bf67ea8893a5b3009b19d3119f.zip |
Merge remote-tracking branch 'origin/feature/search-in-description' into ovf-convert
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java | 181 |
1 files changed, 143 insertions, 38 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java index b52289b..235b90a 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java @@ -34,13 +34,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-07") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2020-10-12") public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRead, ImageSummaryRead._Fields>, java.io.Serializable, Cloneable, Comparable<ImageSummaryRead> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageSummaryRead"); 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 LATEST_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("latestVersionId", org.apache.thrift.protocol.TType.STRING, (short)3); 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)4); + private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)23); 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)5); 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)6); 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)7); @@ -69,6 +70,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea public String imageBaseId; // required public String latestVersionId; // required public String imageName; // required + public String description; // required public int osId; // required public String virtId; // required public long createTime; // required @@ -97,6 +99,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea IMAGE_BASE_ID((short)1, "imageBaseId"), LATEST_VERSION_ID((short)3, "latestVersionId"), IMAGE_NAME((short)4, "imageName"), + DESCRIPTION((short)23, "description"), OS_ID((short)5, "osId"), VIRT_ID((short)6, "virtId"), CREATE_TIME((short)7, "createTime"), @@ -139,6 +142,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea return LATEST_VERSION_ID; case 4: // IMAGE_NAME return IMAGE_NAME; + case 23: // DESCRIPTION + return DESCRIPTION; case 5: // OS_ID return OS_ID; case 6: // VIRT_ID @@ -238,6 +243,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea 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.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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, @@ -285,6 +292,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea String imageBaseId, String latestVersionId, String imageName, + String description, int osId, String virtId, long createTime, @@ -305,6 +313,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea this.imageBaseId = imageBaseId; this.latestVersionId = latestVersionId; this.imageName = imageName; + this.description = description; this.osId = osId; setOsIdIsSet(true); this.virtId = virtId; @@ -346,6 +355,9 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea if (other.isSetImageName()) { this.imageName = other.imageName; } + if (other.isSetDescription()) { + this.description = other.description; + } this.osId = other.osId; if (other.isSetVirtId()) { this.virtId = other.virtId; @@ -387,6 +399,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea this.imageBaseId = null; this.latestVersionId = null; this.imageName = null; + this.description = null; setOsIdIsSet(false); this.osId = 0; this.virtId = null; @@ -491,6 +504,30 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea } } + public String getDescription() { + return this.description; + } + + public ImageSummaryRead setDescription(String description) { + this.description = description; + return this; + } + + public void unsetDescription() { + this.description = null; + } + + /** Returns true if field description is set (has been assigned a value) and false otherwise */ + public boolean isSetDescription() { + return this.description != null; + } + + public void setDescriptionIsSet(boolean value) { + if (!value) { + this.description = null; + } + } + public int getOsId() { return this.osId; } @@ -945,6 +982,14 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea } break; + case DESCRIPTION: + if (value == null) { + unsetDescription(); + } else { + setDescription((String)value); + } + break; + case OS_ID: if (value == null) { unsetOsId(); @@ -1103,6 +1148,9 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea case IMAGE_NAME: return getImageName(); + case DESCRIPTION: + return getDescription(); + case OS_ID: return getOsId(); @@ -1174,6 +1222,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea return isSetLatestVersionId(); case IMAGE_NAME: return isSetImageName(); + case DESCRIPTION: + return isSetDescription(); case OS_ID: return isSetOsId(); case VIRT_ID: @@ -1254,6 +1304,15 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea return false; } + boolean this_present_description = true && this.isSetDescription(); + boolean that_present_description = true && that.isSetDescription(); + if (this_present_description || that_present_description) { + if (!(this_present_description && that_present_description)) + return false; + if (!this.description.equals(that.description)) + return false; + } + boolean this_present_osId = true; boolean that_present_osId = true; if (this_present_osId || that_present_osId) { @@ -1438,6 +1497,11 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea if (present_imageName) list.add(imageName); + boolean present_description = true && (isSetDescription()); + list.add(present_description); + if (present_description) + list.add(description); + boolean present_osId = true; list.add(present_osId); if (present_osId) @@ -1569,6 +1633,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea return lastComparison; } } + lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDescription()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId()); if (lastComparison != 0) { return lastComparison; @@ -1793,6 +1867,14 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea } first = false; if (!first) sb.append(", "); + sb.append("description:"); + if (this.description == null) { + sb.append("null"); + } else { + sb.append(this.description); + } + first = false; + if (!first) sb.append(", "); sb.append("osId:"); sb.append(this.osId); first = false; @@ -1969,6 +2051,14 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 23: // DESCRIPTION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.description = iprot.readString(); + struct.setDescriptionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; case 5: // OS_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.osId = iprot.readI32(); @@ -2217,6 +2307,11 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea oprot.writeI32(struct.versionCount); oprot.writeFieldEnd(); } + if (struct.description != null) { + oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); + oprot.writeString(struct.description); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -2244,61 +2339,64 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea if (struct.isSetImageName()) { optionals.set(2); } - if (struct.isSetOsId()) { + if (struct.isSetDescription()) { optionals.set(3); } - if (struct.isSetVirtId()) { + if (struct.isSetOsId()) { optionals.set(4); } - if (struct.isSetCreateTime()) { + if (struct.isSetVirtId()) { optionals.set(5); } - if (struct.isSetUpdateTime()) { + if (struct.isSetCreateTime()) { optionals.set(6); } - if (struct.isSetUploadTime()) { + if (struct.isSetUpdateTime()) { optionals.set(7); } - if (struct.isSetExpireTime()) { + if (struct.isSetUploadTime()) { optionals.set(8); } - if (struct.isSetOwnerId()) { + if (struct.isSetExpireTime()) { optionals.set(9); } - if (struct.isSetUploaderId()) { + if (struct.isSetOwnerId()) { optionals.set(10); } - if (struct.isSetShareMode()) { + if (struct.isSetUploaderId()) { optionals.set(11); } - if (struct.isSetFileSize()) { + if (struct.isSetShareMode()) { optionals.set(12); } - if (struct.isSetIsRestricted()) { + if (struct.isSetFileSize()) { optionals.set(13); } - if (struct.isSetIsValid()) { + if (struct.isSetIsRestricted()) { optionals.set(14); } - if (struct.isSetIsProcessed()) { + if (struct.isSetIsValid()) { optionals.set(15); } - if (struct.isSetIsTemplate()) { + if (struct.isSetIsProcessed()) { optionals.set(16); } - if (struct.isSetDefaultPermissions()) { + if (struct.isSetIsTemplate()) { optionals.set(17); } - if (struct.isSetUserPermissions()) { + if (struct.isSetDefaultPermissions()) { optionals.set(18); } - if (struct.isSetFileSizeSum()) { + if (struct.isSetUserPermissions()) { optionals.set(19); } - if (struct.isSetVersionCount()) { + if (struct.isSetFileSizeSum()) { optionals.set(20); } - oprot.writeBitSet(optionals, 21); + if (struct.isSetVersionCount()) { + optionals.set(21); + } + oprot.writeBitSet(optionals, 22); if (struct.isSetImageBaseId()) { oprot.writeString(struct.imageBaseId); } @@ -2308,6 +2406,9 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea if (struct.isSetImageName()) { oprot.writeString(struct.imageName); } + if (struct.isSetDescription()) { + oprot.writeString(struct.description); + } if (struct.isSetOsId()) { oprot.writeI32(struct.osId); } @@ -2367,7 +2468,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea @Override public void read(org.apache.thrift.protocol.TProtocol prot, ImageSummaryRead struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(21); + BitSet incoming = iprot.readBitSet(22); if (incoming.get(0)) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); @@ -2381,76 +2482,80 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea struct.setImageNameIsSet(true); } if (incoming.get(3)) { + struct.description = iprot.readString(); + struct.setDescriptionIsSet(true); + } + if (incoming.get(4)) { struct.osId = iprot.readI32(); struct.setOsIdIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(5)) { struct.virtId = iprot.readString(); struct.setVirtIdIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(6)) { struct.createTime = iprot.readI64(); struct.setCreateTimeIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(7)) { struct.updateTime = iprot.readI64(); struct.setUpdateTimeIsSet(true); } - if (incoming.get(7)) { + if (incoming.get(8)) { struct.uploadTime = iprot.readI64(); struct.setUploadTimeIsSet(true); } - if (incoming.get(8)) { + if (incoming.get(9)) { struct.expireTime = iprot.readI64(); struct.setExpireTimeIsSet(true); } - if (incoming.get(9)) { + if (incoming.get(10)) { struct.ownerId = iprot.readString(); struct.setOwnerIdIsSet(true); } - if (incoming.get(10)) { + if (incoming.get(11)) { struct.uploaderId = iprot.readString(); struct.setUploaderIdIsSet(true); } - if (incoming.get(11)) { + if (incoming.get(12)) { struct.shareMode = org.openslx.bwlp.thrift.iface.ShareMode.findByValue(iprot.readI32()); struct.setShareModeIsSet(true); } - if (incoming.get(12)) { + if (incoming.get(13)) { struct.fileSize = iprot.readI64(); struct.setFileSizeIsSet(true); } - if (incoming.get(13)) { + if (incoming.get(14)) { struct.isRestricted = iprot.readBool(); struct.setIsRestrictedIsSet(true); } - if (incoming.get(14)) { + if (incoming.get(15)) { struct.isValid = iprot.readBool(); struct.setIsValidIsSet(true); } - if (incoming.get(15)) { + if (incoming.get(16)) { struct.isProcessed = iprot.readBool(); struct.setIsProcessedIsSet(true); } - if (incoming.get(16)) { + if (incoming.get(17)) { struct.isTemplate = iprot.readBool(); struct.setIsTemplateIsSet(true); } - if (incoming.get(17)) { + if (incoming.get(18)) { struct.defaultPermissions = new ImagePermissions(); struct.defaultPermissions.read(iprot); struct.setDefaultPermissionsIsSet(true); } - if (incoming.get(18)) { + if (incoming.get(19)) { struct.userPermissions = new ImagePermissions(); struct.userPermissions.read(iprot); struct.setUserPermissionsIsSet(true); } - if (incoming.get(19)) { + if (incoming.get(20)) { struct.fileSizeSum = iprot.readI64(); struct.setFileSizeSumIsSet(true); } - if (incoming.get(20)) { + if (incoming.get(21)) { struct.versionCount = iprot.readI32(); struct.setVersionCountIsSet(true); } |