diff options
author | Simon Rettberg | 2016-04-20 17:10:14 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-04-20 17:10:14 +0200 |
commit | ecd3d22510aa2f1aa0c44cee015bd690d19f45ce (patch) | |
tree | 8ec91bf9500a9575308898f0f70b5a90f0ba4737 /src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java | |
parent | Add queryUploadStatus to master server (diff) | |
download | master-sync-shared-ecd3d22510aa2f1aa0c44cee015bd690d19f45ce.tar.gz master-sync-shared-ecd3d22510aa2f1aa0c44cee015bd690d19f45ce.tar.xz master-sync-shared-ecd3d22510aa2f1aa0c44cee015bd690d19f45ce.zip |
More imgsync stuff
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 | 125 |
1 files changed, 120 insertions, 5 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 f04fd6b..9226df6 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java @@ -34,7 +34,7 @@ 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-18") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-04-20") 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"); @@ -51,6 +51,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat 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)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)12); 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 { @@ -71,6 +72,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat public String virtId; // required public boolean isTemplate; // required public UserInfo owner; // required + public 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 { @@ -86,7 +88,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat OS_ID((short)10, "osId"), VIRT_ID((short)11, "virtId"), IS_TEMPLATE((short)12, "isTemplate"), - OWNER((short)13, "owner"); + OWNER((short)13, "owner"), + MACHINE_DESCRIPTION((short)14, "machineDescription"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -127,6 +130,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return IS_TEMPLATE; case 13: // OWNER return OWNER; + case 14: // MACHINE_DESCRIPTION + return MACHINE_DESCRIPTION; default: return null; } @@ -203,6 +208,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.DEFAULT, 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); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImagePublishData.class, metaDataMap); } @@ -223,7 +230,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat int osId, String virtId, boolean isTemplate, - UserInfo owner) + UserInfo owner, + ByteBuffer machineDescription) { this(); this.imageBaseId = imageBaseId; @@ -243,6 +251,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat this.isTemplate = isTemplate; setIsTemplateIsSet(true); this.owner = owner; + this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription); } /** @@ -283,6 +292,9 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (other.isSetOwner()) { this.owner = new UserInfo(other.owner); } + if (other.isSetMachineDescription()) { + this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(other.machineDescription); + } } public ImagePublishData deepCopy() { @@ -308,6 +320,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat setIsTemplateIsSet(false); this.isTemplate = false; this.owner = null; + this.machineDescription = null; } public String getImageBaseId() { @@ -648,6 +661,40 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } } + public byte[] getMachineDescription() { + setMachineDescription(org.apache.thrift.TBaseHelper.rightSize(machineDescription)); + return machineDescription == null ? null : machineDescription.array(); + } + + public 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)); + return this; + } + + public ImagePublishData setMachineDescription(ByteBuffer machineDescription) { + this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription); + return this; + } + + public void unsetMachineDescription() { + this.machineDescription = null; + } + + /** Returns true if field machineDescription is set (has been assigned a value) and false otherwise */ + public boolean isSetMachineDescription() { + return this.machineDescription != null; + } + + public void setMachineDescriptionIsSet(boolean value) { + if (!value) { + this.machineDescription = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case IMAGE_BASE_ID: @@ -754,6 +801,14 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat } break; + case MACHINE_DESCRIPTION: + if (value == null) { + unsetMachineDescription(); + } else { + setMachineDescription((ByteBuffer)value); + } + break; + } } @@ -798,6 +853,9 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat case OWNER: return getOwner(); + case MACHINE_DESCRIPTION: + return getMachineDescription(); + } throw new IllegalStateException(); } @@ -835,6 +893,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return isSetIsTemplate(); case OWNER: return isSetOwner(); + case MACHINE_DESCRIPTION: + return isSetMachineDescription(); } throw new IllegalStateException(); } @@ -969,6 +1029,15 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return false; } + boolean this_present_machineDescription = true && this.isSetMachineDescription(); + boolean that_present_machineDescription = true && that.isSetMachineDescription(); + if (this_present_machineDescription || that_present_machineDescription) { + if (!(this_present_machineDescription && that_present_machineDescription)) + return false; + if (!this.machineDescription.equals(that.machineDescription)) + return false; + } + return true; } @@ -1041,6 +1110,11 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (present_owner) list.add(owner); + boolean present_machineDescription = true && (isSetMachineDescription()); + list.add(present_machineDescription); + if (present_machineDescription) + list.add(machineDescription); + return list.hashCode(); } @@ -1182,6 +1256,16 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat return lastComparison; } } + lastComparison = Boolean.valueOf(isSetMachineDescription()).compareTo(other.isSetMachineDescription()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMachineDescription()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.machineDescription, other.machineDescription); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1289,6 +1373,14 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat sb.append(this.owner); } first = false; + if (!first) sb.append(", "); + sb.append("machineDescription:"); + if (this.machineDescription == null) { + sb.append("null"); + } else { + org.apache.thrift.TBaseHelper.toString(this.machineDescription, sb); + } + first = false; sb.append(")"); return sb.toString(); } @@ -1466,6 +1558,14 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 14: // MACHINE_DESCRIPTION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.machineDescription = iprot.readBinary(); + struct.setMachineDescriptionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1552,6 +1652,11 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat struct.owner.write(oprot); oprot.writeFieldEnd(); } + if (struct.machineDescription != null) { + oprot.writeFieldBegin(MACHINE_DESCRIPTION_FIELD_DESC); + oprot.writeBinary(struct.machineDescription); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1609,7 +1714,10 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (struct.isSetOwner()) { optionals.set(12); } - oprot.writeBitSet(optionals, 13); + if (struct.isSetMachineDescription()) { + optionals.set(13); + } + oprot.writeBitSet(optionals, 14); if (struct.isSetImageBaseId()) { oprot.writeString(struct.imageBaseId); } @@ -1661,12 +1769,15 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat if (struct.isSetOwner()) { struct.owner.write(oprot); } + if (struct.isSetMachineDescription()) { + oprot.writeBinary(struct.machineDescription); + } } @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(13); + BitSet incoming = iprot.readBitSet(14); if (incoming.get(0)) { struct.imageBaseId = iprot.readString(); struct.setImageBaseIdIsSet(true); @@ -1739,6 +1850,10 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat struct.owner.read(iprot); struct.setOwnerIsSet(true); } + if (incoming.get(13)) { + struct.machineDescription = iprot.readBinary(); + struct.setMachineDescriptionIsSet(true); + } } } |