From 2194e7e82864c08276d7a333d83851d514d28c1f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 16 Jun 2015 18:12:33 +0200 Subject: More thrift interface changes --- .../bwlp/thrift/iface/ImageDetailsRead.java | 327 +++++++++------------ .../bwlp/thrift/iface/ImageVersionDetails.java | 157 +++++++++- 2 files changed, 292 insertions(+), 192 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface') 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 cf4bb9d..2e6581d 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java @@ -37,11 +37,11 @@ public class ImageDetailsRead implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -61,11 +61,11 @@ public class ImageDetailsRead implements org.apache.thrift.TBase versions; // required public String imageName; // required public String description; // required public List tags; // required - public List software; // required public int osId; // required public String virtId; // required public long createTime; // required @@ -85,11 +85,11 @@ public class ImageDetailsRead implements org.apache.thrift.TBase byName = new HashMap(); @@ -122,6 +122,8 @@ public class ImageDetailsRead implements org.apache.thrift.TBase versions, String imageName, String description, List tags, - List software, int osId, String virtId, long createTime, @@ -266,11 +265,11 @@ public class ImageDetailsRead implements org.apache.thrift.TBase __this__versions = new ArrayList(other.versions.size()); for (ImageVersionDetails other_element : other.versions) { @@ -314,10 +316,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase __this__tags = new ArrayList(other.tags); this.tags = __this__tags; } - if (other.isSetSoftware()) { - List __this__software = new ArrayList(other.software); - this.software = __this__software; - } this.osId = other.osId; if (other.isSetVirtId()) { this.virtId = other.virtId; @@ -350,11 +348,11 @@ public class ImageDetailsRead implements org.apache.thrift.TBase getSoftwareIterator() { - return (this.software == null) ? null : this.software.iterator(); - } - - public void addToSoftware(String elem) { - if (this.software == null) { - this.software = new ArrayList(); - } - this.software.add(elem); - } - - public List getSoftware() { - return this.software; - } - - public ImageDetailsRead setSoftware(List software) { - this.software = software; - return this; - } - - public void unsetSoftware() { - this.software = null; - } - - /** Returns true if field software is set (has been assigned a value) and false otherwise */ - public boolean isSetSoftware() { - return this.software != null; - } - - public void setSoftwareIsSet(boolean value) { - if (!value) { - this.software = null; - } - } - public int getOsId() { return this.osId; } @@ -846,6 +829,14 @@ public class ImageDetailsRead implements org.apache.thrift.TBase)value); - } - break; - case OS_ID: if (value == null) { unsetOsId(); @@ -977,6 +960,9 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list34.size); - for (int _i35 = 0; _i35 < _list34.size; ++_i35) + org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(); + struct.versions = new ArrayList(_list42.size); + for (int _i43 = 0; _i43 < _list42.size; ++_i43) { - ImageVersionDetails _elem36; - _elem36 = new ImageVersionDetails(); - _elem36.read(iprot); - struct.versions.add(_elem36); + ImageVersionDetails _elem44; + _elem44 = new ImageVersionDetails(); + _elem44.read(iprot); + struct.versions.add(_elem44); } iprot.readListEnd(); } @@ -1669,13 +1660,13 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list37.size); - for (int _i38 = 0; _i38 < _list37.size; ++_i38) + org.apache.thrift.protocol.TList _list45 = iprot.readListBegin(); + struct.tags = new ArrayList(_list45.size); + for (int _i46 = 0; _i46 < _list45.size; ++_i46) { - String _elem39; - _elem39 = iprot.readString(); - struct.tags.add(_elem39); + String _elem47; + _elem47 = iprot.readString(); + struct.tags.add(_elem47); } iprot.readListEnd(); } @@ -1684,24 +1675,6 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list40.size); - for (int _i41 = 0; _i41 < _list40.size; ++_i41) - { - String _elem42; - _elem42 = iprot.readString(); - struct.software.add(_elem42); - } - iprot.readListEnd(); - } - struct.setSoftwareIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; case 8: // OS_ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.osId = iprot.readI32(); @@ -1775,7 +1748,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list49.size); - for (int _i50 = 0; _i50 < _list49.size; ++_i50) + org.apache.thrift.protocol.TList _list52 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.versions = new ArrayList(_list52.size); + for (int _i53 = 0; _i53 < _list52.size; ++_i53) { - ImageVersionDetails _elem51; - _elem51 = new ImageVersionDetails(); - _elem51.read(iprot); - struct.versions.add(_elem51); + ImageVersionDetails _elem54; + _elem54 = new ImageVersionDetails(); + _elem54.read(iprot); + struct.versions.add(_elem54); } } struct.setVersionsIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(4)) { struct.imageName = iprot.readString(); struct.setImageNameIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(5)) { struct.description = iprot.readString(); struct.setDescriptionIsSet(true); } - if (incoming.get(5)) { - { - org.apache.thrift.protocol.TList _list52 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tags = new ArrayList(_list52.size); - for (int _i53 = 0; _i53 < _list52.size; ++_i53) - { - String _elem54; - _elem54 = iprot.readString(); - struct.tags.add(_elem54); - } - } - struct.setTagsIsSet(true); - } if (incoming.get(6)) { { org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.software = new ArrayList(_list55.size); + struct.tags = new ArrayList(_list55.size); for (int _i56 = 0; _i56 < _list55.size; ++_i56) { String _elem57; _elem57 = iprot.readString(); - struct.software.add(_elem57); + struct.tags.add(_elem57); } } - struct.setSoftwareIsSet(true); + struct.setTagsIsSet(true); } if (incoming.get(7)) { struct.osId = iprot.readI32(); 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 39202db..608443d 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java @@ -44,6 +44,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -60,6 +61,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase software; // 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 { @@ -71,7 +73,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase byName = new HashMap(); @@ -104,6 +107,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase software) { this(); this.versionId = versionId; @@ -208,6 +217,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase __this__software = new ArrayList(other.software); + this.software = __this__software; + } } public ImageVersionDetails deepCopy() { @@ -252,6 +266,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase getSoftwareIterator() { + return (this.software == null) ? null : this.software.iterator(); + } + + public void addToSoftware(String elem) { + if (this.software == null) { + this.software = new ArrayList(); + } + this.software.add(elem); + } + + public List getSoftware() { + return this.software; + } + + public ImageVersionDetails setSoftware(List software) { + this.software = software; + return this; + } + + public void unsetSoftware() { + this.software = null; + } + + /** Returns true if field software is set (has been assigned a value) and false otherwise */ + public boolean isSetSoftware() { + return this.software != null; + } + + public void setSoftwareIsSet(boolean value) { + if (!value) { + this.software = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case VERSION_ID: @@ -537,6 +591,14 @@ public class ImageVersionDetails implements org.apache.thrift.TBase)value); + } + break; + } } @@ -569,6 +631,9 @@ public class ImageVersionDetails implements org.apache.thrift.TBase(_list34.size); + for (int _i35 = 0; _i35 < _list34.size; ++_i35) + { + String _elem36; + _elem36 = iprot.readString(); + struct.software.add(_elem36); + } + iprot.readListEnd(); + } + struct.setSoftwareIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1028,6 +1140,18 @@ public class ImageVersionDetails implements org.apache.thrift.TBase(_list39.size); + for (int _i40 = 0; _i40 < _list39.size; ++_i40) + { + String _elem41; + _elem41 = iprot.readString(); + struct.software.add(_elem41); + } + } + struct.setSoftwareIsSet(true); + } } } -- cgit v1.2.3-55-g7522