From 35ad65f5d5edc3b5fd81693fce35e02a85cd7929 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 19 Jun 2015 12:37:02 +0200 Subject: Updated Thrift API --- .../openslx/bwlp/thrift/iface/LectureWrite.java | 742 +++++++++++++++++++-- 1 file changed, 694 insertions(+), 48 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java') diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java index 94ed38b..ea4bd53 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java @@ -38,13 +38,18 @@ public class LectureWrite implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -55,10 +60,15 @@ public class LectureWrite implements org.apache.thrift.TBase nics; // required + public List allowedUsers; // required + public List networkExceptions; // required public boolean isExam; // required public boolean hasInternetAccess; // required public LecturePermissions defaultPermissions; // required @@ -68,13 +78,18 @@ public class LectureWrite implements org.apache.thrift.TBase byName = new HashMap(); @@ -95,19 +110,29 @@ public class LectureWrite implements org.apache.thrift.TBase metaDataMap; static { @@ -164,6 +190,8 @@ public class LectureWrite implements org.apache.thrift.TBase nics, + List allowedUsers, + List networkExceptions, boolean isExam, boolean hasInternetAccess, LecturePermissions defaultPermissions) @@ -201,6 +245,8 @@ public class LectureWrite implements org.apache.thrift.TBase __this__nics = new ArrayList(other.nics); + this.nics = __this__nics; + } + if (other.isSetAllowedUsers()) { + List __this__allowedUsers = new ArrayList(other.allowedUsers); + this.allowedUsers = __this__allowedUsers; + } + if (other.isSetNetworkExceptions()) { + List __this__networkExceptions = new ArrayList(other.networkExceptions.size()); + for (NetRule other_element : other.networkExceptions) { + __this__networkExceptions.add(new NetRule(other_element)); + } + this.networkExceptions = __this__networkExceptions; + } this.isExam = other.isExam; this.hasInternetAccess = other.hasInternetAccess; if (other.isSetDefaultPermissions()) { @@ -251,6 +320,8 @@ public class LectureWrite implements org.apache.thrift.TBase getNicsIterator() { + return (this.nics == null) ? null : this.nics.iterator(); + } + + public void addToNics(String elem) { + if (this.nics == null) { + this.nics = new ArrayList(); + } + this.nics.add(elem); + } + + public List getNics() { + return this.nics; + } + + public LectureWrite setNics(List nics) { + this.nics = nics; + return this; + } + + public void unsetNics() { + this.nics = null; + } + + /** Returns true if field nics is set (has been assigned a value) and false otherwise */ + public boolean isSetNics() { + return this.nics != null; + } + + public void setNicsIsSet(boolean value) { + if (!value) { + this.nics = null; + } + } + + public int getAllowedUsersSize() { + return (this.allowedUsers == null) ? 0 : this.allowedUsers.size(); + } + + public java.util.Iterator getAllowedUsersIterator() { + return (this.allowedUsers == null) ? null : this.allowedUsers.iterator(); + } + + public void addToAllowedUsers(String elem) { + if (this.allowedUsers == null) { + this.allowedUsers = new ArrayList(); + } + this.allowedUsers.add(elem); + } + + public List getAllowedUsers() { + return this.allowedUsers; + } + + public LectureWrite setAllowedUsers(List allowedUsers) { + this.allowedUsers = allowedUsers; + return this; + } + + public void unsetAllowedUsers() { + this.allowedUsers = null; + } + + /** Returns true if field allowedUsers is set (has been assigned a value) and false otherwise */ + public boolean isSetAllowedUsers() { + return this.allowedUsers != null; + } + + public void setAllowedUsersIsSet(boolean value) { + if (!value) { + this.allowedUsers = null; + } + } + + public int getNetworkExceptionsSize() { + return (this.networkExceptions == null) ? 0 : this.networkExceptions.size(); + } + + public java.util.Iterator getNetworkExceptionsIterator() { + return (this.networkExceptions == null) ? null : this.networkExceptions.iterator(); + } + + public void addToNetworkExceptions(NetRule elem) { + if (this.networkExceptions == null) { + this.networkExceptions = new ArrayList(); + } + this.networkExceptions.add(elem); + } + + public List getNetworkExceptions() { + return this.networkExceptions; + } + + public LectureWrite setNetworkExceptions(List networkExceptions) { + this.networkExceptions = networkExceptions; + return this; + } + + public void unsetNetworkExceptions() { + this.networkExceptions = null; + } + + /** Returns true if field networkExceptions is set (has been assigned a value) and false otherwise */ + public boolean isSetNetworkExceptions() { + return this.networkExceptions != null; + } + + public void setNetworkExceptionsIsSet(boolean value) { + if (!value) { + this.networkExceptions = null; + } + } + public boolean isIsExam() { return this.isExam; } @@ -526,6 +765,14 @@ public class LectureWrite implements org.apache.thrift.TBase)value); + } + break; + + case ALLOWED_USERS: + if (value == null) { + unsetAllowedUsers(); + } else { + setAllowedUsers((List)value); + } + break; + + case NETWORK_EXCEPTIONS: + if (value == null) { + unsetNetworkExceptions(); + } else { + setNetworkExceptions((List)value); + } + break; + case IS_EXAM: if (value == null) { unsetIsExam(); @@ -596,6 +875,9 @@ public class LectureWrite implements org.apache.thrift.TBase(_list58.size); + for (int _i59 = 0; _i59 < _list58.size; ++_i59) + { + String _elem60; + _elem60 = iprot.readString(); + struct.nics.add(_elem60); + } + iprot.readListEnd(); + } + struct.setNicsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // ALLOWED_USERS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list61 = iprot.readListBegin(); + struct.allowedUsers = new ArrayList(_list61.size); + for (int _i62 = 0; _i62 < _list61.size; ++_i62) + { + String _elem63; + _elem63 = iprot.readString(); + struct.allowedUsers.add(_elem63); + } + iprot.readListEnd(); + } + struct.setAllowedUsersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // NETWORK_EXCEPTIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); + struct.networkExceptions = new ArrayList(_list64.size); + for (int _i65 = 0; _i65 < _list64.size; ++_i65) + { + NetRule _elem66; + _elem66 = new NetRule(); + _elem66.read(iprot); + struct.networkExceptions.add(_elem66); + } + iprot.readListEnd(); + } + struct.setNetworkExceptionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // IS_EXAM if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isExam = iprot.readBool(); struct.setIsExamIsSet(true); @@ -1062,7 +1568,7 @@ public class LectureWrite implements org.apache.thrift.TBase(_list73.size); + for (int _i74 = 0; _i74 < _list73.size; ++_i74) + { + String _elem75; + _elem75 = iprot.readString(); + struct.nics.add(_elem75); + } + } + struct.setNicsIsSet(true); + } + if (incoming.get(10)) { + { + org.apache.thrift.protocol.TList _list76 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.allowedUsers = new ArrayList(_list76.size); + for (int _i77 = 0; _i77 < _list76.size; ++_i77) + { + String _elem78; + _elem78 = iprot.readString(); + struct.allowedUsers.add(_elem78); + } + } + struct.setAllowedUsersIsSet(true); + } + if (incoming.get(11)) { + { + org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkExceptions = new ArrayList(_list79.size); + for (int _i80 = 0; _i80 < _list79.size; ++_i80) + { + NetRule _elem81; + _elem81 = new NetRule(); + _elem81.read(iprot); + struct.networkExceptions.add(_elem81); + } + } + struct.setNetworkExceptionsIsSet(true); + } + if (incoming.get(12)) { struct.isExam = iprot.readBool(); struct.setIsExamIsSet(true); } - if (incoming.get(8)) { + if (incoming.get(13)) { struct.hasInternetAccess = iprot.readBool(); struct.setHasInternetAccessIsSet(true); } - if (incoming.get(9)) { + if (incoming.get(14)) { struct.defaultPermissions = new LecturePermissions(); struct.defaultPermissions.read(iprot); struct.setDefaultPermissionsIsSet(true); -- cgit v1.2.3-55-g7522