diff options
author | Jonathan Bauer | 2016-03-03 17:56:31 +0100 |
---|---|---|
committer | Jonathan Bauer | 2016-03-03 17:56:31 +0100 |
commit | e25460f7133cfeb2e30bebbe6d55c29589627992 (patch) | |
tree | 5e40c0f26e2d1285a1bf3a84aea42b5e4b09b72e /src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java | |
parent | [vmware] Add addCdrom function (diff) | |
download | master-sync-shared-e25460f7133cfeb2e30bebbe6d55c29589627992.tar.gz master-sync-shared-e25460f7133cfeb2e30bebbe6d55c29589627992.tar.xz master-sync-shared-e25460f7133cfeb2e30bebbe6d55c29589627992.zip |
added hasUsbAccess field to Lecture* Struct
* TODO refactor NetRules
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java | 111 |
1 files changed, 105 insertions, 6 deletions
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 217e4f7..8635d41 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.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-01-13") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-02") public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, LectureWrite._Fields>, java.io.Serializable, Cloneable, Comparable<LectureWrite> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureWrite"); @@ -56,6 +56,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu private static final org.apache.thrift.protocol.TField LOCATION_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("locationIds", org.apache.thrift.protocol.TType.LIST, (short)17); private static final org.apache.thrift.protocol.TField LIMIT_TO_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("limitToLocations", org.apache.thrift.protocol.TType.BOOL, (short)18); private static final org.apache.thrift.protocol.TField LIMIT_TO_ALLOWED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("limitToAllowedUsers", org.apache.thrift.protocol.TType.BOOL, (short)19); + private static final org.apache.thrift.protocol.TField HAS_USB_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasUsbAccess", org.apache.thrift.protocol.TType.BOOL, (short)20); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -81,6 +82,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu public List<Integer> locationIds; // required public boolean limitToLocations; // required public boolean limitToAllowedUsers; // required + public boolean hasUsbAccess; // 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 { @@ -101,7 +103,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu REM_ALLOWED_USERS((short)16, "remAllowedUsers"), LOCATION_IDS((short)17, "locationIds"), LIMIT_TO_LOCATIONS((short)18, "limitToLocations"), - LIMIT_TO_ALLOWED_USERS((short)19, "limitToAllowedUsers"); + LIMIT_TO_ALLOWED_USERS((short)19, "limitToAllowedUsers"), + HAS_USB_ACCESS((short)20, "hasUsbAccess"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -152,6 +155,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return LIMIT_TO_LOCATIONS; case 19: // LIMIT_TO_ALLOWED_USERS return LIMIT_TO_ALLOWED_USERS; + case 20: // HAS_USB_ACCESS + return HAS_USB_ACCESS; default: return null; } @@ -200,7 +205,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu private static final int __HASINTERNETACCESS_ISSET_ID = 5; private static final int __LIMITTOLOCATIONS_ISSET_ID = 6; private static final int __LIMITTOALLOWEDUSERS_ISSET_ID = 7; - private byte __isset_bitfield = 0; + private static final int __HASUSBACCESS_ISSET_ID = 8; + private short __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.NETWORK_EXCEPTIONS,_Fields.ADD_ALLOWED_USERS,_Fields.REM_ALLOWED_USERS}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { @@ -246,6 +252,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.LIMIT_TO_ALLOWED_USERS, new org.apache.thrift.meta_data.FieldMetaData("limitToAllowedUsers", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.HAS_USB_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasUsbAccess", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LectureWrite.class, metaDataMap); } @@ -268,7 +276,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu LecturePermissions defaultPermissions, List<Integer> locationIds, boolean limitToLocations, - boolean limitToAllowedUsers) + boolean limitToAllowedUsers, + boolean hasUsbAccess) { this(); this.lectureName = lectureName; @@ -294,6 +303,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu setLimitToLocationsIsSet(true); this.limitToAllowedUsers = limitToAllowedUsers; setLimitToAllowedUsersIsSet(true); + this.hasUsbAccess = hasUsbAccess; + setHasUsbAccessIsSet(true); } /** @@ -347,6 +358,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } this.limitToLocations = other.limitToLocations; this.limitToAllowedUsers = other.limitToAllowedUsers; + this.hasUsbAccess = other.hasUsbAccess; } public LectureWrite deepCopy() { @@ -381,6 +393,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu this.limitToLocations = false; setLimitToAllowedUsersIsSet(false); this.limitToAllowedUsers = false; + setHasUsbAccessIsSet(false); + this.hasUsbAccess = false; } public String getLectureName() { @@ -882,6 +896,29 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID, value); } + public boolean isHasUsbAccess() { + return this.hasUsbAccess; + } + + public LectureWrite setHasUsbAccess(boolean hasUsbAccess) { + this.hasUsbAccess = hasUsbAccess; + setHasUsbAccessIsSet(true); + return this; + } + + public void unsetHasUsbAccess() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID); + } + + /** Returns true if field hasUsbAccess is set (has been assigned a value) and false otherwise */ + public boolean isSetHasUsbAccess() { + return EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID); + } + + public void setHasUsbAccessIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case LECTURE_NAME: @@ -1028,6 +1065,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } break; + case HAS_USB_ACCESS: + if (value == null) { + unsetHasUsbAccess(); + } else { + setHasUsbAccess((Boolean)value); + } + break; + } } @@ -1087,6 +1132,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu case LIMIT_TO_ALLOWED_USERS: return isLimitToAllowedUsers(); + case HAS_USB_ACCESS: + return isHasUsbAccess(); + } throw new IllegalStateException(); } @@ -1134,6 +1182,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return isSetLimitToLocations(); case LIMIT_TO_ALLOWED_USERS: return isSetLimitToAllowedUsers(); + case HAS_USB_ACCESS: + return isSetHasUsbAccess(); } throw new IllegalStateException(); } @@ -1313,6 +1363,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return false; } + boolean this_present_hasUsbAccess = true; + boolean that_present_hasUsbAccess = true; + if (this_present_hasUsbAccess || that_present_hasUsbAccess) { + if (!(this_present_hasUsbAccess && that_present_hasUsbAccess)) + return false; + if (this.hasUsbAccess != that.hasUsbAccess) + return false; + } + return true; } @@ -1410,6 +1469,11 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (present_limitToAllowedUsers) list.add(limitToAllowedUsers); + boolean present_hasUsbAccess = true; + list.add(present_hasUsbAccess); + if (present_hasUsbAccess) + list.add(hasUsbAccess); + return list.hashCode(); } @@ -1601,6 +1665,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return lastComparison; } } + lastComparison = Boolean.valueOf(isSetHasUsbAccess()).compareTo(other.isSetHasUsbAccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHasUsbAccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasUsbAccess, other.hasUsbAccess); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1738,6 +1812,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu sb.append("limitToAllowedUsers:"); sb.append(this.limitToAllowedUsers); first = false; + if (!first) sb.append(", "); + sb.append("hasUsbAccess:"); + sb.append(this.hasUsbAccess); + first = false; sb.append(")"); return sb.toString(); } @@ -1982,6 +2060,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 20: // HAS_USB_ACCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.hasUsbAccess = iprot.readBool(); + struct.setHasUsbAccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2112,6 +2198,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeFieldBegin(LIMIT_TO_ALLOWED_USERS_FIELD_DESC); oprot.writeBool(struct.limitToAllowedUsers); oprot.writeFieldEnd(); + oprot.writeFieldBegin(HAS_USB_ACCESS_FIELD_DESC); + oprot.writeBool(struct.hasUsbAccess); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -2184,7 +2273,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetLimitToAllowedUsers()) { optionals.set(17); } - oprot.writeBitSet(optionals, 18); + if (struct.isSetHasUsbAccess()) { + optionals.set(18); + } + oprot.writeBitSet(optionals, 19); if (struct.isSetLectureName()) { oprot.writeString(struct.lectureName); } @@ -2269,12 +2361,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetLimitToAllowedUsers()) { oprot.writeBool(struct.limitToAllowedUsers); } + if (struct.isSetHasUsbAccess()) { + oprot.writeBool(struct.hasUsbAccess); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, LectureWrite struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(18); + BitSet incoming = iprot.readBitSet(19); if (incoming.get(0)) { struct.lectureName = iprot.readString(); struct.setLectureNameIsSet(true); @@ -2394,6 +2489,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu struct.limitToAllowedUsers = iprot.readBool(); struct.setLimitToAllowedUsersIsSet(true); } + if (incoming.get(18)) { + struct.hasUsbAccess = iprot.readBool(); + struct.setHasUsbAccessIsSet(true); + } } } |