diff options
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java | 487 |
1 files changed, 331 insertions, 156 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java index 4737596..d4fd8c8 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.openslx.bwlp.thrift.iface; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-02-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2022-11-03") public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, SatelliteConfig._Fields>, java.io.Serializable, Cloneable, Comparable<SatelliteConfig> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SatelliteConfig"); @@ -48,16 +21,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, private static final org.apache.thrift.protocol.TField MAX_LOCATIONS_PER_LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("maxLocationsPerLecture", org.apache.thrift.protocol.TType.I32, (short)8); private static final org.apache.thrift.protocol.TField ALLOW_LOGIN_BY_DEFAULT_FIELD_DESC = new org.apache.thrift.protocol.TField("allowLoginByDefault", org.apache.thrift.protocol.TType.BOOL, (short)9); private static final org.apache.thrift.protocol.TField SERVER_SIDE_COPY_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSideCopy", org.apache.thrift.protocol.TType.I32, (short)10); + private static final org.apache.thrift.protocol.TField ALLOW_STUDENT_DOWNLOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("allowStudentDownload", org.apache.thrift.protocol.TType.BOOL, (short)11); + private static final org.apache.thrift.protocol.TField VM_SIZE_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("vmSizeLimit", org.apache.thrift.protocol.TType.I64, (short)12); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SatelliteConfigStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SatelliteConfigTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SatelliteConfigStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SatelliteConfigTupleSchemeFactory(); public int pageSize; // required - public ImagePermissions defaultImagePermissions; // required - public LecturePermissions defaultLecturePermissions; // required + public @org.apache.thrift.annotation.Nullable ImagePermissions defaultImagePermissions; // required + public @org.apache.thrift.annotation.Nullable LecturePermissions defaultLecturePermissions; // required public int maxImageValidityDays; // required public int maxLectureValidityDays; // required public int maxTransfers; // optional @@ -68,7 +40,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, * * @see SscMode */ - public SscMode serverSideCopy; // optional + public @org.apache.thrift.annotation.Nullable SscMode serverSideCopy; // optional + public boolean allowStudentDownload; // optional + public long vmSizeLimit; // 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 { @@ -85,12 +59,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, * * @see SscMode */ - SERVER_SIDE_COPY((short)10, "serverSideCopy"); + SERVER_SIDE_COPY((short)10, "serverSideCopy"), + ALLOW_STUDENT_DOWNLOAD((short)11, "allowStudentDownload"), + VM_SIZE_LIMIT((short)12, "vmSizeLimit"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -98,6 +74,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PAGE_SIZE @@ -120,6 +97,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return ALLOW_LOGIN_BY_DEFAULT; case 10: // SERVER_SIDE_COPY return SERVER_SIDE_COPY; + case 11: // ALLOW_STUDENT_DOWNLOAD + return ALLOW_STUDENT_DOWNLOAD; + case 12: // VM_SIZE_LIMIT + return VM_SIZE_LIMIT; default: return null; } @@ -131,30 +112,33 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -167,11 +151,13 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, private static final int __MAXCONNECTIONSPERTRANSFER_ISSET_ID = 4; private static final int __MAXLOCATIONSPERLECTURE_ISSET_ID = 5; private static final int __ALLOWLOGINBYDEFAULT_ISSET_ID = 6; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE,_Fields.ALLOW_LOGIN_BY_DEFAULT,_Fields.SERVER_SIDE_COPY}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + private static final int __ALLOWSTUDENTDOWNLOAD_ISSET_ID = 7; + private static final int __VMSIZELIMIT_ISSET_ID = 8; + private short __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE,_Fields.ALLOW_LOGIN_BY_DEFAULT,_Fields.SERVER_SIDE_COPY,_Fields.ALLOW_STUDENT_DOWNLOAD,_Fields.VM_SIZE_LIMIT}; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PAGE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("pageSize", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.DEFAULT_IMAGE_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultImagePermissions", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -192,7 +178,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.SERVER_SIDE_COPY, new org.apache.thrift.meta_data.FieldMetaData("serverSideCopy", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SscMode.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + tmpMap.put(_Fields.ALLOW_STUDENT_DOWNLOAD, new org.apache.thrift.meta_data.FieldMetaData("allowStudentDownload", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.VM_SIZE_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("vmSizeLimit", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SatelliteConfig.class, metaDataMap); } @@ -238,8 +228,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (other.isSetServerSideCopy()) { this.serverSideCopy = other.serverSideCopy; } + this.allowStudentDownload = other.allowStudentDownload; + this.vmSizeLimit = other.vmSizeLimit; } + @Override public SatelliteConfig deepCopy() { return new SatelliteConfig(this); } @@ -263,6 +256,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, setAllowLoginByDefaultIsSet(false); this.allowLoginByDefault = false; this.serverSideCopy = null; + setAllowStudentDownloadIsSet(false); + this.allowStudentDownload = false; + setVmSizeLimitIsSet(false); + this.vmSizeLimit = 0; } public int getPageSize() { @@ -276,23 +273,24 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } public void unsetPageSize() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGESIZE_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGESIZE_ISSET_ID); } /** Returns true if field pageSize is set (has been assigned a value) and false otherwise */ public boolean isSetPageSize() { - return EncodingUtils.testBit(__isset_bitfield, __PAGESIZE_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGESIZE_ISSET_ID); } public void setPageSizeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGESIZE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGESIZE_ISSET_ID, value); } + @org.apache.thrift.annotation.Nullable public ImagePermissions getDefaultImagePermissions() { return this.defaultImagePermissions; } - public SatelliteConfig setDefaultImagePermissions(ImagePermissions defaultImagePermissions) { + public SatelliteConfig setDefaultImagePermissions(@org.apache.thrift.annotation.Nullable ImagePermissions defaultImagePermissions) { this.defaultImagePermissions = defaultImagePermissions; return this; } @@ -312,11 +310,12 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } } + @org.apache.thrift.annotation.Nullable public LecturePermissions getDefaultLecturePermissions() { return this.defaultLecturePermissions; } - public SatelliteConfig setDefaultLecturePermissions(LecturePermissions defaultLecturePermissions) { + public SatelliteConfig setDefaultLecturePermissions(@org.apache.thrift.annotation.Nullable LecturePermissions defaultLecturePermissions) { this.defaultLecturePermissions = defaultLecturePermissions; return this; } @@ -347,16 +346,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } public void unsetMaxImageValidityDays() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID); } /** Returns true if field maxImageValidityDays is set (has been assigned a value) and false otherwise */ public boolean isSetMaxImageValidityDays() { - return EncodingUtils.testBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID); } public void setMaxImageValidityDaysIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID, value); } public int getMaxLectureValidityDays() { @@ -370,16 +369,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } public void unsetMaxLectureValidityDays() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID); } /** Returns true if field maxLectureValidityDays is set (has been assigned a value) and false otherwise */ public boolean isSetMaxLectureValidityDays() { - return EncodingUtils.testBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID); } public void setMaxLectureValidityDaysIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID, value); } public int getMaxTransfers() { @@ -393,16 +392,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } public void unsetMaxTransfers() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID); } /** Returns true if field maxTransfers is set (has been assigned a value) and false otherwise */ public boolean isSetMaxTransfers() { - return EncodingUtils.testBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID); } public void setMaxTransfersIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID, value); } public int getMaxConnectionsPerTransfer() { @@ -416,16 +415,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } public void unsetMaxConnectionsPerTransfer() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID); } /** Returns true if field maxConnectionsPerTransfer is set (has been assigned a value) and false otherwise */ public boolean isSetMaxConnectionsPerTransfer() { - return EncodingUtils.testBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID); } public void setMaxConnectionsPerTransferIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID, value); } public int getMaxLocationsPerLecture() { @@ -439,16 +438,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } public void unsetMaxLocationsPerLecture() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID); } /** Returns true if field maxLocationsPerLecture is set (has been assigned a value) and false otherwise */ public boolean isSetMaxLocationsPerLecture() { - return EncodingUtils.testBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID); } public void setMaxLocationsPerLectureIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID, value); } public boolean isAllowLoginByDefault() { @@ -462,22 +461,23 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } public void unsetAllowLoginByDefault() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID); } /** Returns true if field allowLoginByDefault is set (has been assigned a value) and false otherwise */ public boolean isSetAllowLoginByDefault() { - return EncodingUtils.testBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID); } public void setAllowLoginByDefaultIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID, value); } /** * * @see SscMode */ + @org.apache.thrift.annotation.Nullable public SscMode getServerSideCopy() { return this.serverSideCopy; } @@ -486,7 +486,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, * * @see SscMode */ - public SatelliteConfig setServerSideCopy(SscMode serverSideCopy) { + public SatelliteConfig setServerSideCopy(@org.apache.thrift.annotation.Nullable SscMode serverSideCopy) { this.serverSideCopy = serverSideCopy; return this; } @@ -506,13 +506,60 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } } - public void setFieldValue(_Fields field, Object value) { + public boolean isAllowStudentDownload() { + return this.allowStudentDownload; + } + + public SatelliteConfig setAllowStudentDownload(boolean allowStudentDownload) { + this.allowStudentDownload = allowStudentDownload; + setAllowStudentDownloadIsSet(true); + return this; + } + + public void unsetAllowStudentDownload() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ALLOWSTUDENTDOWNLOAD_ISSET_ID); + } + + /** Returns true if field allowStudentDownload is set (has been assigned a value) and false otherwise */ + public boolean isSetAllowStudentDownload() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ALLOWSTUDENTDOWNLOAD_ISSET_ID); + } + + public void setAllowStudentDownloadIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ALLOWSTUDENTDOWNLOAD_ISSET_ID, value); + } + + public long getVmSizeLimit() { + return this.vmSizeLimit; + } + + public SatelliteConfig setVmSizeLimit(long vmSizeLimit) { + this.vmSizeLimit = vmSizeLimit; + setVmSizeLimitIsSet(true); + return this; + } + + public void unsetVmSizeLimit() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VMSIZELIMIT_ISSET_ID); + } + + /** Returns true if field vmSizeLimit is set (has been assigned a value) and false otherwise */ + public boolean isSetVmSizeLimit() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VMSIZELIMIT_ISSET_ID); + } + + public void setVmSizeLimitIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VMSIZELIMIT_ISSET_ID, value); + } + + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PAGE_SIZE: if (value == null) { unsetPageSize(); } else { - setPageSize((Integer)value); + setPageSize((java.lang.Integer)value); } break; @@ -536,7 +583,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (value == null) { unsetMaxImageValidityDays(); } else { - setMaxImageValidityDays((Integer)value); + setMaxImageValidityDays((java.lang.Integer)value); } break; @@ -544,7 +591,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (value == null) { unsetMaxLectureValidityDays(); } else { - setMaxLectureValidityDays((Integer)value); + setMaxLectureValidityDays((java.lang.Integer)value); } break; @@ -552,7 +599,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (value == null) { unsetMaxTransfers(); } else { - setMaxTransfers((Integer)value); + setMaxTransfers((java.lang.Integer)value); } break; @@ -560,7 +607,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (value == null) { unsetMaxConnectionsPerTransfer(); } else { - setMaxConnectionsPerTransfer((Integer)value); + setMaxConnectionsPerTransfer((java.lang.Integer)value); } break; @@ -568,7 +615,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (value == null) { unsetMaxLocationsPerLecture(); } else { - setMaxLocationsPerLecture((Integer)value); + setMaxLocationsPerLecture((java.lang.Integer)value); } break; @@ -576,7 +623,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (value == null) { unsetAllowLoginByDefault(); } else { - setAllowLoginByDefault((Boolean)value); + setAllowLoginByDefault((java.lang.Boolean)value); } break; @@ -588,10 +635,28 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } break; + case ALLOW_STUDENT_DOWNLOAD: + if (value == null) { + unsetAllowStudentDownload(); + } else { + setAllowStudentDownload((java.lang.Boolean)value); + } + break; + + case VM_SIZE_LIMIT: + if (value == null) { + unsetVmSizeLimit(); + } else { + setVmSizeLimit((java.lang.Long)value); + } + break; + } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PAGE_SIZE: return getPageSize(); @@ -623,14 +688,21 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, case SERVER_SIDE_COPY: return getServerSideCopy(); + case ALLOW_STUDENT_DOWNLOAD: + return isAllowStudentDownload(); + + case VM_SIZE_LIMIT: + return getVmSizeLimit(); + } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -654,14 +726,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return isSetAllowLoginByDefault(); case SERVER_SIDE_COPY: return isSetServerSideCopy(); + case ALLOW_STUDENT_DOWNLOAD: + return isSetAllowStudentDownload(); + case VM_SIZE_LIMIT: + return isSetVmSizeLimit(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof SatelliteConfig) return this.equals((SatelliteConfig)that); return false; @@ -670,6 +744,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, public boolean equals(SatelliteConfig that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_pageSize = true; boolean that_present_pageSize = true; @@ -761,64 +837,74 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return false; } + boolean this_present_allowStudentDownload = true && this.isSetAllowStudentDownload(); + boolean that_present_allowStudentDownload = true && that.isSetAllowStudentDownload(); + if (this_present_allowStudentDownload || that_present_allowStudentDownload) { + if (!(this_present_allowStudentDownload && that_present_allowStudentDownload)) + return false; + if (this.allowStudentDownload != that.allowStudentDownload) + return false; + } + + boolean this_present_vmSizeLimit = true && this.isSetVmSizeLimit(); + boolean that_present_vmSizeLimit = true && that.isSetVmSizeLimit(); + if (this_present_vmSizeLimit || that_present_vmSizeLimit) { + if (!(this_present_vmSizeLimit && that_present_vmSizeLimit)) + return false; + if (this.vmSizeLimit != that.vmSizeLimit) + return false; + } + return true; } @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; + + hashCode = hashCode * 8191 + pageSize; + + hashCode = hashCode * 8191 + ((isSetDefaultImagePermissions()) ? 131071 : 524287); + if (isSetDefaultImagePermissions()) + hashCode = hashCode * 8191 + defaultImagePermissions.hashCode(); - boolean present_pageSize = true; - list.add(present_pageSize); - if (present_pageSize) - list.add(pageSize); + hashCode = hashCode * 8191 + ((isSetDefaultLecturePermissions()) ? 131071 : 524287); + if (isSetDefaultLecturePermissions()) + hashCode = hashCode * 8191 + defaultLecturePermissions.hashCode(); - boolean present_defaultImagePermissions = true && (isSetDefaultImagePermissions()); - list.add(present_defaultImagePermissions); - if (present_defaultImagePermissions) - list.add(defaultImagePermissions); + hashCode = hashCode * 8191 + maxImageValidityDays; - boolean present_defaultLecturePermissions = true && (isSetDefaultLecturePermissions()); - list.add(present_defaultLecturePermissions); - if (present_defaultLecturePermissions) - list.add(defaultLecturePermissions); + hashCode = hashCode * 8191 + maxLectureValidityDays; - boolean present_maxImageValidityDays = true; - list.add(present_maxImageValidityDays); - if (present_maxImageValidityDays) - list.add(maxImageValidityDays); + hashCode = hashCode * 8191 + ((isSetMaxTransfers()) ? 131071 : 524287); + if (isSetMaxTransfers()) + hashCode = hashCode * 8191 + maxTransfers; - boolean present_maxLectureValidityDays = true; - list.add(present_maxLectureValidityDays); - if (present_maxLectureValidityDays) - list.add(maxLectureValidityDays); + hashCode = hashCode * 8191 + ((isSetMaxConnectionsPerTransfer()) ? 131071 : 524287); + if (isSetMaxConnectionsPerTransfer()) + hashCode = hashCode * 8191 + maxConnectionsPerTransfer; - boolean present_maxTransfers = true && (isSetMaxTransfers()); - list.add(present_maxTransfers); - if (present_maxTransfers) - list.add(maxTransfers); + hashCode = hashCode * 8191 + ((isSetMaxLocationsPerLecture()) ? 131071 : 524287); + if (isSetMaxLocationsPerLecture()) + hashCode = hashCode * 8191 + maxLocationsPerLecture; - boolean present_maxConnectionsPerTransfer = true && (isSetMaxConnectionsPerTransfer()); - list.add(present_maxConnectionsPerTransfer); - if (present_maxConnectionsPerTransfer) - list.add(maxConnectionsPerTransfer); + hashCode = hashCode * 8191 + ((isSetAllowLoginByDefault()) ? 131071 : 524287); + if (isSetAllowLoginByDefault()) + hashCode = hashCode * 8191 + ((allowLoginByDefault) ? 131071 : 524287); - boolean present_maxLocationsPerLecture = true && (isSetMaxLocationsPerLecture()); - list.add(present_maxLocationsPerLecture); - if (present_maxLocationsPerLecture) - list.add(maxLocationsPerLecture); + hashCode = hashCode * 8191 + ((isSetServerSideCopy()) ? 131071 : 524287); + if (isSetServerSideCopy()) + hashCode = hashCode * 8191 + serverSideCopy.getValue(); - boolean present_allowLoginByDefault = true && (isSetAllowLoginByDefault()); - list.add(present_allowLoginByDefault); - if (present_allowLoginByDefault) - list.add(allowLoginByDefault); + hashCode = hashCode * 8191 + ((isSetAllowStudentDownload()) ? 131071 : 524287); + if (isSetAllowStudentDownload()) + hashCode = hashCode * 8191 + ((allowStudentDownload) ? 131071 : 524287); - boolean present_serverSideCopy = true && (isSetServerSideCopy()); - list.add(present_serverSideCopy); - if (present_serverSideCopy) - list.add(serverSideCopy.getValue()); + hashCode = hashCode * 8191 + ((isSetVmSizeLimit()) ? 131071 : 524287); + if (isSetVmSizeLimit()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(vmSizeLimit); - return list.hashCode(); + return hashCode; } @Override @@ -829,7 +915,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPageSize()).compareTo(other.isSetPageSize()); + lastComparison = java.lang.Boolean.compare(isSetPageSize(), other.isSetPageSize()); if (lastComparison != 0) { return lastComparison; } @@ -839,7 +925,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDefaultImagePermissions()).compareTo(other.isSetDefaultImagePermissions()); + lastComparison = java.lang.Boolean.compare(isSetDefaultImagePermissions(), other.isSetDefaultImagePermissions()); if (lastComparison != 0) { return lastComparison; } @@ -849,7 +935,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDefaultLecturePermissions()).compareTo(other.isSetDefaultLecturePermissions()); + lastComparison = java.lang.Boolean.compare(isSetDefaultLecturePermissions(), other.isSetDefaultLecturePermissions()); if (lastComparison != 0) { return lastComparison; } @@ -859,7 +945,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxImageValidityDays()).compareTo(other.isSetMaxImageValidityDays()); + lastComparison = java.lang.Boolean.compare(isSetMaxImageValidityDays(), other.isSetMaxImageValidityDays()); if (lastComparison != 0) { return lastComparison; } @@ -869,7 +955,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxLectureValidityDays()).compareTo(other.isSetMaxLectureValidityDays()); + lastComparison = java.lang.Boolean.compare(isSetMaxLectureValidityDays(), other.isSetMaxLectureValidityDays()); if (lastComparison != 0) { return lastComparison; } @@ -879,7 +965,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxTransfers()).compareTo(other.isSetMaxTransfers()); + lastComparison = java.lang.Boolean.compare(isSetMaxTransfers(), other.isSetMaxTransfers()); if (lastComparison != 0) { return lastComparison; } @@ -889,7 +975,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxConnectionsPerTransfer()).compareTo(other.isSetMaxConnectionsPerTransfer()); + lastComparison = java.lang.Boolean.compare(isSetMaxConnectionsPerTransfer(), other.isSetMaxConnectionsPerTransfer()); if (lastComparison != 0) { return lastComparison; } @@ -899,7 +985,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxLocationsPerLecture()).compareTo(other.isSetMaxLocationsPerLecture()); + lastComparison = java.lang.Boolean.compare(isSetMaxLocationsPerLecture(), other.isSetMaxLocationsPerLecture()); if (lastComparison != 0) { return lastComparison; } @@ -909,7 +995,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAllowLoginByDefault()).compareTo(other.isSetAllowLoginByDefault()); + lastComparison = java.lang.Boolean.compare(isSetAllowLoginByDefault(), other.isSetAllowLoginByDefault()); if (lastComparison != 0) { return lastComparison; } @@ -919,7 +1005,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } - lastComparison = Boolean.valueOf(isSetServerSideCopy()).compareTo(other.isSetServerSideCopy()); + lastComparison = java.lang.Boolean.compare(isSetServerSideCopy(), other.isSetServerSideCopy()); if (lastComparison != 0) { return lastComparison; } @@ -929,24 +1015,48 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } + lastComparison = java.lang.Boolean.compare(isSetAllowStudentDownload(), other.isSetAllowStudentDownload()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAllowStudentDownload()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allowStudentDownload, other.allowStudentDownload); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.compare(isSetVmSizeLimit(), other.isSetVmSizeLimit()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVmSizeLimit()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vmSizeLimit, other.vmSizeLimit); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("SatelliteConfig("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("SatelliteConfig("); boolean first = true; sb.append("pageSize:"); @@ -1010,6 +1120,18 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } first = false; } + if (isSetAllowStudentDownload()) { + if (!first) sb.append(", "); + sb.append("allowStudentDownload:"); + sb.append(this.allowStudentDownload); + first = false; + } + if (isSetVmSizeLimit()) { + if (!first) sb.append(", "); + sb.append("vmSizeLimit:"); + sb.append(this.vmSizeLimit); + first = false; + } sb.append(")"); return sb.toString(); } @@ -1033,7 +1155,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -1043,14 +1165,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } } - private static class SatelliteConfigStandardSchemeFactory implements SchemeFactory { + private static class SatelliteConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public SatelliteConfigStandardScheme getScheme() { return new SatelliteConfigStandardScheme(); } } - private static class SatelliteConfigStandardScheme extends StandardScheme<SatelliteConfig> { + private static class SatelliteConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<SatelliteConfig> { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, SatelliteConfig struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -1143,6 +1267,22 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 11: // ALLOW_STUDENT_DOWNLOAD + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.allowStudentDownload = iprot.readBool(); + struct.setAllowStudentDownloadIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // VM_SIZE_LIMIT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.vmSizeLimit = iprot.readI64(); + struct.setVmSizeLimitIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1154,6 +1294,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, SatelliteConfig struct) throws org.apache.thrift.TException { struct.validate(); @@ -1204,24 +1345,35 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, oprot.writeFieldEnd(); } } + if (struct.isSetAllowStudentDownload()) { + oprot.writeFieldBegin(ALLOW_STUDENT_DOWNLOAD_FIELD_DESC); + oprot.writeBool(struct.allowStudentDownload); + oprot.writeFieldEnd(); + } + if (struct.isSetVmSizeLimit()) { + oprot.writeFieldBegin(VM_SIZE_LIMIT_FIELD_DESC); + oprot.writeI64(struct.vmSizeLimit); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class SatelliteConfigTupleSchemeFactory implements SchemeFactory { + private static class SatelliteConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public SatelliteConfigTupleScheme getScheme() { return new SatelliteConfigTupleScheme(); } } - private static class SatelliteConfigTupleScheme extends TupleScheme<SatelliteConfig> { + private static class SatelliteConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<SatelliteConfig> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, SatelliteConfig struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetPageSize()) { optionals.set(0); } @@ -1252,7 +1404,13 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (struct.isSetServerSideCopy()) { optionals.set(9); } - oprot.writeBitSet(optionals, 10); + if (struct.isSetAllowStudentDownload()) { + optionals.set(10); + } + if (struct.isSetVmSizeLimit()) { + optionals.set(11); + } + oprot.writeBitSet(optionals, 12); if (struct.isSetPageSize()) { oprot.writeI32(struct.pageSize); } @@ -1283,12 +1441,18 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (struct.isSetServerSideCopy()) { oprot.writeI32(struct.serverSideCopy.getValue()); } + if (struct.isSetAllowStudentDownload()) { + oprot.writeBool(struct.allowStudentDownload); + } + if (struct.isSetVmSizeLimit()) { + oprot.writeI64(struct.vmSizeLimit); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, SatelliteConfig struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(10); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(12); if (incoming.get(0)) { struct.pageSize = iprot.readI32(); struct.setPageSizeIsSet(true); @@ -1331,8 +1495,19 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, struct.serverSideCopy = org.openslx.bwlp.thrift.iface.SscMode.findByValue(iprot.readI32()); struct.setServerSideCopyIsSet(true); } + if (incoming.get(10)) { + struct.allowStudentDownload = iprot.readBool(); + struct.setAllowStudentDownloadIsSet(true); + } + if (incoming.get(11)) { + struct.vmSizeLimit = iprot.readI64(); + struct.setVmSizeLimitIsSet(true); + } } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } |