diff options
author | Jonathan Bauer | 2017-09-06 13:47:36 +0200 |
---|---|---|
committer | Jonathan Bauer | 2017-09-06 13:47:36 +0200 |
commit | d451eba3123206a2df8fb3cdc5e6236fa1c6f707 (patch) | |
tree | ae4de5e10ac8a3401e1d925521c3fda8a4dfe555 /src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java | |
parent | Merge branch 'master' of git.openslx.org:bwlp/master-sync-shared (diff) | |
download | master-sync-shared-d451eba3123206a2df8fb3cdc5e6236fa1c6f707.tar.gz master-sync-shared-d451eba3123206a2df8fb3cdc5e6236fa1c6f707.tar.xz master-sync-shared-d451eba3123206a2df8fb3cdc5e6236fa1c6f707.zip |
update api
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 | 273 |
1 files changed, 217 insertions, 56 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 8635d41..ce42bd3 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-03-02") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-09-06") 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"); @@ -57,6 +57,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu 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 org.apache.thrift.protocol.TField NETWORK_SHARES_FIELD_DESC = new org.apache.thrift.protocol.TField("networkShares", org.apache.thrift.protocol.TType.LIST, (short)21); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -83,6 +84,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu public boolean limitToLocations; // required public boolean limitToAllowedUsers; // required public boolean hasUsbAccess; // required + public List<NetShare> networkShares; // 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 { @@ -104,7 +106,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu LOCATION_IDS((short)17, "locationIds"), LIMIT_TO_LOCATIONS((short)18, "limitToLocations"), LIMIT_TO_ALLOWED_USERS((short)19, "limitToAllowedUsers"), - HAS_USB_ACCESS((short)20, "hasUsbAccess"); + HAS_USB_ACCESS((short)20, "hasUsbAccess"), + NETWORK_SHARES((short)21, "networkShares"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -157,6 +160,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return LIMIT_TO_ALLOWED_USERS; case 20: // HAS_USB_ACCESS return HAS_USB_ACCESS; + case 21: // NETWORK_SHARES + return NETWORK_SHARES; default: return null; } @@ -207,7 +212,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu private static final int __LIMITTOALLOWEDUSERS_ISSET_ID = 7; 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}; + private static final _Fields optionals[] = {_Fields.NETWORK_EXCEPTIONS,_Fields.ADD_ALLOWED_USERS,_Fields.REM_ALLOWED_USERS,_Fields.NETWORK_SHARES}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -254,6 +259,9 @@ 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.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))); + tmpMap.put(_Fields.NETWORK_SHARES, new org.apache.thrift.meta_data.FieldMetaData("networkShares", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NetShare.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LectureWrite.class, metaDataMap); } @@ -359,6 +367,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu this.limitToLocations = other.limitToLocations; this.limitToAllowedUsers = other.limitToAllowedUsers; this.hasUsbAccess = other.hasUsbAccess; + if (other.isSetNetworkShares()) { + List<NetShare> __this__networkShares = new ArrayList<NetShare>(other.networkShares.size()); + for (NetShare other_element : other.networkShares) { + __this__networkShares.add(new NetShare(other_element)); + } + this.networkShares = __this__networkShares; + } } public LectureWrite deepCopy() { @@ -395,6 +410,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu this.limitToAllowedUsers = false; setHasUsbAccessIsSet(false); this.hasUsbAccess = false; + this.networkShares = null; } public String getLectureName() { @@ -919,6 +935,45 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value); } + public int getNetworkSharesSize() { + return (this.networkShares == null) ? 0 : this.networkShares.size(); + } + + public java.util.Iterator<NetShare> getNetworkSharesIterator() { + return (this.networkShares == null) ? null : this.networkShares.iterator(); + } + + public void addToNetworkShares(NetShare elem) { + if (this.networkShares == null) { + this.networkShares = new ArrayList<NetShare>(); + } + this.networkShares.add(elem); + } + + public List<NetShare> getNetworkShares() { + return this.networkShares; + } + + public LectureWrite setNetworkShares(List<NetShare> networkShares) { + this.networkShares = networkShares; + return this; + } + + public void unsetNetworkShares() { + this.networkShares = null; + } + + /** Returns true if field networkShares is set (has been assigned a value) and false otherwise */ + public boolean isSetNetworkShares() { + return this.networkShares != null; + } + + public void setNetworkSharesIsSet(boolean value) { + if (!value) { + this.networkShares = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case LECTURE_NAME: @@ -1073,6 +1128,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } break; + case NETWORK_SHARES: + if (value == null) { + unsetNetworkShares(); + } else { + setNetworkShares((List<NetShare>)value); + } + break; + } } @@ -1135,6 +1198,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu case HAS_USB_ACCESS: return isHasUsbAccess(); + case NETWORK_SHARES: + return getNetworkShares(); + } throw new IllegalStateException(); } @@ -1184,6 +1250,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return isSetLimitToAllowedUsers(); case HAS_USB_ACCESS: return isSetHasUsbAccess(); + case NETWORK_SHARES: + return isSetNetworkShares(); } throw new IllegalStateException(); } @@ -1372,6 +1440,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return false; } + boolean this_present_networkShares = true && this.isSetNetworkShares(); + boolean that_present_networkShares = true && that.isSetNetworkShares(); + if (this_present_networkShares || that_present_networkShares) { + if (!(this_present_networkShares && that_present_networkShares)) + return false; + if (!this.networkShares.equals(that.networkShares)) + return false; + } + return true; } @@ -1474,6 +1551,11 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (present_hasUsbAccess) list.add(hasUsbAccess); + boolean present_networkShares = true && (isSetNetworkShares()); + list.add(present_networkShares); + if (present_networkShares) + list.add(networkShares); + return list.hashCode(); } @@ -1675,6 +1757,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return lastComparison; } } + lastComparison = Boolean.valueOf(isSetNetworkShares()).compareTo(other.isSetNetworkShares()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNetworkShares()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.networkShares, other.networkShares); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1816,6 +1908,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu sb.append("hasUsbAccess:"); sb.append(this.hasUsbAccess); first = false; + if (isSetNetworkShares()) { + if (!first) sb.append(", "); + sb.append("networkShares:"); + if (this.networkShares == null) { + sb.append("null"); + } else { + sb.append(this.networkShares); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -2068,6 +2170,25 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 21: // NETWORK_SHARES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list105 = iprot.readListBegin(); + struct.networkShares = new ArrayList<NetShare>(_list105.size); + NetShare _elem106; + for (int _i107 = 0; _i107 < _list105.size; ++_i107) + { + _elem106 = new NetShare(); + _elem106.read(iprot); + struct.networkShares.add(_elem106); + } + iprot.readListEnd(); + } + struct.setNetworkSharesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2119,9 +2240,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeFieldBegin(NICS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.nics.size())); - for (String _iter105 : struct.nics) + for (String _iter108 : struct.nics) { - oprot.writeString(_iter105); + oprot.writeString(_iter108); } oprot.writeListEnd(); } @@ -2132,9 +2253,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeFieldBegin(ADD_ALLOWED_USERS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addAllowedUsers.size())); - for (String _iter106 : struct.addAllowedUsers) + for (String _iter109 : struct.addAllowedUsers) { - oprot.writeString(_iter106); + oprot.writeString(_iter109); } oprot.writeListEnd(); } @@ -2146,9 +2267,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeFieldBegin(NETWORK_EXCEPTIONS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.networkExceptions.size())); - for (NetRule _iter107 : struct.networkExceptions) + for (NetRule _iter110 : struct.networkExceptions) { - _iter107.write(oprot); + _iter110.write(oprot); } oprot.writeListEnd(); } @@ -2171,9 +2292,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeFieldBegin(REM_ALLOWED_USERS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.remAllowedUsers.size())); - for (String _iter108 : struct.remAllowedUsers) + for (String _iter111 : struct.remAllowedUsers) { - oprot.writeString(_iter108); + oprot.writeString(_iter111); } oprot.writeListEnd(); } @@ -2184,9 +2305,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeFieldBegin(LOCATION_IDS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.locationIds.size())); - for (int _iter109 : struct.locationIds) + for (int _iter112 : struct.locationIds) { - oprot.writeI32(_iter109); + oprot.writeI32(_iter112); } oprot.writeListEnd(); } @@ -2201,6 +2322,20 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeFieldBegin(HAS_USB_ACCESS_FIELD_DESC); oprot.writeBool(struct.hasUsbAccess); oprot.writeFieldEnd(); + if (struct.networkShares != null) { + if (struct.isSetNetworkShares()) { + oprot.writeFieldBegin(NETWORK_SHARES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.networkShares.size())); + for (NetShare _iter113 : struct.networkShares) + { + _iter113.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -2276,7 +2411,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetHasUsbAccess()) { optionals.set(18); } - oprot.writeBitSet(optionals, 19); + if (struct.isSetNetworkShares()) { + optionals.set(19); + } + oprot.writeBitSet(optionals, 20); if (struct.isSetLectureName()) { oprot.writeString(struct.lectureName); } @@ -2304,18 +2442,18 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetNics()) { { oprot.writeI32(struct.nics.size()); - for (String _iter110 : struct.nics) + for (String _iter114 : struct.nics) { - oprot.writeString(_iter110); + oprot.writeString(_iter114); } } } if (struct.isSetNetworkExceptions()) { { oprot.writeI32(struct.networkExceptions.size()); - for (NetRule _iter111 : struct.networkExceptions) + for (NetRule _iter115 : struct.networkExceptions) { - _iter111.write(oprot); + _iter115.write(oprot); } } } @@ -2331,27 +2469,27 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetAddAllowedUsers()) { { oprot.writeI32(struct.addAllowedUsers.size()); - for (String _iter112 : struct.addAllowedUsers) + for (String _iter116 : struct.addAllowedUsers) { - oprot.writeString(_iter112); + oprot.writeString(_iter116); } } } if (struct.isSetRemAllowedUsers()) { { oprot.writeI32(struct.remAllowedUsers.size()); - for (String _iter113 : struct.remAllowedUsers) + for (String _iter117 : struct.remAllowedUsers) { - oprot.writeString(_iter113); + oprot.writeString(_iter117); } } } if (struct.isSetLocationIds()) { { oprot.writeI32(struct.locationIds.size()); - for (int _iter114 : struct.locationIds) + for (int _iter118 : struct.locationIds) { - oprot.writeI32(_iter114); + oprot.writeI32(_iter118); } } } @@ -2364,12 +2502,21 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetHasUsbAccess()) { oprot.writeBool(struct.hasUsbAccess); } + if (struct.isSetNetworkShares()) { + { + oprot.writeI32(struct.networkShares.size()); + for (NetShare _iter119 : struct.networkShares) + { + _iter119.write(oprot); + } + } + } } @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(19); + BitSet incoming = iprot.readBitSet(20); if (incoming.get(0)) { struct.lectureName = iprot.readString(); struct.setLectureNameIsSet(true); @@ -2404,27 +2551,27 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } if (incoming.get(8)) { { - org.apache.thrift.protocol.TList _list115 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.nics = new ArrayList<String>(_list115.size); - String _elem116; - for (int _i117 = 0; _i117 < _list115.size; ++_i117) + org.apache.thrift.protocol.TList _list120 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.nics = new ArrayList<String>(_list120.size); + String _elem121; + for (int _i122 = 0; _i122 < _list120.size; ++_i122) { - _elem116 = iprot.readString(); - struct.nics.add(_elem116); + _elem121 = iprot.readString(); + struct.nics.add(_elem121); } } struct.setNicsIsSet(true); } if (incoming.get(9)) { { - org.apache.thrift.protocol.TList _list118 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.networkExceptions = new ArrayList<NetRule>(_list118.size); - NetRule _elem119; - for (int _i120 = 0; _i120 < _list118.size; ++_i120) + org.apache.thrift.protocol.TList _list123 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkExceptions = new ArrayList<NetRule>(_list123.size); + NetRule _elem124; + for (int _i125 = 0; _i125 < _list123.size; ++_i125) { - _elem119 = new NetRule(); - _elem119.read(iprot); - struct.networkExceptions.add(_elem119); + _elem124 = new NetRule(); + _elem124.read(iprot); + struct.networkExceptions.add(_elem124); } } struct.setNetworkExceptionsIsSet(true); @@ -2444,39 +2591,39 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } if (incoming.get(13)) { { - org.apache.thrift.protocol.TList _list121 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.addAllowedUsers = new ArrayList<String>(_list121.size); - String _elem122; - for (int _i123 = 0; _i123 < _list121.size; ++_i123) + org.apache.thrift.protocol.TList _list126 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.addAllowedUsers = new ArrayList<String>(_list126.size); + String _elem127; + for (int _i128 = 0; _i128 < _list126.size; ++_i128) { - _elem122 = iprot.readString(); - struct.addAllowedUsers.add(_elem122); + _elem127 = iprot.readString(); + struct.addAllowedUsers.add(_elem127); } } struct.setAddAllowedUsersIsSet(true); } if (incoming.get(14)) { { - org.apache.thrift.protocol.TList _list124 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.remAllowedUsers = new ArrayList<String>(_list124.size); - String _elem125; - for (int _i126 = 0; _i126 < _list124.size; ++_i126) + org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.remAllowedUsers = new ArrayList<String>(_list129.size); + String _elem130; + for (int _i131 = 0; _i131 < _list129.size; ++_i131) { - _elem125 = iprot.readString(); - struct.remAllowedUsers.add(_elem125); + _elem130 = iprot.readString(); + struct.remAllowedUsers.add(_elem130); } } struct.setRemAllowedUsersIsSet(true); } if (incoming.get(15)) { { - org.apache.thrift.protocol.TList _list127 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); - struct.locationIds = new ArrayList<Integer>(_list127.size); - int _elem128; - for (int _i129 = 0; _i129 < _list127.size; ++_i129) + org.apache.thrift.protocol.TList _list132 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.locationIds = new ArrayList<Integer>(_list132.size); + int _elem133; + for (int _i134 = 0; _i134 < _list132.size; ++_i134) { - _elem128 = iprot.readI32(); - struct.locationIds.add(_elem128); + _elem133 = iprot.readI32(); + struct.locationIds.add(_elem133); } } struct.setLocationIdsIsSet(true); @@ -2493,6 +2640,20 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu struct.hasUsbAccess = iprot.readBool(); struct.setHasUsbAccessIsSet(true); } + if (incoming.get(19)) { + { + org.apache.thrift.protocol.TList _list135 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkShares = new ArrayList<NetShare>(_list135.size); + NetShare _elem136; + for (int _i137 = 0; _i137 < _list135.size; ++_i137) + { + _elem136 = new NetShare(); + _elem136.read(iprot); + struct.networkShares.add(_elem136); + } + } + struct.setNetworkSharesIsSet(true); + } } } |