diff options
author | Simon Rettberg | 2025-04-01 17:55:59 +0200 |
---|---|---|
committer | Simon Rettberg | 2025-04-01 17:55:59 +0200 |
commit | 800f5b508255bb1449cc54ded5426c56bd9ac713 (patch) | |
tree | 02cd7ba08729f4b8c8b99d01b62b483887ab24be | |
parent | thrift: Add imagePath to ImageDetailsRead struct (diff) | |
download | master-sync-shared-800f5b5.tar.gz master-sync-shared-800f5b5.tar.xz master-sync-shared-800f5b5.zip |
Field belongs to version, not base image....
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java | 115 | ||||
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java | 131 | ||||
-rw-r--r-- | src/main/thrift/bwlp.thrift | 2 |
3 files changed, 131 insertions, 117 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java index 0a5d54b..b7cb058 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java @@ -27,7 +27,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea 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)15); private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)16); private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)18); - private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("imagePath", org.apache.thrift.protocol.TType.STRING, (short)19); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImageDetailsReadStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImageDetailsReadTupleSchemeFactory(); @@ -52,7 +51,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea public boolean isTemplate; // required public @org.apache.thrift.annotation.Nullable ImagePermissions defaultPermissions; // required public @org.apache.thrift.annotation.Nullable ImagePermissions userPermissions; // optional - public @org.apache.thrift.annotation.Nullable java.lang.String imagePath; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -75,8 +73,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea SHARE_MODE((short)14, "shareMode"), IS_TEMPLATE((short)15, "isTemplate"), DEFAULT_PERMISSIONS((short)16, "defaultPermissions"), - USER_PERMISSIONS((short)18, "userPermissions"), - IMAGE_PATH((short)19, "imagePath"); + USER_PERMISSIONS((short)18, "userPermissions"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); @@ -124,8 +121,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea return DEFAULT_PERMISSIONS; case 18: // USER_PERMISSIONS return USER_PERMISSIONS; - case 19: // IMAGE_PATH - return IMAGE_PATH; default: return null; } @@ -174,7 +169,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea private static final int __UPDATETIME_ISSET_ID = 2; private static final int __ISTEMPLATE_ISSET_ID = 3; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.USER_PERMISSIONS,_Fields.IMAGE_PATH}; + private static final _Fields optionals[] = {_Fields.USER_PERMISSIONS}; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -212,8 +207,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class))); tmpMap.put(_Fields.USER_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("userPermissions", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class))); - tmpMap.put(_Fields.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("imagePath", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageDetailsRead.class, metaDataMap); } @@ -310,9 +303,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea if (other.isSetUserPermissions()) { this.userPermissions = new ImagePermissions(other.userPermissions); } - if (other.isSetImagePath()) { - this.imagePath = other.imagePath; - } } @Override @@ -342,7 +332,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea this.isTemplate = false; this.defaultPermissions = null; this.userPermissions = null; - this.imagePath = null; } @org.apache.thrift.annotation.Nullable @@ -777,31 +766,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea } } - @org.apache.thrift.annotation.Nullable - public java.lang.String getImagePath() { - return this.imagePath; - } - - public ImageDetailsRead setImagePath(@org.apache.thrift.annotation.Nullable java.lang.String imagePath) { - this.imagePath = imagePath; - return this; - } - - public void unsetImagePath() { - this.imagePath = null; - } - - /** Returns true if field imagePath is set (has been assigned a value) and false otherwise */ - public boolean isSetImagePath() { - return this.imagePath != null; - } - - public void setImagePathIsSet(boolean value) { - if (!value) { - this.imagePath = null; - } - } - @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { @@ -933,14 +897,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea } break; - case IMAGE_PATH: - if (value == null) { - unsetImagePath(); - } else { - setImagePath((java.lang.String)value); - } - break; - } } @@ -996,9 +952,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea case USER_PERMISSIONS: return getUserPermissions(); - case IMAGE_PATH: - return getImagePath(); - } throw new java.lang.IllegalStateException(); } @@ -1043,8 +996,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea return isSetDefaultPermissions(); case USER_PERMISSIONS: return isSetUserPermissions(); - case IMAGE_PATH: - return isSetImagePath(); } throw new java.lang.IllegalStateException(); } @@ -1206,15 +1157,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea return false; } - boolean this_present_imagePath = true && this.isSetImagePath(); - boolean that_present_imagePath = true && that.isSetImagePath(); - if (this_present_imagePath || that_present_imagePath) { - if (!(this_present_imagePath && that_present_imagePath)) - return false; - if (!this.imagePath.equals(that.imagePath)) - return false; - } - return true; } @@ -1278,10 +1220,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea if (isSetUserPermissions()) hashCode = hashCode * 8191 + userPermissions.hashCode(); - hashCode = hashCode * 8191 + ((isSetImagePath()) ? 131071 : 524287); - if (isSetImagePath()) - hashCode = hashCode * 8191 + imagePath.hashCode(); - return hashCode; } @@ -1453,16 +1391,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea return lastComparison; } } - lastComparison = java.lang.Boolean.compare(isSetImagePath(), other.isSetImagePath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetImagePath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagePath, other.imagePath); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -1600,16 +1528,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea } first = false; } - if (isSetImagePath()) { - if (!first) sb.append(", "); - sb.append("imagePath:"); - if (this.imagePath == null) { - sb.append("null"); - } else { - sb.append(this.imagePath); - } - first = false; - } sb.append(")"); return sb.toString(); } @@ -1814,14 +1732,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 19: // IMAGE_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.imagePath = iprot.readString(); - struct.setImagePathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1926,13 +1836,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea oprot.writeFieldEnd(); } } - if (struct.imagePath != null) { - if (struct.isSetImagePath()) { - oprot.writeFieldBegin(IMAGE_PATH_FIELD_DESC); - oprot.writeString(struct.imagePath); - oprot.writeFieldEnd(); - } - } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -2000,10 +1903,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea if (struct.isSetUserPermissions()) { optionals.set(15); } - if (struct.isSetImagePath()) { - optionals.set(16); - } - oprot.writeBitSet(optionals, 17); + oprot.writeBitSet(optionals, 16); if (struct.isSetImageBaseId()) { oprot.writeString(struct.imageBaseId); } @@ -2064,15 +1964,12 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea if (struct.isSetUserPermissions()) { struct.userPermissions.write(oprot); } - if (struct.isSetImagePath()) { - oprot.writeString(struct.imagePath); - } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ImageDetailsRead struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(17); + java.util.BitSet incoming = iprot.readBitSet(16); if (incoming.get(0)) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); @@ -2158,10 +2055,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea struct.userPermissions.read(iprot); struct.setUserPermissionsIsSet(true); } - if (incoming.get(16)) { - struct.imagePath = iprot.readString(); - struct.setImagePathIsSet(true); - } } } diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java index 27d3256..a552c88 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.15.0) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,7 +7,7 @@ package org.openslx.bwlp.thrift.iface; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2025-04-01") public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersionDetails, ImageVersionDetails._Fields>, java.io.Serializable, Cloneable, Comparable<ImageVersionDetails> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageVersionDetails"); @@ -20,6 +20,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion private static final org.apache.thrift.protocol.TField IS_VALID_FIELD_DESC = new org.apache.thrift.protocol.TField("isValid", org.apache.thrift.protocol.TType.BOOL, (short)8); private static final org.apache.thrift.protocol.TField IS_PROCESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("isProcessed", org.apache.thrift.protocol.TType.BOOL, (short)9); private static final org.apache.thrift.protocol.TField SOFTWARE_FIELD_DESC = new org.apache.thrift.protocol.TField("software", org.apache.thrift.protocol.TType.LIST, (short)10); + private static final org.apache.thrift.protocol.TField IMAGE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("imagePath", org.apache.thrift.protocol.TType.STRING, (short)11); private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImageVersionDetailsStandardSchemeFactory(); private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImageVersionDetailsTupleSchemeFactory(); @@ -33,6 +34,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion public boolean isValid; // required public boolean isProcessed; // required public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> software; // required + public @org.apache.thrift.annotation.Nullable java.lang.String imagePath; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -44,7 +46,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion IS_RESTRICTED((short)7, "isRestricted"), IS_VALID((short)8, "isValid"), IS_PROCESSED((short)9, "isProcessed"), - SOFTWARE((short)10, "software"); + SOFTWARE((short)10, "software"), + IMAGE_PATH((short)11, "imagePath"); private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); @@ -78,6 +81,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion return IS_PROCESSED; case 10: // SOFTWARE return SOFTWARE; + case 11: // IMAGE_PATH + return IMAGE_PATH; default: return null; } @@ -109,10 +114,12 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } + @Override public java.lang.String getFieldName() { return _fieldName; } @@ -126,6 +133,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion private static final int __ISVALID_ISSET_ID = 4; private static final int __ISPROCESSED_ISSET_ID = 5; private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.IMAGE_PATH}; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -148,6 +156,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion tmpMap.put(_Fields.SOFTWARE, new org.apache.thrift.meta_data.FieldMetaData("software", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.IMAGE_PATH, new org.apache.thrift.meta_data.FieldMetaData("imagePath", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageVersionDetails.class, metaDataMap); } @@ -205,8 +215,12 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion java.util.List<java.lang.String> __this__software = new java.util.ArrayList<java.lang.String>(other.software); this.software = __this__software; } + if (other.isSetImagePath()) { + this.imagePath = other.imagePath; + } } + @Override public ImageVersionDetails deepCopy() { return new ImageVersionDetails(this); } @@ -228,6 +242,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion setIsProcessedIsSet(false); this.isProcessed = false; this.software = null; + this.imagePath = null; } @org.apache.thrift.annotation.Nullable @@ -459,6 +474,32 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion } } + @org.apache.thrift.annotation.Nullable + public java.lang.String getImagePath() { + return this.imagePath; + } + + public ImageVersionDetails setImagePath(@org.apache.thrift.annotation.Nullable java.lang.String imagePath) { + this.imagePath = imagePath; + return this; + } + + public void unsetImagePath() { + this.imagePath = null; + } + + /** Returns true if field imagePath is set (has been assigned a value) and false otherwise */ + public boolean isSetImagePath() { + return this.imagePath != null; + } + + public void setImagePathIsSet(boolean value) { + if (!value) { + this.imagePath = null; + } + } + + @Override public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case VERSION_ID: @@ -533,10 +574,19 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion } break; + case IMAGE_PATH: + if (value == null) { + unsetImagePath(); + } else { + setImagePath((java.lang.String)value); + } + break; + } } @org.apache.thrift.annotation.Nullable + @Override public java.lang.Object getFieldValue(_Fields field) { switch (field) { case VERSION_ID: @@ -566,11 +616,15 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion case SOFTWARE: return getSoftware(); + case IMAGE_PATH: + return getImagePath(); + } throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); @@ -595,6 +649,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion return isSetIsProcessed(); case SOFTWARE: return isSetSoftware(); + case IMAGE_PATH: + return isSetImagePath(); } throw new java.lang.IllegalStateException(); } @@ -693,6 +749,15 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion return false; } + boolean this_present_imagePath = true && this.isSetImagePath(); + boolean that_present_imagePath = true && that.isSetImagePath(); + if (this_present_imagePath || that_present_imagePath) { + if (!(this_present_imagePath && that_present_imagePath)) + return false; + if (!this.imagePath.equals(that.imagePath)) + return false; + } + return true; } @@ -724,6 +789,10 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion if (isSetSoftware()) hashCode = hashCode * 8191 + software.hashCode(); + hashCode = hashCode * 8191 + ((isSetImagePath()) ? 131071 : 524287); + if (isSetImagePath()) + hashCode = hashCode * 8191 + imagePath.hashCode(); + return hashCode; } @@ -825,18 +894,31 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion return lastComparison; } } + lastComparison = java.lang.Boolean.compare(isSetImagePath(), other.isSetImagePath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImagePath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imagePath, other.imagePath); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { scheme(oprot).write(oprot, this); } @@ -893,6 +975,16 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion sb.append(this.software); } first = false; + if (isSetImagePath()) { + if (!first) sb.append(", "); + sb.append("imagePath:"); + if (this.imagePath == null) { + sb.append("null"); + } else { + sb.append(this.imagePath); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -921,6 +1013,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion } private static class ImageVersionDetailsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public ImageVersionDetailsStandardScheme getScheme() { return new ImageVersionDetailsStandardScheme(); } @@ -928,6 +1021,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion private static class ImageVersionDetailsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ImageVersionDetails> { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, ImageVersionDetails struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -1020,6 +1114,14 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 11: // IMAGE_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imagePath = iprot.readString(); + struct.setImagePathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1031,6 +1133,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, ImageVersionDetails struct) throws org.apache.thrift.TException { struct.validate(); @@ -1075,6 +1178,13 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion } oprot.writeFieldEnd(); } + if (struct.imagePath != null) { + if (struct.isSetImagePath()) { + oprot.writeFieldBegin(IMAGE_PATH_FIELD_DESC); + oprot.writeString(struct.imagePath); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1082,6 +1192,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion } private static class ImageVersionDetailsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public ImageVersionDetailsTupleScheme getScheme() { return new ImageVersionDetailsTupleScheme(); } @@ -1120,7 +1231,10 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion if (struct.isSetSoftware()) { optionals.set(8); } - oprot.writeBitSet(optionals, 9); + if (struct.isSetImagePath()) { + optionals.set(9); + } + oprot.writeBitSet(optionals, 10); if (struct.isSetVersionId()) { oprot.writeString(struct.versionId); } @@ -1154,12 +1268,15 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion } } } + if (struct.isSetImagePath()) { + oprot.writeString(struct.imagePath); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ImageVersionDetails struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(9); + java.util.BitSet incoming = iprot.readBitSet(10); if (incoming.get(0)) { struct.versionId = iprot.readString(); struct.setVersionIdIsSet(true); @@ -1205,6 +1322,10 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion } struct.setSoftwareIsSet(true); } + if (incoming.get(9)) { + struct.imagePath = iprot.readString(); + struct.setImagePathIsSet(true); + } } } diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift index d2c02b1..76c45b8 100644 --- a/src/main/thrift/bwlp.thrift +++ b/src/main/thrift/bwlp.thrift @@ -208,6 +208,7 @@ struct ImageVersionDetails { 8: bool isValid, 9: bool isProcessed, 10: list<string> software, + 11: optional string imagePath, // Null if no download permission, internal image path otherwise } struct ImageDetailsRead { @@ -227,7 +228,6 @@ struct ImageDetailsRead { 15: bool isTemplate, 16: ImagePermissions defaultPermissions, 18: optional ImagePermissions userPermissions, - 19: optional string imagePath, // Null if no download permission, internal image path otherwise } struct ImagePublishData { |