diff options
Diffstat (limited to 'src/main/java')
6 files changed, 3673 insertions, 529 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java index b6ea4ea..8f65fc9 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java @@ -39,17 +39,22 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)5); - private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)6); - private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)7); - private static final org.apache.thrift.protocol.TField LAST_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUsed", org.apache.thrift.protocol.TType.I64, (short)8); - private static final org.apache.thrift.protocol.TField USE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("useCount", org.apache.thrift.protocol.TType.I32, (short)9); - private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)10); - private static final org.apache.thrift.protocol.TField UPDATER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updaterId", org.apache.thrift.protocol.TType.STRING, (short)11); - private static final org.apache.thrift.protocol.TField IS_EXAM_FIELD_DESC = new org.apache.thrift.protocol.TField("isExam", org.apache.thrift.protocol.TType.BOOL, (short)12); - private static final org.apache.thrift.protocol.TField HAS_INTERNET_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasInternetAccess", org.apache.thrift.protocol.TType.BOOL, (short)13); - private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)14); - private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)15); + private static final org.apache.thrift.protocol.TField AUTO_UPDATE_FIELD_DESC = new org.apache.thrift.protocol.TField("autoUpdate", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)8); + private static final org.apache.thrift.protocol.TField LAST_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUsed", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField USE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("useCount", org.apache.thrift.protocol.TType.I32, (short)10); + private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)11); + private static final org.apache.thrift.protocol.TField UPDATER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updaterId", org.apache.thrift.protocol.TType.STRING, (short)12); + private static final org.apache.thrift.protocol.TField RUNSCRIPT_FIELD_DESC = new org.apache.thrift.protocol.TField("runscript", org.apache.thrift.protocol.TType.STRING, (short)13); + private static final org.apache.thrift.protocol.TField NICS_FIELD_DESC = new org.apache.thrift.protocol.TField("nics", org.apache.thrift.protocol.TType.LIST, (short)14); + private static final org.apache.thrift.protocol.TField ALLOWED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("allowedUsers", org.apache.thrift.protocol.TType.LIST, (short)15); + private static final org.apache.thrift.protocol.TField NETWORK_EXCEPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("networkExceptions", org.apache.thrift.protocol.TType.LIST, (short)16); + private static final org.apache.thrift.protocol.TField IS_EXAM_FIELD_DESC = new org.apache.thrift.protocol.TField("isExam", org.apache.thrift.protocol.TType.BOOL, (short)17); + private static final org.apache.thrift.protocol.TField HAS_INTERNET_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasInternetAccess", org.apache.thrift.protocol.TType.BOOL, (short)18); + private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)19); + private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)20); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -61,6 +66,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture public String lectureName; // required public String description; // required public ImageSummaryRead image; // required + public boolean autoUpdate; // required public boolean isEnabled; // required public long startTime; // required public long endTime; // required @@ -68,6 +74,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture public int useCount; // required public String ownerId; // required public String updaterId; // required + public String runscript; // required + public List<String> nics; // required + public List<String> allowedUsers; // required + public List<NetRule> networkExceptions; // required public boolean isExam; // required public boolean hasInternetAccess; // required public LecturePermissions defaultPermissions; // required @@ -79,17 +89,22 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture LECTURE_NAME((short)2, "lectureName"), DESCRIPTION((short)3, "description"), IMAGE((short)4, "image"), - IS_ENABLED((short)5, "isEnabled"), - START_TIME((short)6, "startTime"), - END_TIME((short)7, "endTime"), - LAST_USED((short)8, "lastUsed"), - USE_COUNT((short)9, "useCount"), - OWNER_ID((short)10, "ownerId"), - UPDATER_ID((short)11, "updaterId"), - IS_EXAM((short)12, "isExam"), - HAS_INTERNET_ACCESS((short)13, "hasInternetAccess"), - DEFAULT_PERMISSIONS((short)14, "defaultPermissions"), - USER_PERMISSIONS((short)15, "userPermissions"); + AUTO_UPDATE((short)5, "autoUpdate"), + IS_ENABLED((short)6, "isEnabled"), + START_TIME((short)7, "startTime"), + END_TIME((short)8, "endTime"), + LAST_USED((short)9, "lastUsed"), + USE_COUNT((short)10, "useCount"), + OWNER_ID((short)11, "ownerId"), + UPDATER_ID((short)12, "updaterId"), + RUNSCRIPT((short)13, "runscript"), + NICS((short)14, "nics"), + ALLOWED_USERS((short)15, "allowedUsers"), + NETWORK_EXCEPTIONS((short)16, "networkExceptions"), + IS_EXAM((short)17, "isExam"), + HAS_INTERNET_ACCESS((short)18, "hasInternetAccess"), + DEFAULT_PERMISSIONS((short)19, "defaultPermissions"), + USER_PERMISSIONS((short)20, "userPermissions"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -112,27 +127,37 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return DESCRIPTION; case 4: // IMAGE return IMAGE; - case 5: // IS_ENABLED + case 5: // AUTO_UPDATE + return AUTO_UPDATE; + case 6: // IS_ENABLED return IS_ENABLED; - case 6: // START_TIME + case 7: // START_TIME return START_TIME; - case 7: // END_TIME + case 8: // END_TIME return END_TIME; - case 8: // LAST_USED + case 9: // LAST_USED return LAST_USED; - case 9: // USE_COUNT + case 10: // USE_COUNT return USE_COUNT; - case 10: // OWNER_ID + case 11: // OWNER_ID return OWNER_ID; - case 11: // UPDATER_ID + case 12: // UPDATER_ID return UPDATER_ID; - case 12: // IS_EXAM + case 13: // RUNSCRIPT + return RUNSCRIPT; + case 14: // NICS + return NICS; + case 15: // ALLOWED_USERS + return ALLOWED_USERS; + case 16: // NETWORK_EXCEPTIONS + return NETWORK_EXCEPTIONS; + case 17: // IS_EXAM return IS_EXAM; - case 13: // HAS_INTERNET_ACCESS + case 18: // HAS_INTERNET_ACCESS return HAS_INTERNET_ACCESS; - case 14: // DEFAULT_PERMISSIONS + case 19: // DEFAULT_PERMISSIONS return DEFAULT_PERMISSIONS; - case 15: // USER_PERMISSIONS + case 20: // USER_PERMISSIONS return USER_PERMISSIONS; default: return null; @@ -174,13 +199,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } // isset id assignments - private static final int __ISENABLED_ISSET_ID = 0; - private static final int __STARTTIME_ISSET_ID = 1; - private static final int __ENDTIME_ISSET_ID = 2; - private static final int __LASTUSED_ISSET_ID = 3; - private static final int __USECOUNT_ISSET_ID = 4; - private static final int __ISEXAM_ISSET_ID = 5; - private static final int __HASINTERNETACCESS_ISSET_ID = 6; + private static final int __AUTOUPDATE_ISSET_ID = 0; + private static final int __ISENABLED_ISSET_ID = 1; + private static final int __STARTTIME_ISSET_ID = 2; + private static final int __ENDTIME_ISSET_ID = 3; + private static final int __LASTUSED_ISSET_ID = 4; + private static final int __USECOUNT_ISSET_ID = 5; + private static final int __ISEXAM_ISSET_ID = 6; + private static final int __HASINTERNETACCESS_ISSET_ID = 7; private byte __isset_bitfield = 0; private _Fields optionals[] = {_Fields.USER_PERMISSIONS}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; @@ -194,6 +220,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IMAGE, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageSummaryRead.class))); + tmpMap.put(_Fields.AUTO_UPDATE, new org.apache.thrift.meta_data.FieldMetaData("autoUpdate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -208,6 +236,17 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.UPDATER_ID, new org.apache.thrift.meta_data.FieldMetaData("updaterId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.RUNSCRIPT, new org.apache.thrift.meta_data.FieldMetaData("runscript", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NICS, new org.apache.thrift.meta_data.FieldMetaData("nics", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.ALLOWED_USERS, new org.apache.thrift.meta_data.FieldMetaData("allowedUsers", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.NETWORK_EXCEPTIONS, new org.apache.thrift.meta_data.FieldMetaData("networkExceptions", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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, NetRule.class)))); tmpMap.put(_Fields.IS_EXAM, new org.apache.thrift.meta_data.FieldMetaData("isExam", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.HAS_INTERNET_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasInternetAccess", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -228,6 +267,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture String lectureName, String description, ImageSummaryRead image, + boolean autoUpdate, boolean isEnabled, long startTime, long endTime, @@ -235,6 +275,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture int useCount, String ownerId, String updaterId, + String runscript, + List<String> nics, + List<String> allowedUsers, + List<NetRule> networkExceptions, boolean isExam, boolean hasInternetAccess, LecturePermissions defaultPermissions) @@ -244,6 +288,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture this.lectureName = lectureName; this.description = description; this.image = image; + this.autoUpdate = autoUpdate; + setAutoUpdateIsSet(true); this.isEnabled = isEnabled; setIsEnabledIsSet(true); this.startTime = startTime; @@ -256,6 +302,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture setUseCountIsSet(true); this.ownerId = ownerId; this.updaterId = updaterId; + this.runscript = runscript; + this.nics = nics; + this.allowedUsers = allowedUsers; + this.networkExceptions = networkExceptions; this.isExam = isExam; setIsExamIsSet(true); this.hasInternetAccess = hasInternetAccess; @@ -280,6 +330,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture if (other.isSetImage()) { this.image = new ImageSummaryRead(other.image); } + this.autoUpdate = other.autoUpdate; this.isEnabled = other.isEnabled; this.startTime = other.startTime; this.endTime = other.endTime; @@ -291,6 +342,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture if (other.isSetUpdaterId()) { this.updaterId = other.updaterId; } + if (other.isSetRunscript()) { + this.runscript = other.runscript; + } + if (other.isSetNics()) { + List<String> __this__nics = new ArrayList<String>(other.nics); + this.nics = __this__nics; + } + if (other.isSetAllowedUsers()) { + List<String> __this__allowedUsers = new ArrayList<String>(other.allowedUsers); + this.allowedUsers = __this__allowedUsers; + } + if (other.isSetNetworkExceptions()) { + List<NetRule> __this__networkExceptions = new ArrayList<NetRule>(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()) { @@ -311,6 +380,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture this.lectureName = null; this.description = null; this.image = null; + setAutoUpdateIsSet(false); + this.autoUpdate = false; setIsEnabledIsSet(false); this.isEnabled = false; setStartTimeIsSet(false); @@ -323,6 +394,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture this.useCount = 0; this.ownerId = null; this.updaterId = null; + this.runscript = null; + this.nics = null; + this.allowedUsers = null; + this.networkExceptions = null; setIsExamIsSet(false); this.isExam = false; setHasInternetAccessIsSet(false); @@ -427,6 +502,29 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } } + public boolean isAutoUpdate() { + return this.autoUpdate; + } + + public LectureRead setAutoUpdate(boolean autoUpdate) { + this.autoUpdate = autoUpdate; + setAutoUpdateIsSet(true); + return this; + } + + public void unsetAutoUpdate() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID); + } + + /** Returns true if field autoUpdate is set (has been assigned a value) and false otherwise */ + public boolean isSetAutoUpdate() { + return EncodingUtils.testBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID); + } + + public void setAutoUpdateIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID, value); + } + public boolean isIsEnabled() { return this.isEnabled; } @@ -590,6 +688,147 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } } + public String getRunscript() { + return this.runscript; + } + + public LectureRead setRunscript(String runscript) { + this.runscript = runscript; + return this; + } + + public void unsetRunscript() { + this.runscript = null; + } + + /** Returns true if field runscript is set (has been assigned a value) and false otherwise */ + public boolean isSetRunscript() { + return this.runscript != null; + } + + public void setRunscriptIsSet(boolean value) { + if (!value) { + this.runscript = null; + } + } + + public int getNicsSize() { + return (this.nics == null) ? 0 : this.nics.size(); + } + + public java.util.Iterator<String> getNicsIterator() { + return (this.nics == null) ? null : this.nics.iterator(); + } + + public void addToNics(String elem) { + if (this.nics == null) { + this.nics = new ArrayList<String>(); + } + this.nics.add(elem); + } + + public List<String> getNics() { + return this.nics; + } + + public LectureRead setNics(List<String> 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<String> getAllowedUsersIterator() { + return (this.allowedUsers == null) ? null : this.allowedUsers.iterator(); + } + + public void addToAllowedUsers(String elem) { + if (this.allowedUsers == null) { + this.allowedUsers = new ArrayList<String>(); + } + this.allowedUsers.add(elem); + } + + public List<String> getAllowedUsers() { + return this.allowedUsers; + } + + public LectureRead setAllowedUsers(List<String> 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<NetRule> getNetworkExceptionsIterator() { + return (this.networkExceptions == null) ? null : this.networkExceptions.iterator(); + } + + public void addToNetworkExceptions(NetRule elem) { + if (this.networkExceptions == null) { + this.networkExceptions = new ArrayList<NetRule>(); + } + this.networkExceptions.add(elem); + } + + public List<NetRule> getNetworkExceptions() { + return this.networkExceptions; + } + + public LectureRead setNetworkExceptions(List<NetRule> 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; } @@ -718,6 +957,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } break; + case AUTO_UPDATE: + if (value == null) { + unsetAutoUpdate(); + } else { + setAutoUpdate((Boolean)value); + } + break; + case IS_ENABLED: if (value == null) { unsetIsEnabled(); @@ -774,6 +1021,38 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } break; + case RUNSCRIPT: + if (value == null) { + unsetRunscript(); + } else { + setRunscript((String)value); + } + break; + + case NICS: + if (value == null) { + unsetNics(); + } else { + setNics((List<String>)value); + } + break; + + case ALLOWED_USERS: + if (value == null) { + unsetAllowedUsers(); + } else { + setAllowedUsers((List<String>)value); + } + break; + + case NETWORK_EXCEPTIONS: + if (value == null) { + unsetNetworkExceptions(); + } else { + setNetworkExceptions((List<NetRule>)value); + } + break; + case IS_EXAM: if (value == null) { unsetIsExam(); @@ -823,6 +1102,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture case IMAGE: return getImage(); + case AUTO_UPDATE: + return Boolean.valueOf(isAutoUpdate()); + case IS_ENABLED: return Boolean.valueOf(isIsEnabled()); @@ -844,6 +1126,18 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture case UPDATER_ID: return getUpdaterId(); + case RUNSCRIPT: + return getRunscript(); + + case NICS: + return getNics(); + + case ALLOWED_USERS: + return getAllowedUsers(); + + case NETWORK_EXCEPTIONS: + return getNetworkExceptions(); + case IS_EXAM: return Boolean.valueOf(isIsExam()); @@ -875,6 +1169,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return isSetDescription(); case IMAGE: return isSetImage(); + case AUTO_UPDATE: + return isSetAutoUpdate(); case IS_ENABLED: return isSetIsEnabled(); case START_TIME: @@ -889,6 +1185,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return isSetOwnerId(); case UPDATER_ID: return isSetUpdaterId(); + case RUNSCRIPT: + return isSetRunscript(); + case NICS: + return isSetNics(); + case ALLOWED_USERS: + return isSetAllowedUsers(); + case NETWORK_EXCEPTIONS: + return isSetNetworkExceptions(); case IS_EXAM: return isSetIsExam(); case HAS_INTERNET_ACCESS: @@ -950,6 +1254,15 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return false; } + boolean this_present_autoUpdate = true; + boolean that_present_autoUpdate = true; + if (this_present_autoUpdate || that_present_autoUpdate) { + if (!(this_present_autoUpdate && that_present_autoUpdate)) + return false; + if (this.autoUpdate != that.autoUpdate) + return false; + } + boolean this_present_isEnabled = true; boolean that_present_isEnabled = true; if (this_present_isEnabled || that_present_isEnabled) { @@ -1013,6 +1326,42 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return false; } + boolean this_present_runscript = true && this.isSetRunscript(); + boolean that_present_runscript = true && that.isSetRunscript(); + if (this_present_runscript || that_present_runscript) { + if (!(this_present_runscript && that_present_runscript)) + return false; + if (!this.runscript.equals(that.runscript)) + return false; + } + + boolean this_present_nics = true && this.isSetNics(); + boolean that_present_nics = true && that.isSetNics(); + if (this_present_nics || that_present_nics) { + if (!(this_present_nics && that_present_nics)) + return false; + if (!this.nics.equals(that.nics)) + return false; + } + + boolean this_present_allowedUsers = true && this.isSetAllowedUsers(); + boolean that_present_allowedUsers = true && that.isSetAllowedUsers(); + if (this_present_allowedUsers || that_present_allowedUsers) { + if (!(this_present_allowedUsers && that_present_allowedUsers)) + return false; + if (!this.allowedUsers.equals(that.allowedUsers)) + return false; + } + + boolean this_present_networkExceptions = true && this.isSetNetworkExceptions(); + boolean that_present_networkExceptions = true && that.isSetNetworkExceptions(); + if (this_present_networkExceptions || that_present_networkExceptions) { + if (!(this_present_networkExceptions && that_present_networkExceptions)) + return false; + if (!this.networkExceptions.equals(that.networkExceptions)) + return false; + } + boolean this_present_isExam = true; boolean that_present_isExam = true; if (this_present_isExam || that_present_isExam) { @@ -1105,6 +1454,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return lastComparison; } } + lastComparison = Boolean.valueOf(isSetAutoUpdate()).compareTo(other.isSetAutoUpdate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAutoUpdate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.autoUpdate, other.autoUpdate); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled()); if (lastComparison != 0) { return lastComparison; @@ -1175,6 +1534,46 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture return lastComparison; } } + lastComparison = Boolean.valueOf(isSetRunscript()).compareTo(other.isSetRunscript()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRunscript()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runscript, other.runscript); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNics()).compareTo(other.isSetNics()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNics()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nics, other.nics); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAllowedUsers()).compareTo(other.isSetAllowedUsers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAllowedUsers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allowedUsers, other.allowedUsers); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNetworkExceptions()).compareTo(other.isSetNetworkExceptions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNetworkExceptions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.networkExceptions, other.networkExceptions); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetIsExam()).compareTo(other.isSetIsExam()); if (lastComparison != 0) { return lastComparison; @@ -1267,6 +1666,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } first = false; if (!first) sb.append(", "); + sb.append("autoUpdate:"); + sb.append(this.autoUpdate); + first = false; + if (!first) sb.append(", "); sb.append("isEnabled:"); sb.append(this.isEnabled); first = false; @@ -1303,6 +1706,38 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture } first = false; if (!first) sb.append(", "); + sb.append("runscript:"); + if (this.runscript == null) { + sb.append("null"); + } else { + sb.append(this.runscript); + } + first = false; + if (!first) sb.append(", "); + sb.append("nics:"); + if (this.nics == null) { + sb.append("null"); + } else { + sb.append(this.nics); + } + first = false; + if (!first) sb.append(", "); + sb.append("allowedUsers:"); + if (this.allowedUsers == null) { + sb.append("null"); + } else { + sb.append(this.allowedUsers); + } + first = false; + if (!first) sb.append(", "); + sb.append("networkExceptions:"); + if (this.networkExceptions == null) { + sb.append("null"); + } else { + sb.append(this.networkExceptions); + } + first = false; + if (!first) sb.append(", "); sb.append("isExam:"); sb.append(this.isExam); first = false; @@ -1415,7 +1850,15 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // IS_ENABLED + case 5: // AUTO_UPDATE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.autoUpdate = iprot.readBool(); + struct.setAutoUpdateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // IS_ENABLED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isEnabled = iprot.readBool(); struct.setIsEnabledIsSet(true); @@ -1423,7 +1866,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // START_TIME + case 7: // START_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.startTime = iprot.readI64(); struct.setStartTimeIsSet(true); @@ -1431,7 +1874,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 7: // END_TIME + case 8: // END_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.endTime = iprot.readI64(); struct.setEndTimeIsSet(true); @@ -1439,7 +1882,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 8: // LAST_USED + case 9: // LAST_USED if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.lastUsed = iprot.readI64(); struct.setLastUsedIsSet(true); @@ -1447,7 +1890,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 9: // USE_COUNT + case 10: // USE_COUNT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.useCount = iprot.readI32(); struct.setUseCountIsSet(true); @@ -1455,7 +1898,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 10: // OWNER_ID + case 11: // OWNER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.ownerId = iprot.readString(); struct.setOwnerIdIsSet(true); @@ -1463,7 +1906,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 11: // UPDATER_ID + case 12: // UPDATER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.updaterId = iprot.readString(); struct.setUpdaterIdIsSet(true); @@ -1471,7 +1914,70 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 12: // IS_EXAM + case 13: // RUNSCRIPT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.runscript = iprot.readString(); + struct.setRunscriptIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // NICS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list82 = iprot.readListBegin(); + struct.nics = new ArrayList<String>(_list82.size); + for (int _i83 = 0; _i83 < _list82.size; ++_i83) + { + String _elem84; + _elem84 = iprot.readString(); + struct.nics.add(_elem84); + } + iprot.readListEnd(); + } + struct.setNicsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // ALLOWED_USERS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list85 = iprot.readListBegin(); + struct.allowedUsers = new ArrayList<String>(_list85.size); + for (int _i86 = 0; _i86 < _list85.size; ++_i86) + { + String _elem87; + _elem87 = iprot.readString(); + struct.allowedUsers.add(_elem87); + } + iprot.readListEnd(); + } + struct.setAllowedUsersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // NETWORK_EXCEPTIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list88 = iprot.readListBegin(); + struct.networkExceptions = new ArrayList<NetRule>(_list88.size); + for (int _i89 = 0; _i89 < _list88.size; ++_i89) + { + NetRule _elem90; + _elem90 = new NetRule(); + _elem90.read(iprot); + struct.networkExceptions.add(_elem90); + } + iprot.readListEnd(); + } + struct.setNetworkExceptionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 17: // IS_EXAM if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isExam = iprot.readBool(); struct.setIsExamIsSet(true); @@ -1479,7 +1985,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 13: // HAS_INTERNET_ACCESS + case 18: // HAS_INTERNET_ACCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.hasInternetAccess = iprot.readBool(); struct.setHasInternetAccessIsSet(true); @@ -1487,7 +1993,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 14: // DEFAULT_PERMISSIONS + case 19: // DEFAULT_PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.defaultPermissions = new LecturePermissions(); struct.defaultPermissions.read(iprot); @@ -1496,7 +2002,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 15: // USER_PERMISSIONS + case 20: // USER_PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.userPermissions = new LecturePermissions(); struct.userPermissions.read(iprot); @@ -1540,6 +2046,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture struct.image.write(oprot); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(AUTO_UPDATE_FIELD_DESC); + oprot.writeBool(struct.autoUpdate); + oprot.writeFieldEnd(); oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC); oprot.writeBool(struct.isEnabled); oprot.writeFieldEnd(); @@ -1565,6 +2074,47 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture oprot.writeString(struct.updaterId); oprot.writeFieldEnd(); } + if (struct.runscript != null) { + oprot.writeFieldBegin(RUNSCRIPT_FIELD_DESC); + oprot.writeString(struct.runscript); + oprot.writeFieldEnd(); + } + if (struct.nics != null) { + oprot.writeFieldBegin(NICS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.nics.size())); + for (String _iter91 : struct.nics) + { + oprot.writeString(_iter91); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.allowedUsers != null) { + oprot.writeFieldBegin(ALLOWED_USERS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.allowedUsers.size())); + for (String _iter92 : struct.allowedUsers) + { + oprot.writeString(_iter92); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.networkExceptions != null) { + 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 _iter93 : struct.networkExceptions) + { + _iter93.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } oprot.writeFieldBegin(IS_EXAM_FIELD_DESC); oprot.writeBool(struct.isExam); oprot.writeFieldEnd(); @@ -1613,40 +2163,55 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture if (struct.isSetImage()) { optionals.set(3); } - if (struct.isSetIsEnabled()) { + if (struct.isSetAutoUpdate()) { optionals.set(4); } - if (struct.isSetStartTime()) { + if (struct.isSetIsEnabled()) { optionals.set(5); } - if (struct.isSetEndTime()) { + if (struct.isSetStartTime()) { optionals.set(6); } - if (struct.isSetLastUsed()) { + if (struct.isSetEndTime()) { optionals.set(7); } - if (struct.isSetUseCount()) { + if (struct.isSetLastUsed()) { optionals.set(8); } - if (struct.isSetOwnerId()) { + if (struct.isSetUseCount()) { optionals.set(9); } - if (struct.isSetUpdaterId()) { + if (struct.isSetOwnerId()) { optionals.set(10); } - if (struct.isSetIsExam()) { + if (struct.isSetUpdaterId()) { optionals.set(11); } - if (struct.isSetHasInternetAccess()) { + if (struct.isSetRunscript()) { optionals.set(12); } - if (struct.isSetDefaultPermissions()) { + if (struct.isSetNics()) { optionals.set(13); } - if (struct.isSetUserPermissions()) { + if (struct.isSetAllowedUsers()) { optionals.set(14); } - oprot.writeBitSet(optionals, 15); + if (struct.isSetNetworkExceptions()) { + optionals.set(15); + } + if (struct.isSetIsExam()) { + optionals.set(16); + } + if (struct.isSetHasInternetAccess()) { + optionals.set(17); + } + if (struct.isSetDefaultPermissions()) { + optionals.set(18); + } + if (struct.isSetUserPermissions()) { + optionals.set(19); + } + oprot.writeBitSet(optionals, 20); if (struct.isSetLectureId()) { oprot.writeString(struct.lectureId); } @@ -1659,6 +2224,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture if (struct.isSetImage()) { struct.image.write(oprot); } + if (struct.isSetAutoUpdate()) { + oprot.writeBool(struct.autoUpdate); + } if (struct.isSetIsEnabled()) { oprot.writeBool(struct.isEnabled); } @@ -1680,6 +2248,36 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture if (struct.isSetUpdaterId()) { oprot.writeString(struct.updaterId); } + if (struct.isSetRunscript()) { + oprot.writeString(struct.runscript); + } + if (struct.isSetNics()) { + { + oprot.writeI32(struct.nics.size()); + for (String _iter94 : struct.nics) + { + oprot.writeString(_iter94); + } + } + } + if (struct.isSetAllowedUsers()) { + { + oprot.writeI32(struct.allowedUsers.size()); + for (String _iter95 : struct.allowedUsers) + { + oprot.writeString(_iter95); + } + } + } + if (struct.isSetNetworkExceptions()) { + { + oprot.writeI32(struct.networkExceptions.size()); + for (NetRule _iter96 : struct.networkExceptions) + { + _iter96.write(oprot); + } + } + } if (struct.isSetIsExam()) { oprot.writeBool(struct.isExam); } @@ -1697,7 +2295,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture @Override public void read(org.apache.thrift.protocol.TProtocol prot, LectureRead struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(15); + BitSet incoming = iprot.readBitSet(20); if (incoming.get(0)) { struct.lectureId = iprot.readString(); struct.setLectureIdIsSet(true); @@ -1716,47 +2314,95 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture struct.setImageIsSet(true); } if (incoming.get(4)) { + struct.autoUpdate = iprot.readBool(); + struct.setAutoUpdateIsSet(true); + } + if (incoming.get(5)) { struct.isEnabled = iprot.readBool(); struct.setIsEnabledIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(6)) { struct.startTime = iprot.readI64(); struct.setStartTimeIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(7)) { struct.endTime = iprot.readI64(); struct.setEndTimeIsSet(true); } - if (incoming.get(7)) { + if (incoming.get(8)) { struct.lastUsed = iprot.readI64(); struct.setLastUsedIsSet(true); } - if (incoming.get(8)) { + if (incoming.get(9)) { struct.useCount = iprot.readI32(); struct.setUseCountIsSet(true); } - if (incoming.get(9)) { + if (incoming.get(10)) { struct.ownerId = iprot.readString(); struct.setOwnerIdIsSet(true); } - if (incoming.get(10)) { + if (incoming.get(11)) { struct.updaterId = iprot.readString(); struct.setUpdaterIdIsSet(true); } - if (incoming.get(11)) { + if (incoming.get(12)) { + struct.runscript = iprot.readString(); + struct.setRunscriptIsSet(true); + } + if (incoming.get(13)) { + { + org.apache.thrift.protocol.TList _list97 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.nics = new ArrayList<String>(_list97.size); + for (int _i98 = 0; _i98 < _list97.size; ++_i98) + { + String _elem99; + _elem99 = iprot.readString(); + struct.nics.add(_elem99); + } + } + struct.setNicsIsSet(true); + } + if (incoming.get(14)) { + { + org.apache.thrift.protocol.TList _list100 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.allowedUsers = new ArrayList<String>(_list100.size); + for (int _i101 = 0; _i101 < _list100.size; ++_i101) + { + String _elem102; + _elem102 = iprot.readString(); + struct.allowedUsers.add(_elem102); + } + } + struct.setAllowedUsersIsSet(true); + } + if (incoming.get(15)) { + { + org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkExceptions = new ArrayList<NetRule>(_list103.size); + for (int _i104 = 0; _i104 < _list103.size; ++_i104) + { + NetRule _elem105; + _elem105 = new NetRule(); + _elem105.read(iprot); + struct.networkExceptions.add(_elem105); + } + } + struct.setNetworkExceptionsIsSet(true); + } + if (incoming.get(16)) { struct.isExam = iprot.readBool(); struct.setIsExamIsSet(true); } - if (incoming.get(12)) { + if (incoming.get(17)) { struct.hasInternetAccess = iprot.readBool(); struct.setHasInternetAccessIsSet(true); } - if (incoming.get(13)) { + if (incoming.get(18)) { struct.defaultPermissions = new LecturePermissions(); struct.defaultPermissions.read(iprot); struct.setDefaultPermissionsIsSet(true); } - if (incoming.get(14)) { + if (incoming.get(19)) { struct.userPermissions = new LecturePermissions(); struct.userPermissions.read(iprot); struct.setUserPermissionsIsSet(true); 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<LectureWrite, Lectu private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)4); - private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)5); - private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)6); - private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField IS_EXAM_FIELD_DESC = new org.apache.thrift.protocol.TField("isExam", org.apache.thrift.protocol.TType.BOOL, (short)8); - private static final org.apache.thrift.protocol.TField HAS_INTERNET_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasInternetAccess", org.apache.thrift.protocol.TType.BOOL, (short)9); - private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)10); + private static final org.apache.thrift.protocol.TField AUTO_UPDATE_FIELD_DESC = new org.apache.thrift.protocol.TField("autoUpdate", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)5); + private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)7); + private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)8); + private static final org.apache.thrift.protocol.TField RUNSCRIPT_FIELD_DESC = new org.apache.thrift.protocol.TField("runscript", org.apache.thrift.protocol.TType.STRING, (short)9); + private static final org.apache.thrift.protocol.TField NICS_FIELD_DESC = new org.apache.thrift.protocol.TField("nics", org.apache.thrift.protocol.TType.LIST, (short)10); + private static final org.apache.thrift.protocol.TField ALLOWED_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("allowedUsers", org.apache.thrift.protocol.TType.LIST, (short)11); + private static final org.apache.thrift.protocol.TField NETWORK_EXCEPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("networkExceptions", org.apache.thrift.protocol.TType.LIST, (short)12); + private static final org.apache.thrift.protocol.TField IS_EXAM_FIELD_DESC = new org.apache.thrift.protocol.TField("isExam", org.apache.thrift.protocol.TType.BOOL, (short)13); + private static final org.apache.thrift.protocol.TField HAS_INTERNET_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasInternetAccess", org.apache.thrift.protocol.TType.BOOL, (short)14); + private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)15); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -55,10 +60,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu public String lectureName; // required public String description; // required public String imageVersionId; // required + public boolean autoUpdate; // required public boolean isEnabled; // required public long startTime; // required public long endTime; // required public String ownerId; // required + public String runscript; // required + public List<String> nics; // required + public List<String> allowedUsers; // required + public List<NetRule> 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<LectureWrite, Lectu LECTURE_NAME((short)1, "lectureName"), DESCRIPTION((short)2, "description"), IMAGE_VERSION_ID((short)3, "imageVersionId"), - IS_ENABLED((short)4, "isEnabled"), - START_TIME((short)5, "startTime"), - END_TIME((short)6, "endTime"), - OWNER_ID((short)7, "ownerId"), - IS_EXAM((short)8, "isExam"), - HAS_INTERNET_ACCESS((short)9, "hasInternetAccess"), - DEFAULT_PERMISSIONS((short)10, "defaultPermissions"); + AUTO_UPDATE((short)4, "autoUpdate"), + IS_ENABLED((short)5, "isEnabled"), + START_TIME((short)6, "startTime"), + END_TIME((short)7, "endTime"), + OWNER_ID((short)8, "ownerId"), + RUNSCRIPT((short)9, "runscript"), + NICS((short)10, "nics"), + ALLOWED_USERS((short)11, "allowedUsers"), + NETWORK_EXCEPTIONS((short)12, "networkExceptions"), + IS_EXAM((short)13, "isExam"), + HAS_INTERNET_ACCESS((short)14, "hasInternetAccess"), + DEFAULT_PERMISSIONS((short)15, "defaultPermissions"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -95,19 +110,29 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return DESCRIPTION; case 3: // IMAGE_VERSION_ID return IMAGE_VERSION_ID; - case 4: // IS_ENABLED + case 4: // AUTO_UPDATE + return AUTO_UPDATE; + case 5: // IS_ENABLED return IS_ENABLED; - case 5: // START_TIME + case 6: // START_TIME return START_TIME; - case 6: // END_TIME + case 7: // END_TIME return END_TIME; - case 7: // OWNER_ID + case 8: // OWNER_ID return OWNER_ID; - case 8: // IS_EXAM + case 9: // RUNSCRIPT + return RUNSCRIPT; + case 10: // NICS + return NICS; + case 11: // ALLOWED_USERS + return ALLOWED_USERS; + case 12: // NETWORK_EXCEPTIONS + return NETWORK_EXCEPTIONS; + case 13: // IS_EXAM return IS_EXAM; - case 9: // HAS_INTERNET_ACCESS + case 14: // HAS_INTERNET_ACCESS return HAS_INTERNET_ACCESS; - case 10: // DEFAULT_PERMISSIONS + case 15: // DEFAULT_PERMISSIONS return DEFAULT_PERMISSIONS; default: return null; @@ -149,11 +174,12 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } // isset id assignments - private static final int __ISENABLED_ISSET_ID = 0; - private static final int __STARTTIME_ISSET_ID = 1; - private static final int __ENDTIME_ISSET_ID = 2; - private static final int __ISEXAM_ISSET_ID = 3; - private static final int __HASINTERNETACCESS_ISSET_ID = 4; + private static final int __AUTOUPDATE_ISSET_ID = 0; + private static final int __ISENABLED_ISSET_ID = 1; + private static final int __STARTTIME_ISSET_ID = 2; + private static final int __ENDTIME_ISSET_ID = 3; + private static final int __ISEXAM_ISSET_ID = 4; + private static final int __HASINTERNETACCESS_ISSET_ID = 5; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { @@ -164,6 +190,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.AUTO_UPDATE, new org.apache.thrift.meta_data.FieldMetaData("autoUpdate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.IS_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("isEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -172,6 +200,17 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.RUNSCRIPT, new org.apache.thrift.meta_data.FieldMetaData("runscript", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.NICS, new org.apache.thrift.meta_data.FieldMetaData("nics", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.ALLOWED_USERS, new org.apache.thrift.meta_data.FieldMetaData("allowedUsers", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.NETWORK_EXCEPTIONS, new org.apache.thrift.meta_data.FieldMetaData("networkExceptions", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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, NetRule.class)))); tmpMap.put(_Fields.IS_EXAM, new org.apache.thrift.meta_data.FieldMetaData("isExam", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.HAS_INTERNET_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasInternetAccess", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -189,10 +228,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu String lectureName, String description, String imageVersionId, + boolean autoUpdate, boolean isEnabled, long startTime, long endTime, String ownerId, + String runscript, + List<String> nics, + List<String> allowedUsers, + List<NetRule> networkExceptions, boolean isExam, boolean hasInternetAccess, LecturePermissions defaultPermissions) @@ -201,6 +245,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu this.lectureName = lectureName; this.description = description; this.imageVersionId = imageVersionId; + this.autoUpdate = autoUpdate; + setAutoUpdateIsSet(true); this.isEnabled = isEnabled; setIsEnabledIsSet(true); this.startTime = startTime; @@ -208,6 +254,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu this.endTime = endTime; setEndTimeIsSet(true); this.ownerId = ownerId; + this.runscript = runscript; + this.nics = nics; + this.allowedUsers = allowedUsers; + this.networkExceptions = networkExceptions; this.isExam = isExam; setIsExamIsSet(true); this.hasInternetAccess = hasInternetAccess; @@ -229,12 +279,31 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (other.isSetImageVersionId()) { this.imageVersionId = other.imageVersionId; } + this.autoUpdate = other.autoUpdate; this.isEnabled = other.isEnabled; this.startTime = other.startTime; this.endTime = other.endTime; if (other.isSetOwnerId()) { this.ownerId = other.ownerId; } + if (other.isSetRunscript()) { + this.runscript = other.runscript; + } + if (other.isSetNics()) { + List<String> __this__nics = new ArrayList<String>(other.nics); + this.nics = __this__nics; + } + if (other.isSetAllowedUsers()) { + List<String> __this__allowedUsers = new ArrayList<String>(other.allowedUsers); + this.allowedUsers = __this__allowedUsers; + } + if (other.isSetNetworkExceptions()) { + List<NetRule> __this__networkExceptions = new ArrayList<NetRule>(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<LectureWrite, Lectu this.lectureName = null; this.description = null; this.imageVersionId = null; + setAutoUpdateIsSet(false); + this.autoUpdate = false; setIsEnabledIsSet(false); this.isEnabled = false; setStartTimeIsSet(false); @@ -258,6 +329,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu setEndTimeIsSet(false); this.endTime = 0; this.ownerId = null; + this.runscript = null; + this.nics = null; + this.allowedUsers = null; + this.networkExceptions = null; setIsExamIsSet(false); this.isExam = false; setHasInternetAccessIsSet(false); @@ -337,6 +412,29 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } } + public boolean isAutoUpdate() { + return this.autoUpdate; + } + + public LectureWrite setAutoUpdate(boolean autoUpdate) { + this.autoUpdate = autoUpdate; + setAutoUpdateIsSet(true); + return this; + } + + public void unsetAutoUpdate() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID); + } + + /** Returns true if field autoUpdate is set (has been assigned a value) and false otherwise */ + public boolean isSetAutoUpdate() { + return EncodingUtils.testBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID); + } + + public void setAutoUpdateIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID, value); + } + public boolean isIsEnabled() { return this.isEnabled; } @@ -430,6 +528,147 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } } + public String getRunscript() { + return this.runscript; + } + + public LectureWrite setRunscript(String runscript) { + this.runscript = runscript; + return this; + } + + public void unsetRunscript() { + this.runscript = null; + } + + /** Returns true if field runscript is set (has been assigned a value) and false otherwise */ + public boolean isSetRunscript() { + return this.runscript != null; + } + + public void setRunscriptIsSet(boolean value) { + if (!value) { + this.runscript = null; + } + } + + public int getNicsSize() { + return (this.nics == null) ? 0 : this.nics.size(); + } + + public java.util.Iterator<String> getNicsIterator() { + return (this.nics == null) ? null : this.nics.iterator(); + } + + public void addToNics(String elem) { + if (this.nics == null) { + this.nics = new ArrayList<String>(); + } + this.nics.add(elem); + } + + public List<String> getNics() { + return this.nics; + } + + public LectureWrite setNics(List<String> 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<String> getAllowedUsersIterator() { + return (this.allowedUsers == null) ? null : this.allowedUsers.iterator(); + } + + public void addToAllowedUsers(String elem) { + if (this.allowedUsers == null) { + this.allowedUsers = new ArrayList<String>(); + } + this.allowedUsers.add(elem); + } + + public List<String> getAllowedUsers() { + return this.allowedUsers; + } + + public LectureWrite setAllowedUsers(List<String> 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<NetRule> getNetworkExceptionsIterator() { + return (this.networkExceptions == null) ? null : this.networkExceptions.iterator(); + } + + public void addToNetworkExceptions(NetRule elem) { + if (this.networkExceptions == null) { + this.networkExceptions = new ArrayList<NetRule>(); + } + this.networkExceptions.add(elem); + } + + public List<NetRule> getNetworkExceptions() { + return this.networkExceptions; + } + + public LectureWrite setNetworkExceptions(List<NetRule> 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<LectureWrite, Lectu } break; + case AUTO_UPDATE: + if (value == null) { + unsetAutoUpdate(); + } else { + setAutoUpdate((Boolean)value); + } + break; + case IS_ENABLED: if (value == null) { unsetIsEnabled(); @@ -558,6 +805,38 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } break; + case RUNSCRIPT: + if (value == null) { + unsetRunscript(); + } else { + setRunscript((String)value); + } + break; + + case NICS: + if (value == null) { + unsetNics(); + } else { + setNics((List<String>)value); + } + break; + + case ALLOWED_USERS: + if (value == null) { + unsetAllowedUsers(); + } else { + setAllowedUsers((List<String>)value); + } + break; + + case NETWORK_EXCEPTIONS: + if (value == null) { + unsetNetworkExceptions(); + } else { + setNetworkExceptions((List<NetRule>)value); + } + break; + case IS_EXAM: if (value == null) { unsetIsExam(); @@ -596,6 +875,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu case IMAGE_VERSION_ID: return getImageVersionId(); + case AUTO_UPDATE: + return Boolean.valueOf(isAutoUpdate()); + case IS_ENABLED: return Boolean.valueOf(isIsEnabled()); @@ -608,6 +890,18 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu case OWNER_ID: return getOwnerId(); + case RUNSCRIPT: + return getRunscript(); + + case NICS: + return getNics(); + + case ALLOWED_USERS: + return getAllowedUsers(); + + case NETWORK_EXCEPTIONS: + return getNetworkExceptions(); + case IS_EXAM: return Boolean.valueOf(isIsExam()); @@ -634,6 +928,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return isSetDescription(); case IMAGE_VERSION_ID: return isSetImageVersionId(); + case AUTO_UPDATE: + return isSetAutoUpdate(); case IS_ENABLED: return isSetIsEnabled(); case START_TIME: @@ -642,6 +938,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return isSetEndTime(); case OWNER_ID: return isSetOwnerId(); + case RUNSCRIPT: + return isSetRunscript(); + case NICS: + return isSetNics(); + case ALLOWED_USERS: + return isSetAllowedUsers(); + case NETWORK_EXCEPTIONS: + return isSetNetworkExceptions(); case IS_EXAM: return isSetIsExam(); case HAS_INTERNET_ACCESS: @@ -692,6 +996,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return false; } + boolean this_present_autoUpdate = true; + boolean that_present_autoUpdate = true; + if (this_present_autoUpdate || that_present_autoUpdate) { + if (!(this_present_autoUpdate && that_present_autoUpdate)) + return false; + if (this.autoUpdate != that.autoUpdate) + return false; + } + boolean this_present_isEnabled = true; boolean that_present_isEnabled = true; if (this_present_isEnabled || that_present_isEnabled) { @@ -728,6 +1041,42 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return false; } + boolean this_present_runscript = true && this.isSetRunscript(); + boolean that_present_runscript = true && that.isSetRunscript(); + if (this_present_runscript || that_present_runscript) { + if (!(this_present_runscript && that_present_runscript)) + return false; + if (!this.runscript.equals(that.runscript)) + return false; + } + + boolean this_present_nics = true && this.isSetNics(); + boolean that_present_nics = true && that.isSetNics(); + if (this_present_nics || that_present_nics) { + if (!(this_present_nics && that_present_nics)) + return false; + if (!this.nics.equals(that.nics)) + return false; + } + + boolean this_present_allowedUsers = true && this.isSetAllowedUsers(); + boolean that_present_allowedUsers = true && that.isSetAllowedUsers(); + if (this_present_allowedUsers || that_present_allowedUsers) { + if (!(this_present_allowedUsers && that_present_allowedUsers)) + return false; + if (!this.allowedUsers.equals(that.allowedUsers)) + return false; + } + + boolean this_present_networkExceptions = true && this.isSetNetworkExceptions(); + boolean that_present_networkExceptions = true && that.isSetNetworkExceptions(); + if (this_present_networkExceptions || that_present_networkExceptions) { + if (!(this_present_networkExceptions && that_present_networkExceptions)) + return false; + if (!this.networkExceptions.equals(that.networkExceptions)) + return false; + } + boolean this_present_isExam = true; boolean that_present_isExam = true; if (this_present_isExam || that_present_isExam) { @@ -801,6 +1150,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return lastComparison; } } + lastComparison = Boolean.valueOf(isSetAutoUpdate()).compareTo(other.isSetAutoUpdate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAutoUpdate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.autoUpdate, other.autoUpdate); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled()); if (lastComparison != 0) { return lastComparison; @@ -841,6 +1200,46 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu return lastComparison; } } + lastComparison = Boolean.valueOf(isSetRunscript()).compareTo(other.isSetRunscript()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRunscript()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runscript, other.runscript); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNics()).compareTo(other.isSetNics()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNics()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nics, other.nics); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAllowedUsers()).compareTo(other.isSetAllowedUsers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAllowedUsers()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allowedUsers, other.allowedUsers); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNetworkExceptions()).compareTo(other.isSetNetworkExceptions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNetworkExceptions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.networkExceptions, other.networkExceptions); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetIsExam()).compareTo(other.isSetIsExam()); if (lastComparison != 0) { return lastComparison; @@ -915,6 +1314,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } first = false; if (!first) sb.append(", "); + sb.append("autoUpdate:"); + sb.append(this.autoUpdate); + first = false; + if (!first) sb.append(", "); sb.append("isEnabled:"); sb.append(this.isEnabled); first = false; @@ -935,6 +1338,38 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu } first = false; if (!first) sb.append(", "); + sb.append("runscript:"); + if (this.runscript == null) { + sb.append("null"); + } else { + sb.append(this.runscript); + } + first = false; + if (!first) sb.append(", "); + sb.append("nics:"); + if (this.nics == null) { + sb.append("null"); + } else { + sb.append(this.nics); + } + first = false; + if (!first) sb.append(", "); + sb.append("allowedUsers:"); + if (this.allowedUsers == null) { + sb.append("null"); + } else { + sb.append(this.allowedUsers); + } + first = false; + if (!first) sb.append(", "); + sb.append("networkExceptions:"); + if (this.networkExceptions == null) { + sb.append("null"); + } else { + sb.append(this.networkExceptions); + } + first = false; + if (!first) sb.append(", "); sb.append("isExam:"); sb.append(this.isExam); first = false; @@ -1022,7 +1457,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // IS_ENABLED + case 4: // AUTO_UPDATE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.autoUpdate = iprot.readBool(); + struct.setAutoUpdateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // IS_ENABLED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isEnabled = iprot.readBool(); struct.setIsEnabledIsSet(true); @@ -1030,7 +1473,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // START_TIME + case 6: // START_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.startTime = iprot.readI64(); struct.setStartTimeIsSet(true); @@ -1038,7 +1481,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // END_TIME + case 7: // END_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.endTime = iprot.readI64(); struct.setEndTimeIsSet(true); @@ -1046,7 +1489,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 7: // OWNER_ID + case 8: // OWNER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.ownerId = iprot.readString(); struct.setOwnerIdIsSet(true); @@ -1054,7 +1497,70 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 8: // IS_EXAM + case 9: // RUNSCRIPT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.runscript = iprot.readString(); + struct.setRunscriptIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // NICS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(); + struct.nics = new ArrayList<String>(_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<String>(_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<NetRule>(_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<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 9: // HAS_INTERNET_ACCESS + case 14: // HAS_INTERNET_ACCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.hasInternetAccess = iprot.readBool(); struct.setHasInternetAccessIsSet(true); @@ -1070,7 +1576,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 10: // DEFAULT_PERMISSIONS + case 15: // DEFAULT_PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.defaultPermissions = new LecturePermissions(); struct.defaultPermissions.read(iprot); @@ -1109,6 +1615,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeString(struct.imageVersionId); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(AUTO_UPDATE_FIELD_DESC); + oprot.writeBool(struct.autoUpdate); + oprot.writeFieldEnd(); oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC); oprot.writeBool(struct.isEnabled); oprot.writeFieldEnd(); @@ -1123,6 +1632,47 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu oprot.writeString(struct.ownerId); oprot.writeFieldEnd(); } + if (struct.runscript != null) { + oprot.writeFieldBegin(RUNSCRIPT_FIELD_DESC); + oprot.writeString(struct.runscript); + oprot.writeFieldEnd(); + } + if (struct.nics != null) { + oprot.writeFieldBegin(NICS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.nics.size())); + for (String _iter67 : struct.nics) + { + oprot.writeString(_iter67); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.allowedUsers != null) { + oprot.writeFieldBegin(ALLOWED_USERS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.allowedUsers.size())); + for (String _iter68 : struct.allowedUsers) + { + oprot.writeString(_iter68); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.networkExceptions != null) { + 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 _iter69 : struct.networkExceptions) + { + _iter69.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } oprot.writeFieldBegin(IS_EXAM_FIELD_DESC); oprot.writeBool(struct.isExam); oprot.writeFieldEnd(); @@ -1161,28 +1711,43 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetImageVersionId()) { optionals.set(2); } - if (struct.isSetIsEnabled()) { + if (struct.isSetAutoUpdate()) { optionals.set(3); } - if (struct.isSetStartTime()) { + if (struct.isSetIsEnabled()) { optionals.set(4); } - if (struct.isSetEndTime()) { + if (struct.isSetStartTime()) { optionals.set(5); } - if (struct.isSetOwnerId()) { + if (struct.isSetEndTime()) { optionals.set(6); } - if (struct.isSetIsExam()) { + if (struct.isSetOwnerId()) { optionals.set(7); } - if (struct.isSetHasInternetAccess()) { + if (struct.isSetRunscript()) { optionals.set(8); } - if (struct.isSetDefaultPermissions()) { + if (struct.isSetNics()) { optionals.set(9); } - oprot.writeBitSet(optionals, 10); + if (struct.isSetAllowedUsers()) { + optionals.set(10); + } + if (struct.isSetNetworkExceptions()) { + optionals.set(11); + } + if (struct.isSetIsExam()) { + optionals.set(12); + } + if (struct.isSetHasInternetAccess()) { + optionals.set(13); + } + if (struct.isSetDefaultPermissions()) { + optionals.set(14); + } + oprot.writeBitSet(optionals, 15); if (struct.isSetLectureName()) { oprot.writeString(struct.lectureName); } @@ -1192,6 +1757,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetImageVersionId()) { oprot.writeString(struct.imageVersionId); } + if (struct.isSetAutoUpdate()) { + oprot.writeBool(struct.autoUpdate); + } if (struct.isSetIsEnabled()) { oprot.writeBool(struct.isEnabled); } @@ -1204,6 +1772,36 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu if (struct.isSetOwnerId()) { oprot.writeString(struct.ownerId); } + if (struct.isSetRunscript()) { + oprot.writeString(struct.runscript); + } + if (struct.isSetNics()) { + { + oprot.writeI32(struct.nics.size()); + for (String _iter70 : struct.nics) + { + oprot.writeString(_iter70); + } + } + } + if (struct.isSetAllowedUsers()) { + { + oprot.writeI32(struct.allowedUsers.size()); + for (String _iter71 : struct.allowedUsers) + { + oprot.writeString(_iter71); + } + } + } + if (struct.isSetNetworkExceptions()) { + { + oprot.writeI32(struct.networkExceptions.size()); + for (NetRule _iter72 : struct.networkExceptions) + { + _iter72.write(oprot); + } + } + } if (struct.isSetIsExam()) { oprot.writeBool(struct.isExam); } @@ -1218,7 +1816,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu @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(10); + BitSet incoming = iprot.readBitSet(15); if (incoming.get(0)) { struct.lectureName = iprot.readString(); struct.setLectureNameIsSet(true); @@ -1232,30 +1830,78 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu struct.setImageVersionIdIsSet(true); } if (incoming.get(3)) { + struct.autoUpdate = iprot.readBool(); + struct.setAutoUpdateIsSet(true); + } + if (incoming.get(4)) { struct.isEnabled = iprot.readBool(); struct.setIsEnabledIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(5)) { struct.startTime = iprot.readI64(); struct.setStartTimeIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(6)) { struct.endTime = iprot.readI64(); struct.setEndTimeIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(7)) { struct.ownerId = iprot.readString(); struct.setOwnerIdIsSet(true); } - if (incoming.get(7)) { + if (incoming.get(8)) { + struct.runscript = iprot.readString(); + struct.setRunscriptIsSet(true); + } + if (incoming.get(9)) { + { + org.apache.thrift.protocol.TList _list73 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.nics = new ArrayList<String>(_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<String>(_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<NetRule>(_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); diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java index 409d1f4..7c57bc0 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java @@ -5787,14 +5787,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list162 = iprot.readListBegin(); - struct.success = new ArrayList<UserInfo>(_list162.size); - for (int _i163 = 0; _i163 < _list162.size; ++_i163) + org.apache.thrift.protocol.TList _list218 = iprot.readListBegin(); + struct.success = new ArrayList<UserInfo>(_list218.size); + for (int _i219 = 0; _i219 < _list218.size; ++_i219) { - UserInfo _elem164; - _elem164 = new UserInfo(); - _elem164.read(iprot); - struct.success.add(_elem164); + UserInfo _elem220; + _elem220 = new UserInfo(); + _elem220.read(iprot); + struct.success.add(_elem220); } iprot.readListEnd(); } @@ -5831,9 +5831,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (UserInfo _iter165 : struct.success) + for (UserInfo _iter221 : struct.success) { - _iter165.write(oprot); + _iter221.write(oprot); } oprot.writeListEnd(); } @@ -5872,9 +5872,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (UserInfo _iter166 : struct.success) + for (UserInfo _iter222 : struct.success) { - _iter166.write(oprot); + _iter222.write(oprot); } } } @@ -5889,14 +5889,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list167 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<UserInfo>(_list167.size); - for (int _i168 = 0; _i168 < _list167.size; ++_i168) + org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<UserInfo>(_list223.size); + for (int _i224 = 0; _i224 < _list223.size; ++_i224) { - UserInfo _elem169; - _elem169 = new UserInfo(); - _elem169.read(iprot); - struct.success.add(_elem169); + UserInfo _elem225; + _elem225 = new UserInfo(); + _elem225.read(iprot); + struct.success.add(_elem225); } } struct.setSuccessIsSet(true); @@ -6749,14 +6749,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list170 = iprot.readListBegin(); - struct.success = new ArrayList<ImagePublishData>(_list170.size); - for (int _i171 = 0; _i171 < _list170.size; ++_i171) + org.apache.thrift.protocol.TList _list226 = iprot.readListBegin(); + struct.success = new ArrayList<ImagePublishData>(_list226.size); + for (int _i227 = 0; _i227 < _list226.size; ++_i227) { - ImagePublishData _elem172; - _elem172 = new ImagePublishData(); - _elem172.read(iprot); - struct.success.add(_elem172); + ImagePublishData _elem228; + _elem228 = new ImagePublishData(); + _elem228.read(iprot); + struct.success.add(_elem228); } iprot.readListEnd(); } @@ -6793,9 +6793,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (ImagePublishData _iter173 : struct.success) + for (ImagePublishData _iter229 : struct.success) { - _iter173.write(oprot); + _iter229.write(oprot); } oprot.writeListEnd(); } @@ -6834,9 +6834,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (ImagePublishData _iter174 : struct.success) + for (ImagePublishData _iter230 : struct.success) { - _iter174.write(oprot); + _iter230.write(oprot); } } } @@ -6851,14 +6851,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list175 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<ImagePublishData>(_list175.size); - for (int _i176 = 0; _i176 < _list175.size; ++_i176) + org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<ImagePublishData>(_list231.size); + for (int _i232 = 0; _i232 < _list231.size; ++_i232) { - ImagePublishData _elem177; - _elem177 = new ImagePublishData(); - _elem177.read(iprot); - struct.success.add(_elem177); + ImagePublishData _elem233; + _elem233 = new ImagePublishData(); + _elem233.read(iprot); + struct.success.add(_elem233); } } struct.setSuccessIsSet(true); @@ -10623,13 +10623,13 @@ public class MasterServer { case 3: // BLOCK_HASHES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list178 = iprot.readListBegin(); - struct.blockHashes = new ArrayList<ByteBuffer>(_list178.size); - for (int _i179 = 0; _i179 < _list178.size; ++_i179) + org.apache.thrift.protocol.TList _list234 = iprot.readListBegin(); + struct.blockHashes = new ArrayList<ByteBuffer>(_list234.size); + for (int _i235 = 0; _i235 < _list234.size; ++_i235) { - ByteBuffer _elem180; - _elem180 = iprot.readBinary(); - struct.blockHashes.add(_elem180); + ByteBuffer _elem236; + _elem236 = iprot.readBinary(); + struct.blockHashes.add(_elem236); } iprot.readListEnd(); } @@ -10667,9 +10667,9 @@ public class MasterServer { oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); - for (ByteBuffer _iter181 : struct.blockHashes) + for (ByteBuffer _iter237 : struct.blockHashes) { - oprot.writeBinary(_iter181); + oprot.writeBinary(_iter237); } oprot.writeListEnd(); } @@ -10712,9 +10712,9 @@ public class MasterServer { if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); - for (ByteBuffer _iter182 : struct.blockHashes) + for (ByteBuffer _iter238 : struct.blockHashes) { - oprot.writeBinary(_iter182); + oprot.writeBinary(_iter238); } } } @@ -10735,13 +10735,13 @@ public class MasterServer { } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list183 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.blockHashes = new ArrayList<ByteBuffer>(_list183.size); - for (int _i184 = 0; _i184 < _list183.size; ++_i184) + org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.blockHashes = new ArrayList<ByteBuffer>(_list239.size); + for (int _i240 = 0; _i240 < _list239.size; ++_i240) { - ByteBuffer _elem185; - _elem185 = iprot.readBinary(); - struct.blockHashes.add(_elem185); + ByteBuffer _elem241; + _elem241 = iprot.readBinary(); + struct.blockHashes.add(_elem241); } } struct.setBlockHashesIsSet(true); @@ -14804,14 +14804,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list186 = iprot.readListBegin(); - struct.success = new ArrayList<Organization>(_list186.size); - for (int _i187 = 0; _i187 < _list186.size; ++_i187) + org.apache.thrift.protocol.TList _list242 = iprot.readListBegin(); + struct.success = new ArrayList<Organization>(_list242.size); + for (int _i243 = 0; _i243 < _list242.size; ++_i243) { - Organization _elem188; - _elem188 = new Organization(); - _elem188.read(iprot); - struct.success.add(_elem188); + Organization _elem244; + _elem244 = new Organization(); + _elem244.read(iprot); + struct.success.add(_elem244); } iprot.readListEnd(); } @@ -14839,9 +14839,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Organization _iter189 : struct.success) + for (Organization _iter245 : struct.success) { - _iter189.write(oprot); + _iter245.write(oprot); } oprot.writeListEnd(); } @@ -14872,9 +14872,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Organization _iter190 : struct.success) + for (Organization _iter246 : struct.success) { - _iter190.write(oprot); + _iter246.write(oprot); } } } @@ -14886,14 +14886,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list191 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<Organization>(_list191.size); - for (int _i192 = 0; _i192 < _list191.size; ++_i192) + org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<Organization>(_list247.size); + for (int _i248 = 0; _i248 < _list247.size; ++_i248) { - Organization _elem193; - _elem193 = new Organization(); - _elem193.read(iprot); - struct.success.add(_elem193); + Organization _elem249; + _elem249 = new Organization(); + _elem249.read(iprot); + struct.success.add(_elem249); } } struct.setSuccessIsSet(true); @@ -15458,14 +15458,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list194 = iprot.readListBegin(); - struct.success = new ArrayList<OperatingSystem>(_list194.size); - for (int _i195 = 0; _i195 < _list194.size; ++_i195) + org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); + struct.success = new ArrayList<OperatingSystem>(_list250.size); + for (int _i251 = 0; _i251 < _list250.size; ++_i251) { - OperatingSystem _elem196; - _elem196 = new OperatingSystem(); - _elem196.read(iprot); - struct.success.add(_elem196); + OperatingSystem _elem252; + _elem252 = new OperatingSystem(); + _elem252.read(iprot); + struct.success.add(_elem252); } iprot.readListEnd(); } @@ -15493,9 +15493,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (OperatingSystem _iter197 : struct.success) + for (OperatingSystem _iter253 : struct.success) { - _iter197.write(oprot); + _iter253.write(oprot); } oprot.writeListEnd(); } @@ -15526,9 +15526,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (OperatingSystem _iter198 : struct.success) + for (OperatingSystem _iter254 : struct.success) { - _iter198.write(oprot); + _iter254.write(oprot); } } } @@ -15540,14 +15540,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list199 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<OperatingSystem>(_list199.size); - for (int _i200 = 0; _i200 < _list199.size; ++_i200) + org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<OperatingSystem>(_list255.size); + for (int _i256 = 0; _i256 < _list255.size; ++_i256) { - OperatingSystem _elem201; - _elem201 = new OperatingSystem(); - _elem201.read(iprot); - struct.success.add(_elem201); + OperatingSystem _elem257; + _elem257 = new OperatingSystem(); + _elem257.read(iprot); + struct.success.add(_elem257); } } struct.setSuccessIsSet(true); @@ -16112,14 +16112,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list202 = iprot.readListBegin(); - struct.success = new ArrayList<Virtualizer>(_list202.size); - for (int _i203 = 0; _i203 < _list202.size; ++_i203) + org.apache.thrift.protocol.TList _list258 = iprot.readListBegin(); + struct.success = new ArrayList<Virtualizer>(_list258.size); + for (int _i259 = 0; _i259 < _list258.size; ++_i259) { - Virtualizer _elem204; - _elem204 = new Virtualizer(); - _elem204.read(iprot); - struct.success.add(_elem204); + Virtualizer _elem260; + _elem260 = new Virtualizer(); + _elem260.read(iprot); + struct.success.add(_elem260); } iprot.readListEnd(); } @@ -16147,9 +16147,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Virtualizer _iter205 : struct.success) + for (Virtualizer _iter261 : struct.success) { - _iter205.write(oprot); + _iter261.write(oprot); } oprot.writeListEnd(); } @@ -16180,9 +16180,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Virtualizer _iter206 : struct.success) + for (Virtualizer _iter262 : struct.success) { - _iter206.write(oprot); + _iter262.write(oprot); } } } @@ -16194,14 +16194,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list207 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<Virtualizer>(_list207.size); - for (int _i208 = 0; _i208 < _list207.size; ++_i208) + org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<Virtualizer>(_list263.size); + for (int _i264 = 0; _i264 < _list263.size; ++_i264) { - Virtualizer _elem209; - _elem209 = new Virtualizer(); - _elem209.read(iprot); - struct.success.add(_elem209); + Virtualizer _elem265; + _elem265 = new Virtualizer(); + _elem265.read(iprot); + struct.success.add(_elem265); } } struct.setSuccessIsSet(true); diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/NetDirection.java b/src/main/java/org/openslx/bwlp/thrift/iface/NetDirection.java new file mode 100644 index 0000000..25a4bfe --- /dev/null +++ b/src/main/java/org/openslx/bwlp/thrift/iface/NetDirection.java @@ -0,0 +1,45 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.openslx.bwlp.thrift.iface; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum NetDirection implements org.apache.thrift.TEnum { + IN(0), + OUT(1); + + private final int value; + + private NetDirection(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static NetDirection findByValue(int value) { + switch (value) { + case 0: + return IN; + case 1: + return OUT; + default: + return null; + } + } +} diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java b/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java new file mode 100644 index 0000000..773aa5c --- /dev/null +++ b/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java @@ -0,0 +1,696 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * 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 org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields>, java.io.Serializable, Cloneable, Comparable<NetRule> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NetRule"); + + private static final org.apache.thrift.protocol.TField RULE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ruleId", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField DIRECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("direction", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NetRuleStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NetRuleTupleSchemeFactory()); + } + + public int ruleId; // required + /** + * + * @see NetDirection + */ + public NetDirection direction; // required + public String host; // required + public int port; // 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 { + RULE_ID((short)1, "ruleId"), + /** + * + * @see NetDirection + */ + DIRECTION((short)2, "direction"), + HOST((short)3, "host"), + PORT((short)4, "port"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // RULE_ID + return RULE_ID; + case 2: // DIRECTION + return DIRECTION; + case 3: // HOST + return HOST; + case 4: // PORT + return PORT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __RULEID_ISSET_ID = 0; + private static final int __PORT_ISSET_ID = 1; + private byte __isset_bitfield = 0; + 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); + tmpMap.put(_Fields.RULE_ID, new org.apache.thrift.meta_data.FieldMetaData("ruleId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.DIRECTION, new org.apache.thrift.meta_data.FieldMetaData("direction", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, NetDirection.class))); + tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NetRule.class, metaDataMap); + } + + public NetRule() { + } + + public NetRule( + int ruleId, + NetDirection direction, + String host, + int port) + { + this(); + this.ruleId = ruleId; + setRuleIdIsSet(true); + this.direction = direction; + this.host = host; + this.port = port; + setPortIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public NetRule(NetRule other) { + __isset_bitfield = other.__isset_bitfield; + this.ruleId = other.ruleId; + if (other.isSetDirection()) { + this.direction = other.direction; + } + if (other.isSetHost()) { + this.host = other.host; + } + this.port = other.port; + } + + public NetRule deepCopy() { + return new NetRule(this); + } + + @Override + public void clear() { + setRuleIdIsSet(false); + this.ruleId = 0; + this.direction = null; + this.host = null; + setPortIsSet(false); + this.port = 0; + } + + public int getRuleId() { + return this.ruleId; + } + + public NetRule setRuleId(int ruleId) { + this.ruleId = ruleId; + setRuleIdIsSet(true); + return this; + } + + public void unsetRuleId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RULEID_ISSET_ID); + } + + /** Returns true if field ruleId is set (has been assigned a value) and false otherwise */ + public boolean isSetRuleId() { + return EncodingUtils.testBit(__isset_bitfield, __RULEID_ISSET_ID); + } + + public void setRuleIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RULEID_ISSET_ID, value); + } + + /** + * + * @see NetDirection + */ + public NetDirection getDirection() { + return this.direction; + } + + /** + * + * @see NetDirection + */ + public NetRule setDirection(NetDirection direction) { + this.direction = direction; + return this; + } + + public void unsetDirection() { + this.direction = null; + } + + /** Returns true if field direction is set (has been assigned a value) and false otherwise */ + public boolean isSetDirection() { + return this.direction != null; + } + + public void setDirectionIsSet(boolean value) { + if (!value) { + this.direction = null; + } + } + + public String getHost() { + return this.host; + } + + public NetRule setHost(String host) { + this.host = host; + return this; + } + + public void unsetHost() { + this.host = null; + } + + /** Returns true if field host is set (has been assigned a value) and false otherwise */ + public boolean isSetHost() { + return this.host != null; + } + + public void setHostIsSet(boolean value) { + if (!value) { + this.host = null; + } + } + + public int getPort() { + return this.port; + } + + public NetRule setPort(int port) { + this.port = port; + setPortIsSet(true); + return this; + } + + public void unsetPort() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); + } + + /** Returns true if field port is set (has been assigned a value) and false otherwise */ + public boolean isSetPort() { + return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); + } + + public void setPortIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RULE_ID: + if (value == null) { + unsetRuleId(); + } else { + setRuleId((Integer)value); + } + break; + + case DIRECTION: + if (value == null) { + unsetDirection(); + } else { + setDirection((NetDirection)value); + } + break; + + case HOST: + if (value == null) { + unsetHost(); + } else { + setHost((String)value); + } + break; + + case PORT: + if (value == null) { + unsetPort(); + } else { + setPort((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RULE_ID: + return Integer.valueOf(getRuleId()); + + case DIRECTION: + return getDirection(); + + case HOST: + return getHost(); + + case PORT: + return Integer.valueOf(getPort()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case RULE_ID: + return isSetRuleId(); + case DIRECTION: + return isSetDirection(); + case HOST: + return isSetHost(); + case PORT: + return isSetPort(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NetRule) + return this.equals((NetRule)that); + return false; + } + + public boolean equals(NetRule that) { + if (that == null) + return false; + + boolean this_present_ruleId = true; + boolean that_present_ruleId = true; + if (this_present_ruleId || that_present_ruleId) { + if (!(this_present_ruleId && that_present_ruleId)) + return false; + if (this.ruleId != that.ruleId) + return false; + } + + boolean this_present_direction = true && this.isSetDirection(); + boolean that_present_direction = true && that.isSetDirection(); + if (this_present_direction || that_present_direction) { + if (!(this_present_direction && that_present_direction)) + return false; + if (!this.direction.equals(that.direction)) + return false; + } + + boolean this_present_host = true && this.isSetHost(); + boolean that_present_host = true && that.isSetHost(); + if (this_present_host || that_present_host) { + if (!(this_present_host && that_present_host)) + return false; + if (!this.host.equals(that.host)) + return false; + } + + boolean this_present_port = true; + boolean that_present_port = true; + if (this_present_port || that_present_port) { + if (!(this_present_port && that_present_port)) + return false; + if (this.port != that.port) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(NetRule other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRuleId()).compareTo(other.isSetRuleId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRuleId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ruleId, other.ruleId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDirection()).compareTo(other.isSetDirection()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDirection()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.direction, other.direction); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHost()).compareTo(other.isSetHost()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHost()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, other.host); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPort()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("NetRule("); + boolean first = true; + + sb.append("ruleId:"); + sb.append(this.ruleId); + first = false; + if (!first) sb.append(", "); + sb.append("direction:"); + if (this.direction == null) { + sb.append("null"); + } else { + sb.append(this.direction); + } + first = false; + if (!first) sb.append(", "); + sb.append("host:"); + if (this.host == null) { + sb.append("null"); + } else { + sb.append(this.host); + } + first = false; + if (!first) sb.append(", "); + sb.append("port:"); + sb.append(this.port); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class NetRuleStandardSchemeFactory implements SchemeFactory { + public NetRuleStandardScheme getScheme() { + return new NetRuleStandardScheme(); + } + } + + private static class NetRuleStandardScheme extends StandardScheme<NetRule> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NetRule struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // RULE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.ruleId = iprot.readI32(); + struct.setRuleIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // DIRECTION + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.direction = NetDirection.findByValue(iprot.readI32()); + struct.setDirectionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // HOST + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.host = iprot.readString(); + struct.setHostIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // PORT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.port = iprot.readI32(); + struct.setPortIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, NetRule struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(RULE_ID_FIELD_DESC); + oprot.writeI32(struct.ruleId); + oprot.writeFieldEnd(); + if (struct.direction != null) { + oprot.writeFieldBegin(DIRECTION_FIELD_DESC); + oprot.writeI32(struct.direction.getValue()); + oprot.writeFieldEnd(); + } + if (struct.host != null) { + oprot.writeFieldBegin(HOST_FIELD_DESC); + oprot.writeString(struct.host); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(PORT_FIELD_DESC); + oprot.writeI32(struct.port); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NetRuleTupleSchemeFactory implements SchemeFactory { + public NetRuleTupleScheme getScheme() { + return new NetRuleTupleScheme(); + } + } + + private static class NetRuleTupleScheme extends TupleScheme<NetRule> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NetRule struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRuleId()) { + optionals.set(0); + } + if (struct.isSetDirection()) { + optionals.set(1); + } + if (struct.isSetHost()) { + optionals.set(2); + } + if (struct.isSetPort()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetRuleId()) { + oprot.writeI32(struct.ruleId); + } + if (struct.isSetDirection()) { + oprot.writeI32(struct.direction.getValue()); + } + if (struct.isSetHost()) { + oprot.writeString(struct.host); + } + if (struct.isSetPort()) { + oprot.writeI32(struct.port); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NetRule struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.ruleId = iprot.readI32(); + struct.setRuleIdIsSet(true); + } + if (incoming.get(1)) { + struct.direction = NetDirection.findByValue(iprot.readI32()); + struct.setDirectionIsSet(true); + } + if (incoming.get(2)) { + struct.host = iprot.readString(); + struct.setHostIsSet(true); + } + if (incoming.get(3)) { + struct.port = iprot.readI32(); + struct.setPortIsSet(true); + } + } + } + +} + diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java index 64578d6..6863443 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java @@ -52,6 +52,8 @@ public class SatelliteServer { public void invalidateSession(String userToken) throws org.apache.thrift.TException; + public List<UserInfo> getUserList(String userToken, int page) throws TAuthorizationException, org.apache.thrift.TException; + public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException; public List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException; @@ -68,7 +70,7 @@ public class SatelliteServer { public boolean deleteImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; - public boolean writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; + public boolean writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; public Map<String,ImagePermissions> getImagePermissions(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException; @@ -108,6 +110,8 @@ public class SatelliteServer { public void invalidateSession(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getUserList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -124,7 +128,7 @@ public class SatelliteServer { public void deleteImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getImagePermissions(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -356,6 +360,33 @@ public class SatelliteServer { return; } + public List<UserInfo> getUserList(String userToken, int page) throws TAuthorizationException, org.apache.thrift.TException + { + send_getUserList(userToken, page); + return recv_getUserList(); + } + + public void send_getUserList(String userToken, int page) throws org.apache.thrift.TException + { + getUserList_args args = new getUserList_args(); + args.setUserToken(userToken); + args.setPage(page); + sendBase("getUserList", args); + } + + public List<UserInfo> recv_getUserList() throws TAuthorizationException, org.apache.thrift.TException + { + getUserList_result result = new getUserList_result(); + receiveBase(result, "getUserList"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.failure != null) { + throw result.failure; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserList failed: unknown result"); + } + public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException { send_getOperatingSystems(); @@ -565,17 +596,17 @@ public class SatelliteServer { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteImageVersion failed: unknown result"); } - public boolean writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException + public boolean writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, org.apache.thrift.TException { - send_writeImagePermissions(userToken, imageId, permissions); + send_writeImagePermissions(userToken, imageBaseId, permissions); return recv_writeImagePermissions(); } - public void send_writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions) throws org.apache.thrift.TException + public void send_writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions) throws org.apache.thrift.TException { writeImagePermissions_args args = new writeImagePermissions_args(); args.setUserToken(userToken); - args.setImageId(imageId); + args.setImageBaseId(imageBaseId); args.setPermissions(permissions); sendBase("writeImagePermissions", args); } @@ -1144,6 +1175,41 @@ public class SatelliteServer { } } + public void getUserList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getUserList_call method_call = new getUserList_call(userToken, page, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getUserList_call extends org.apache.thrift.async.TAsyncMethodCall { + private String userToken; + private int page; + public getUserList_call(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.userToken = userToken; + this.page = page; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getUserList_args args = new getUserList_args(); + args.setUserToken(userToken); + args.setPage(page); + args.write(prot); + prot.writeMessageEnd(); + } + + public List<UserInfo> getResult() throws TAuthorizationException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getUserList(); + } + } + public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getOperatingSystems_call method_call = new getOperatingSystems_call(resultHandler, this, ___protocolFactory, ___transport); @@ -1412,21 +1478,21 @@ public class SatelliteServer { } } - public void writeImagePermissions(String userToken, String imageId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); - writeImagePermissions_call method_call = new writeImagePermissions_call(userToken, imageId, permissions, resultHandler, this, ___protocolFactory, ___transport); + writeImagePermissions_call method_call = new writeImagePermissions_call(userToken, imageBaseId, permissions, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class writeImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall { private String userToken; - private String imageId; + private String imageBaseId; private Map<String,ImagePermissions> permissions; - public writeImagePermissions_call(String userToken, String imageId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public writeImagePermissions_call(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.userToken = userToken; - this.imageId = imageId; + this.imageBaseId = imageBaseId; this.permissions = permissions; } @@ -1434,7 +1500,7 @@ public class SatelliteServer { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0)); writeImagePermissions_args args = new writeImagePermissions_args(); args.setUserToken(userToken); - args.setImageId(imageId); + args.setImageBaseId(imageBaseId); args.setPermissions(permissions); args.write(prot); prot.writeMessageEnd(); @@ -1789,6 +1855,7 @@ public class SatelliteServer { processMap.put("cancelDownload", new cancelDownload()); processMap.put("isAuthenticated", new isAuthenticated()); processMap.put("invalidateSession", new invalidateSession()); + processMap.put("getUserList", new getUserList()); processMap.put("getOperatingSystems", new getOperatingSystems()); processMap.put("getVirtualizers", new getVirtualizers()); processMap.put("getAllOrganizations", new getAllOrganizations()); @@ -1986,6 +2053,30 @@ public class SatelliteServer { } } + public static class getUserList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserList_args> { + public getUserList() { + super("getUserList"); + } + + public getUserList_args getEmptyArgsInstance() { + return new getUserList_args(); + } + + protected boolean isOneway() { + return false; + } + + public getUserList_result getResult(I iface, getUserList_args args) throws org.apache.thrift.TException { + getUserList_result result = new getUserList_result(); + try { + result.success = iface.getUserList(args.userToken, args.page); + } catch (TAuthorizationException failure) { + result.failure = failure; + } + return result; + } + } + public static class getOperatingSystems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOperatingSystems_args> { public getOperatingSystems() { super("getOperatingSystems"); @@ -2189,7 +2280,7 @@ public class SatelliteServer { public writeImagePermissions_result getResult(I iface, writeImagePermissions_args args) throws org.apache.thrift.TException { writeImagePermissions_result result = new writeImagePermissions_result(); try { - result.success = iface.writeImagePermissions(args.userToken, args.imageId, args.permissions); + result.success = iface.writeImagePermissions(args.userToken, args.imageBaseId, args.permissions); result.setSuccessIsSet(true); } catch (TAuthorizationException authError) { result.authError = authError; @@ -2454,6 +2545,7 @@ public class SatelliteServer { processMap.put("cancelDownload", new cancelDownload()); processMap.put("isAuthenticated", new isAuthenticated()); processMap.put("invalidateSession", new invalidateSession()); + processMap.put("getUserList", new getUserList()); processMap.put("getOperatingSystems", new getOperatingSystems()); processMap.put("getVirtualizers", new getVirtualizers()); processMap.put("getAllOrganizations", new getAllOrganizations()); @@ -2905,6 +2997,63 @@ public class SatelliteServer { } } + public static class getUserList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserList_args, List<UserInfo>> { + public getUserList() { + super("getUserList"); + } + + public getUserList_args getEmptyArgsInstance() { + return new getUserList_args(); + } + + public AsyncMethodCallback<List<UserInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<List<UserInfo>>() { + public void onComplete(List<UserInfo> o) { + getUserList_result result = new getUserList_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getUserList_result result = new getUserList_result(); + if (e instanceof TAuthorizationException) { + result.failure = (TAuthorizationException) e; + result.setFailureIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getUserList_args args, org.apache.thrift.async.AsyncMethodCallback<List<UserInfo>> resultHandler) throws TException { + iface.getUserList(args.userToken, args.page,resultHandler); + } + } + public static class getOperatingSystems<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOperatingSystems_args, List<OperatingSystem>> { public getOperatingSystems() { super("getOperatingSystems"); @@ -3415,7 +3564,7 @@ public class SatelliteServer { } public void start(I iface, writeImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.writeImagePermissions(args.userToken, args.imageId, args.permissions,resultHandler); + iface.writeImagePermissions(args.userToken, args.imageBaseId, args.permissions,resultHandler); } } @@ -5133,13 +5282,13 @@ public class SatelliteServer { case 4: // BLOCK_HASHES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(); - struct.blockHashes = new ArrayList<ByteBuffer>(_list58.size); - for (int _i59 = 0; _i59 < _list58.size; ++_i59) + org.apache.thrift.protocol.TList _list106 = iprot.readListBegin(); + struct.blockHashes = new ArrayList<ByteBuffer>(_list106.size); + for (int _i107 = 0; _i107 < _list106.size; ++_i107) { - ByteBuffer _elem60; - _elem60 = iprot.readBinary(); - struct.blockHashes.add(_elem60); + ByteBuffer _elem108; + _elem108 = iprot.readBinary(); + struct.blockHashes.add(_elem108); } iprot.readListEnd(); } @@ -5180,9 +5329,9 @@ public class SatelliteServer { oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); - for (ByteBuffer _iter61 : struct.blockHashes) + for (ByteBuffer _iter109 : struct.blockHashes) { - oprot.writeBinary(_iter61); + oprot.writeBinary(_iter109); } oprot.writeListEnd(); } @@ -5231,9 +5380,9 @@ public class SatelliteServer { if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); - for (ByteBuffer _iter62 : struct.blockHashes) + for (ByteBuffer _iter110 : struct.blockHashes) { - oprot.writeBinary(_iter62); + oprot.writeBinary(_iter110); } } } @@ -5257,13 +5406,13 @@ public class SatelliteServer { } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list63 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.blockHashes = new ArrayList<ByteBuffer>(_list63.size); - for (int _i64 = 0; _i64 < _list63.size; ++_i64) + org.apache.thrift.protocol.TList _list111 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.blockHashes = new ArrayList<ByteBuffer>(_list111.size); + for (int _i112 = 0; _i112 < _list111.size; ++_i112) { - ByteBuffer _elem65; - _elem65 = iprot.readBinary(); - struct.blockHashes.add(_elem65); + ByteBuffer _elem113; + _elem113 = iprot.readBinary(); + struct.blockHashes.add(_elem113); } } struct.setBlockHashesIsSet(true); @@ -10074,6 +10223,968 @@ public class SatelliteServer { } + public static class getUserList_args implements org.apache.thrift.TBase<getUserList_args, getUserList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserList_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserList_args"); + + private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getUserList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUserList_argsTupleSchemeFactory()); + } + + public String userToken; // required + public int page; // 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 { + USER_TOKEN((short)1, "userToken"), + PAGE((short)2, "page"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // USER_TOKEN + return USER_TOKEN; + case 2: // PAGE + return PAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __PAGE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + 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); + tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserList_args.class, metaDataMap); + } + + public getUserList_args() { + } + + public getUserList_args( + String userToken, + int page) + { + this(); + this.userToken = userToken; + this.page = page; + setPageIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getUserList_args(getUserList_args other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetUserToken()) { + this.userToken = other.userToken; + } + this.page = other.page; + } + + public getUserList_args deepCopy() { + return new getUserList_args(this); + } + + @Override + public void clear() { + this.userToken = null; + setPageIsSet(false); + this.page = 0; + } + + public String getUserToken() { + return this.userToken; + } + + public getUserList_args setUserToken(String userToken) { + this.userToken = userToken; + return this; + } + + public void unsetUserToken() { + this.userToken = null; + } + + /** Returns true if field userToken is set (has been assigned a value) and false otherwise */ + public boolean isSetUserToken() { + return this.userToken != null; + } + + public void setUserTokenIsSet(boolean value) { + if (!value) { + this.userToken = null; + } + } + + public int getPage() { + return this.page; + } + + public getUserList_args setPage(int page) { + this.page = page; + setPageIsSet(true); + return this; + } + + public void unsetPage() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID); + } + + /** Returns true if field page is set (has been assigned a value) and false otherwise */ + public boolean isSetPage() { + return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID); + } + + public void setPageIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case USER_TOKEN: + if (value == null) { + unsetUserToken(); + } else { + setUserToken((String)value); + } + break; + + case PAGE: + if (value == null) { + unsetPage(); + } else { + setPage((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case USER_TOKEN: + return getUserToken(); + + case PAGE: + return Integer.valueOf(getPage()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case USER_TOKEN: + return isSetUserToken(); + case PAGE: + return isSetPage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getUserList_args) + return this.equals((getUserList_args)that); + return false; + } + + public boolean equals(getUserList_args that) { + if (that == null) + return false; + + boolean this_present_userToken = true && this.isSetUserToken(); + boolean that_present_userToken = true && that.isSetUserToken(); + if (this_present_userToken || that_present_userToken) { + if (!(this_present_userToken && that_present_userToken)) + return false; + if (!this.userToken.equals(that.userToken)) + return false; + } + + boolean this_present_page = true; + boolean that_present_page = true; + if (this_present_page || that_present_page) { + if (!(this_present_page && that_present_page)) + return false; + if (this.page != that.page) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getUserList_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserToken()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userToken, other.userToken); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getUserList_args("); + boolean first = true; + + sb.append("userToken:"); + if (this.userToken == null) { + sb.append("null"); + } else { + sb.append(this.userToken); + } + first = false; + if (!first) sb.append(", "); + sb.append("page:"); + sb.append(this.page); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getUserList_argsStandardSchemeFactory implements SchemeFactory { + public getUserList_argsStandardScheme getScheme() { + return new getUserList_argsStandardScheme(); + } + } + + private static class getUserList_argsStandardScheme extends StandardScheme<getUserList_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getUserList_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // USER_TOKEN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PAGE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.page = iprot.readI32(); + struct.setPageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getUserList_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.userToken != null) { + oprot.writeFieldBegin(USER_TOKEN_FIELD_DESC); + oprot.writeString(struct.userToken); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(PAGE_FIELD_DESC); + oprot.writeI32(struct.page); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getUserList_argsTupleSchemeFactory implements SchemeFactory { + public getUserList_argsTupleScheme getScheme() { + return new getUserList_argsTupleScheme(); + } + } + + private static class getUserList_argsTupleScheme extends TupleScheme<getUserList_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getUserList_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetUserToken()) { + optionals.set(0); + } + if (struct.isSetPage()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetUserToken()) { + oprot.writeString(struct.userToken); + } + if (struct.isSetPage()) { + oprot.writeI32(struct.page); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getUserList_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.userToken = iprot.readString(); + struct.setUserTokenIsSet(true); + } + if (incoming.get(1)) { + struct.page = iprot.readI32(); + struct.setPageIsSet(true); + } + } + } + + } + + public static class getUserList_result implements org.apache.thrift.TBase<getUserList_result, getUserList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserList_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserList_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getUserList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getUserList_resultTupleSchemeFactory()); + } + + public List<UserInfo> success; // required + public TAuthorizationException failure; // 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 { + SUCCESS((short)0, "success"), + FAILURE((short)1, "failure"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // FAILURE + return FAILURE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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, UserInfo.class)))); + tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserList_result.class, metaDataMap); + } + + public getUserList_result() { + } + + public getUserList_result( + List<UserInfo> success, + TAuthorizationException failure) + { + this(); + this.success = success; + this.failure = failure; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public getUserList_result(getUserList_result other) { + if (other.isSetSuccess()) { + List<UserInfo> __this__success = new ArrayList<UserInfo>(other.success.size()); + for (UserInfo other_element : other.success) { + __this__success.add(new UserInfo(other_element)); + } + this.success = __this__success; + } + if (other.isSetFailure()) { + this.failure = new TAuthorizationException(other.failure); + } + } + + public getUserList_result deepCopy() { + return new getUserList_result(this); + } + + @Override + public void clear() { + this.success = null; + this.failure = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator<UserInfo> getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(UserInfo elem) { + if (this.success == null) { + this.success = new ArrayList<UserInfo>(); + } + this.success.add(elem); + } + + public List<UserInfo> getSuccess() { + return this.success; + } + + public getUserList_result setSuccess(List<UserInfo> success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TAuthorizationException getFailure() { + return this.failure; + } + + public getUserList_result setFailure(TAuthorizationException failure) { + this.failure = failure; + return this; + } + + public void unsetFailure() { + this.failure = null; + } + + /** Returns true if field failure is set (has been assigned a value) and false otherwise */ + public boolean isSetFailure() { + return this.failure != null; + } + + public void setFailureIsSet(boolean value) { + if (!value) { + this.failure = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List<UserInfo>)value); + } + break; + + case FAILURE: + if (value == null) { + unsetFailure(); + } else { + setFailure((TAuthorizationException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case FAILURE: + return getFailure(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case FAILURE: + return isSetFailure(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getUserList_result) + return this.equals((getUserList_result)that); + return false; + } + + public boolean equals(getUserList_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_failure = true && this.isSetFailure(); + boolean that_present_failure = true && that.isSetFailure(); + if (this_present_failure || that_present_failure) { + if (!(this_present_failure && that_present_failure)) + return false; + if (!this.failure.equals(that.failure)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getUserList_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFailure()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getUserList_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("failure:"); + if (this.failure == null) { + sb.append("null"); + } else { + sb.append(this.failure); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getUserList_resultStandardSchemeFactory implements SchemeFactory { + public getUserList_resultStandardScheme getScheme() { + return new getUserList_resultStandardScheme(); + } + } + + private static class getUserList_resultStandardScheme extends StandardScheme<getUserList_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getUserList_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list114 = iprot.readListBegin(); + struct.success = new ArrayList<UserInfo>(_list114.size); + for (int _i115 = 0; _i115 < _list114.size; ++_i115) + { + UserInfo _elem116; + _elem116 = new UserInfo(); + _elem116.read(iprot); + struct.success.add(_elem116); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // FAILURE + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.failure = new TAuthorizationException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getUserList_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (UserInfo _iter117 : struct.success) + { + _iter117.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.failure != null) { + oprot.writeFieldBegin(FAILURE_FIELD_DESC); + struct.failure.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getUserList_resultTupleSchemeFactory implements SchemeFactory { + public getUserList_resultTupleScheme getScheme() { + return new getUserList_resultTupleScheme(); + } + } + + private static class getUserList_resultTupleScheme extends TupleScheme<getUserList_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getUserList_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetFailure()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (UserInfo _iter118 : struct.success) + { + _iter118.write(oprot); + } + } + } + if (struct.isSetFailure()) { + struct.failure.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getUserList_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list119 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<UserInfo>(_list119.size); + for (int _i120 = 0; _i120 < _list119.size; ++_i120) + { + UserInfo _elem121; + _elem121 = new UserInfo(); + _elem121.read(iprot); + struct.success.add(_elem121); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.failure = new TAuthorizationException(); + struct.failure.read(iprot); + struct.setFailureIsSet(true); + } + } + } + + } + public static class getOperatingSystems_args implements org.apache.thrift.TBase<getOperatingSystems_args, getOperatingSystems_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOperatingSystems_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_args"); @@ -10629,14 +11740,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list66 = iprot.readListBegin(); - struct.success = new ArrayList<OperatingSystem>(_list66.size); - for (int _i67 = 0; _i67 < _list66.size; ++_i67) + org.apache.thrift.protocol.TList _list122 = iprot.readListBegin(); + struct.success = new ArrayList<OperatingSystem>(_list122.size); + for (int _i123 = 0; _i123 < _list122.size; ++_i123) { - OperatingSystem _elem68; - _elem68 = new OperatingSystem(); - _elem68.read(iprot); - struct.success.add(_elem68); + OperatingSystem _elem124; + _elem124 = new OperatingSystem(); + _elem124.read(iprot); + struct.success.add(_elem124); } iprot.readListEnd(); } @@ -10664,9 +11775,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (OperatingSystem _iter69 : struct.success) + for (OperatingSystem _iter125 : struct.success) { - _iter69.write(oprot); + _iter125.write(oprot); } oprot.writeListEnd(); } @@ -10697,9 +11808,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (OperatingSystem _iter70 : struct.success) + for (OperatingSystem _iter126 : struct.success) { - _iter70.write(oprot); + _iter126.write(oprot); } } } @@ -10711,14 +11822,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list71 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<OperatingSystem>(_list71.size); - for (int _i72 = 0; _i72 < _list71.size; ++_i72) + org.apache.thrift.protocol.TList _list127 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<OperatingSystem>(_list127.size); + for (int _i128 = 0; _i128 < _list127.size; ++_i128) { - OperatingSystem _elem73; - _elem73 = new OperatingSystem(); - _elem73.read(iprot); - struct.success.add(_elem73); + OperatingSystem _elem129; + _elem129 = new OperatingSystem(); + _elem129.read(iprot); + struct.success.add(_elem129); } } struct.setSuccessIsSet(true); @@ -11283,14 +12394,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list74 = iprot.readListBegin(); - struct.success = new ArrayList<Virtualizer>(_list74.size); - for (int _i75 = 0; _i75 < _list74.size; ++_i75) + org.apache.thrift.protocol.TList _list130 = iprot.readListBegin(); + struct.success = new ArrayList<Virtualizer>(_list130.size); + for (int _i131 = 0; _i131 < _list130.size; ++_i131) { - Virtualizer _elem76; - _elem76 = new Virtualizer(); - _elem76.read(iprot); - struct.success.add(_elem76); + Virtualizer _elem132; + _elem132 = new Virtualizer(); + _elem132.read(iprot); + struct.success.add(_elem132); } iprot.readListEnd(); } @@ -11318,9 +12429,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Virtualizer _iter77 : struct.success) + for (Virtualizer _iter133 : struct.success) { - _iter77.write(oprot); + _iter133.write(oprot); } oprot.writeListEnd(); } @@ -11351,9 +12462,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Virtualizer _iter78 : struct.success) + for (Virtualizer _iter134 : struct.success) { - _iter78.write(oprot); + _iter134.write(oprot); } } } @@ -11365,14 +12476,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<Virtualizer>(_list79.size); - for (int _i80 = 0; _i80 < _list79.size; ++_i80) + org.apache.thrift.protocol.TList _list135 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<Virtualizer>(_list135.size); + for (int _i136 = 0; _i136 < _list135.size; ++_i136) { - Virtualizer _elem81; - _elem81 = new Virtualizer(); - _elem81.read(iprot); - struct.success.add(_elem81); + Virtualizer _elem137; + _elem137 = new Virtualizer(); + _elem137.read(iprot); + struct.success.add(_elem137); } } struct.setSuccessIsSet(true); @@ -11937,14 +13048,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list82 = iprot.readListBegin(); - struct.success = new ArrayList<Organization>(_list82.size); - for (int _i83 = 0; _i83 < _list82.size; ++_i83) + org.apache.thrift.protocol.TList _list138 = iprot.readListBegin(); + struct.success = new ArrayList<Organization>(_list138.size); + for (int _i139 = 0; _i139 < _list138.size; ++_i139) { - Organization _elem84; - _elem84 = new Organization(); - _elem84.read(iprot); - struct.success.add(_elem84); + Organization _elem140; + _elem140 = new Organization(); + _elem140.read(iprot); + struct.success.add(_elem140); } iprot.readListEnd(); } @@ -11972,9 +13083,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Organization _iter85 : struct.success) + for (Organization _iter141 : struct.success) { - _iter85.write(oprot); + _iter141.write(oprot); } oprot.writeListEnd(); } @@ -12005,9 +13116,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Organization _iter86 : struct.success) + for (Organization _iter142 : struct.success) { - _iter86.write(oprot); + _iter142.write(oprot); } } } @@ -12019,14 +13130,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<Organization>(_list87.size); - for (int _i88 = 0; _i88 < _list87.size; ++_i88) + org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<Organization>(_list143.size); + for (int _i144 = 0; _i144 < _list143.size; ++_i144) { - Organization _elem89; - _elem89 = new Organization(); - _elem89.read(iprot); - struct.success.add(_elem89); + Organization _elem145; + _elem145 = new Organization(); + _elem145.read(iprot); + struct.success.add(_elem145); } } struct.setSuccessIsSet(true); @@ -12427,13 +13538,13 @@ public class SatelliteServer { case 2: // TAG_SEARCH if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list90 = iprot.readListBegin(); - struct.tagSearch = new ArrayList<String>(_list90.size); - for (int _i91 = 0; _i91 < _list90.size; ++_i91) + org.apache.thrift.protocol.TList _list146 = iprot.readListBegin(); + struct.tagSearch = new ArrayList<String>(_list146.size); + for (int _i147 = 0; _i147 < _list146.size; ++_i147) { - String _elem92; - _elem92 = iprot.readString(); - struct.tagSearch.add(_elem92); + String _elem148; + _elem148 = iprot.readString(); + struct.tagSearch.add(_elem148); } iprot.readListEnd(); } @@ -12466,9 +13577,9 @@ public class SatelliteServer { oprot.writeFieldBegin(TAG_SEARCH_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tagSearch.size())); - for (String _iter93 : struct.tagSearch) + for (String _iter149 : struct.tagSearch) { - oprot.writeString(_iter93); + oprot.writeString(_iter149); } oprot.writeListEnd(); } @@ -12505,9 +13616,9 @@ public class SatelliteServer { if (struct.isSetTagSearch()) { { oprot.writeI32(struct.tagSearch.size()); - for (String _iter94 : struct.tagSearch) + for (String _iter150 : struct.tagSearch) { - oprot.writeString(_iter94); + oprot.writeString(_iter150); } } } @@ -12523,13 +13634,13 @@ public class SatelliteServer { } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list95 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tagSearch = new ArrayList<String>(_list95.size); - for (int _i96 = 0; _i96 < _list95.size; ++_i96) + org.apache.thrift.protocol.TList _list151 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tagSearch = new ArrayList<String>(_list151.size); + for (int _i152 = 0; _i152 < _list151.size; ++_i152) { - String _elem97; - _elem97 = iprot.readString(); - struct.tagSearch.add(_elem97); + String _elem153; + _elem153 = iprot.readString(); + struct.tagSearch.add(_elem153); } } struct.setTagSearchIsSet(true); @@ -12925,14 +14036,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list98 = iprot.readListBegin(); - struct.success = new ArrayList<ImageSummaryRead>(_list98.size); - for (int _i99 = 0; _i99 < _list98.size; ++_i99) + org.apache.thrift.protocol.TList _list154 = iprot.readListBegin(); + struct.success = new ArrayList<ImageSummaryRead>(_list154.size); + for (int _i155 = 0; _i155 < _list154.size; ++_i155) { - ImageSummaryRead _elem100; - _elem100 = new ImageSummaryRead(); - _elem100.read(iprot); - struct.success.add(_elem100); + ImageSummaryRead _elem156; + _elem156 = new ImageSummaryRead(); + _elem156.read(iprot); + struct.success.add(_elem156); } iprot.readListEnd(); } @@ -12969,9 +14080,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (ImageSummaryRead _iter101 : struct.success) + for (ImageSummaryRead _iter157 : struct.success) { - _iter101.write(oprot); + _iter157.write(oprot); } oprot.writeListEnd(); } @@ -13010,9 +14121,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (ImageSummaryRead _iter102 : struct.success) + for (ImageSummaryRead _iter158 : struct.success) { - _iter102.write(oprot); + _iter158.write(oprot); } } } @@ -13027,14 +14138,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<ImageSummaryRead>(_list103.size); - for (int _i104 = 0; _i104 < _list103.size; ++_i104) + org.apache.thrift.protocol.TList _list159 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<ImageSummaryRead>(_list159.size); + for (int _i160 = 0; _i160 < _list159.size; ++_i160) { - ImageSummaryRead _elem105; - _elem105 = new ImageSummaryRead(); - _elem105.read(iprot); - struct.success.add(_elem105); + ImageSummaryRead _elem161; + _elem161 = new ImageSummaryRead(); + _elem161.read(iprot); + struct.success.add(_elem161); } } struct.setSuccessIsSet(true); @@ -17112,7 +18223,7 @@ public class SatelliteServer { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImagePermissions_args"); private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField IMAGE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); @@ -17122,13 +18233,13 @@ public class SatelliteServer { } public String userToken; // required - public String imageId; // required + public String imageBaseId; // required public Map<String,ImagePermissions> permissions; // 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 { USER_TOKEN((short)1, "userToken"), - IMAGE_ID((short)2, "imageId"), + IMAGE_BASE_ID((short)2, "imageBaseId"), PERMISSIONS((short)3, "permissions"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -17146,8 +18257,8 @@ public class SatelliteServer { switch(fieldId) { case 1: // USER_TOKEN return USER_TOKEN; - case 2: // IMAGE_ID - return IMAGE_ID; + case 2: // IMAGE_BASE_ID + return IMAGE_BASE_ID; case 3: // PERMISSIONS return PERMISSIONS; default: @@ -17195,7 +18306,7 @@ public class SatelliteServer { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); - tmpMap.put(_Fields.IMAGE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageId", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); tmpMap.put(_Fields.PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("permissions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, @@ -17210,12 +18321,12 @@ public class SatelliteServer { public writeImagePermissions_args( String userToken, - String imageId, + String imageBaseId, Map<String,ImagePermissions> permissions) { this(); this.userToken = userToken; - this.imageId = imageId; + this.imageBaseId = imageBaseId; this.permissions = permissions; } @@ -17226,8 +18337,8 @@ public class SatelliteServer { if (other.isSetUserToken()) { this.userToken = other.userToken; } - if (other.isSetImageId()) { - this.imageId = other.imageId; + if (other.isSetImageBaseId()) { + this.imageBaseId = other.imageBaseId; } if (other.isSetPermissions()) { Map<String,ImagePermissions> __this__permissions = new HashMap<String,ImagePermissions>(other.permissions.size()); @@ -17253,7 +18364,7 @@ public class SatelliteServer { @Override public void clear() { this.userToken = null; - this.imageId = null; + this.imageBaseId = null; this.permissions = null; } @@ -17281,27 +18392,27 @@ public class SatelliteServer { } } - public String getImageId() { - return this.imageId; + public String getImageBaseId() { + return this.imageBaseId; } - public writeImagePermissions_args setImageId(String imageId) { - this.imageId = imageId; + public writeImagePermissions_args setImageBaseId(String imageBaseId) { + this.imageBaseId = imageBaseId; return this; } - public void unsetImageId() { - this.imageId = null; + public void unsetImageBaseId() { + this.imageBaseId = null; } - /** Returns true if field imageId is set (has been assigned a value) and false otherwise */ - public boolean isSetImageId() { - return this.imageId != null; + /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageBaseId() { + return this.imageBaseId != null; } - public void setImageIdIsSet(boolean value) { + public void setImageBaseIdIsSet(boolean value) { if (!value) { - this.imageId = null; + this.imageBaseId = null; } } @@ -17350,11 +18461,11 @@ public class SatelliteServer { } break; - case IMAGE_ID: + case IMAGE_BASE_ID: if (value == null) { - unsetImageId(); + unsetImageBaseId(); } else { - setImageId((String)value); + setImageBaseId((String)value); } break; @@ -17374,8 +18485,8 @@ public class SatelliteServer { case USER_TOKEN: return getUserToken(); - case IMAGE_ID: - return getImageId(); + case IMAGE_BASE_ID: + return getImageBaseId(); case PERMISSIONS: return getPermissions(); @@ -17393,8 +18504,8 @@ public class SatelliteServer { switch (field) { case USER_TOKEN: return isSetUserToken(); - case IMAGE_ID: - return isSetImageId(); + case IMAGE_BASE_ID: + return isSetImageBaseId(); case PERMISSIONS: return isSetPermissions(); } @@ -17423,12 +18534,12 @@ public class SatelliteServer { return false; } - boolean this_present_imageId = true && this.isSetImageId(); - boolean that_present_imageId = true && that.isSetImageId(); - if (this_present_imageId || that_present_imageId) { - if (!(this_present_imageId && that_present_imageId)) + boolean this_present_imageBaseId = true && this.isSetImageBaseId(); + boolean that_present_imageBaseId = true && that.isSetImageBaseId(); + if (this_present_imageBaseId || that_present_imageBaseId) { + if (!(this_present_imageBaseId && that_present_imageBaseId)) return false; - if (!this.imageId.equals(that.imageId)) + if (!this.imageBaseId.equals(that.imageBaseId)) return false; } @@ -17467,12 +18578,12 @@ public class SatelliteServer { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetImageId()).compareTo(other.isSetImageId()); + lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId()); if (lastComparison != 0) { return lastComparison; } - if (isSetImageId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageId, other.imageId); + if (isSetImageBaseId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId); if (lastComparison != 0) { return lastComparison; } @@ -17515,11 +18626,11 @@ public class SatelliteServer { } first = false; if (!first) sb.append(", "); - sb.append("imageId:"); - if (this.imageId == null) { + sb.append("imageBaseId:"); + if (this.imageBaseId == null) { sb.append("null"); } else { - sb.append(this.imageId); + sb.append(this.imageBaseId); } first = false; if (!first) sb.append(", "); @@ -17581,10 +18692,10 @@ public class SatelliteServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // IMAGE_ID + case 2: // IMAGE_BASE_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.imageId = iprot.readString(); - struct.setImageIdIsSet(true); + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -17592,16 +18703,16 @@ public class SatelliteServer { case 3: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map106 = iprot.readMapBegin(); - struct.permissions = new HashMap<String,ImagePermissions>(2*_map106.size); - for (int _i107 = 0; _i107 < _map106.size; ++_i107) + org.apache.thrift.protocol.TMap _map162 = iprot.readMapBegin(); + struct.permissions = new HashMap<String,ImagePermissions>(2*_map162.size); + for (int _i163 = 0; _i163 < _map162.size; ++_i163) { - String _key108; - ImagePermissions _val109; - _key108 = iprot.readString(); - _val109 = new ImagePermissions(); - _val109.read(iprot); - struct.permissions.put(_key108, _val109); + String _key164; + ImagePermissions _val165; + _key164 = iprot.readString(); + _val165 = new ImagePermissions(); + _val165.read(iprot); + struct.permissions.put(_key164, _val165); } iprot.readMapEnd(); } @@ -17630,19 +18741,19 @@ public class SatelliteServer { oprot.writeString(struct.userToken); oprot.writeFieldEnd(); } - if (struct.imageId != null) { - oprot.writeFieldBegin(IMAGE_ID_FIELD_DESC); - oprot.writeString(struct.imageId); + if (struct.imageBaseId != null) { + oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); + oprot.writeString(struct.imageBaseId); oprot.writeFieldEnd(); } if (struct.permissions != null) { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); - for (Map.Entry<String, ImagePermissions> _iter110 : struct.permissions.entrySet()) + for (Map.Entry<String, ImagePermissions> _iter166 : struct.permissions.entrySet()) { - oprot.writeString(_iter110.getKey()); - _iter110.getValue().write(oprot); + oprot.writeString(_iter166.getKey()); + _iter166.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -17669,7 +18780,7 @@ public class SatelliteServer { if (struct.isSetUserToken()) { optionals.set(0); } - if (struct.isSetImageId()) { + if (struct.isSetImageBaseId()) { optionals.set(1); } if (struct.isSetPermissions()) { @@ -17679,16 +18790,16 @@ public class SatelliteServer { if (struct.isSetUserToken()) { oprot.writeString(struct.userToken); } - if (struct.isSetImageId()) { - oprot.writeString(struct.imageId); + if (struct.isSetImageBaseId()) { + oprot.writeString(struct.imageBaseId); } if (struct.isSetPermissions()) { { oprot.writeI32(struct.permissions.size()); - for (Map.Entry<String, ImagePermissions> _iter111 : struct.permissions.entrySet()) + for (Map.Entry<String, ImagePermissions> _iter167 : struct.permissions.entrySet()) { - oprot.writeString(_iter111.getKey()); - _iter111.getValue().write(oprot); + oprot.writeString(_iter167.getKey()); + _iter167.getValue().write(oprot); } } } @@ -17703,21 +18814,21 @@ public class SatelliteServer { struct.setUserTokenIsSet(true); } if (incoming.get(1)) { - struct.imageId = iprot.readString(); - struct.setImageIdIsSet(true); + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map112 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.permissions = new HashMap<String,ImagePermissions>(2*_map112.size); - for (int _i113 = 0; _i113 < _map112.size; ++_i113) + org.apache.thrift.protocol.TMap _map168 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.permissions = new HashMap<String,ImagePermissions>(2*_map168.size); + for (int _i169 = 0; _i169 < _map168.size; ++_i169) { - String _key114; - ImagePermissions _val115; - _key114 = iprot.readString(); - _val115 = new ImagePermissions(); - _val115.read(iprot); - struct.permissions.put(_key114, _val115); + String _key170; + ImagePermissions _val171; + _key170 = iprot.readString(); + _val171 = new ImagePermissions(); + _val171.read(iprot); + struct.permissions.put(_key170, _val171); } } struct.setPermissionsIsSet(true); @@ -19207,16 +20318,16 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map116 = iprot.readMapBegin(); - struct.success = new HashMap<String,ImagePermissions>(2*_map116.size); - for (int _i117 = 0; _i117 < _map116.size; ++_i117) + org.apache.thrift.protocol.TMap _map172 = iprot.readMapBegin(); + struct.success = new HashMap<String,ImagePermissions>(2*_map172.size); + for (int _i173 = 0; _i173 < _map172.size; ++_i173) { - String _key118; - ImagePermissions _val119; - _key118 = iprot.readString(); - _val119 = new ImagePermissions(); - _val119.read(iprot); - struct.success.put(_key118, _val119); + String _key174; + ImagePermissions _val175; + _key174 = iprot.readString(); + _val175 = new ImagePermissions(); + _val175.read(iprot); + struct.success.put(_key174, _val175); } iprot.readMapEnd(); } @@ -19262,10 +20373,10 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Map.Entry<String, ImagePermissions> _iter120 : struct.success.entrySet()) + for (Map.Entry<String, ImagePermissions> _iter176 : struct.success.entrySet()) { - oprot.writeString(_iter120.getKey()); - _iter120.getValue().write(oprot); + oprot.writeString(_iter176.getKey()); + _iter176.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -19312,10 +20423,10 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry<String, ImagePermissions> _iter121 : struct.success.entrySet()) + for (Map.Entry<String, ImagePermissions> _iter177 : struct.success.entrySet()) { - oprot.writeString(_iter121.getKey()); - _iter121.getValue().write(oprot); + oprot.writeString(_iter177.getKey()); + _iter177.getValue().write(oprot); } } } @@ -19333,16 +20444,16 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map122 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new HashMap<String,ImagePermissions>(2*_map122.size); - for (int _i123 = 0; _i123 < _map122.size; ++_i123) + org.apache.thrift.protocol.TMap _map178 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap<String,ImagePermissions>(2*_map178.size); + for (int _i179 = 0; _i179 < _map178.size; ++_i179) { - String _key124; - ImagePermissions _val125; - _key124 = iprot.readString(); - _val125 = new ImagePermissions(); - _val125.read(iprot); - struct.success.put(_key124, _val125); + String _key180; + ImagePermissions _val181; + _key180 = iprot.readString(); + _val181 = new ImagePermissions(); + _val181.read(iprot); + struct.success.put(_key180, _val181); } } struct.setSuccessIsSet(true); @@ -22134,14 +23245,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list126 = iprot.readListBegin(); - struct.success = new ArrayList<LectureSummary>(_list126.size); - for (int _i127 = 0; _i127 < _list126.size; ++_i127) + org.apache.thrift.protocol.TList _list182 = iprot.readListBegin(); + struct.success = new ArrayList<LectureSummary>(_list182.size); + for (int _i183 = 0; _i183 < _list182.size; ++_i183) { - LectureSummary _elem128; - _elem128 = new LectureSummary(); - _elem128.read(iprot); - struct.success.add(_elem128); + LectureSummary _elem184; + _elem184 = new LectureSummary(); + _elem184.read(iprot); + struct.success.add(_elem184); } iprot.readListEnd(); } @@ -22178,9 +23289,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (LectureSummary _iter129 : struct.success) + for (LectureSummary _iter185 : struct.success) { - _iter129.write(oprot); + _iter185.write(oprot); } oprot.writeListEnd(); } @@ -22219,9 +23330,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (LectureSummary _iter130 : struct.success) + for (LectureSummary _iter186 : struct.success) { - _iter130.write(oprot); + _iter186.write(oprot); } } } @@ -22236,14 +23347,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<LectureSummary>(_list131.size); - for (int _i132 = 0; _i132 < _list131.size; ++_i132) + org.apache.thrift.protocol.TList _list187 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<LectureSummary>(_list187.size); + for (int _i188 = 0; _i188 < _list187.size; ++_i188) { - LectureSummary _elem133; - _elem133 = new LectureSummary(); - _elem133.read(iprot); - struct.success.add(_elem133); + LectureSummary _elem189; + _elem189 = new LectureSummary(); + _elem189.read(iprot); + struct.success.add(_elem189); } } struct.setSuccessIsSet(true); @@ -24192,14 +25303,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list134 = iprot.readListBegin(); - struct.success = new ArrayList<LectureSummary>(_list134.size); - for (int _i135 = 0; _i135 < _list134.size; ++_i135) + org.apache.thrift.protocol.TList _list190 = iprot.readListBegin(); + struct.success = new ArrayList<LectureSummary>(_list190.size); + for (int _i191 = 0; _i191 < _list190.size; ++_i191) { - LectureSummary _elem136; - _elem136 = new LectureSummary(); - _elem136.read(iprot); - struct.success.add(_elem136); + LectureSummary _elem192; + _elem192 = new LectureSummary(); + _elem192.read(iprot); + struct.success.add(_elem192); } iprot.readListEnd(); } @@ -24245,9 +25356,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (LectureSummary _iter137 : struct.success) + for (LectureSummary _iter193 : struct.success) { - _iter137.write(oprot); + _iter193.write(oprot); } oprot.writeListEnd(); } @@ -24294,9 +25405,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (LectureSummary _iter138 : struct.success) + for (LectureSummary _iter194 : struct.success) { - _iter138.write(oprot); + _iter194.write(oprot); } } } @@ -24314,14 +25425,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList<LectureSummary>(_list139.size); - for (int _i140 = 0; _i140 < _list139.size; ++_i140) + org.apache.thrift.protocol.TList _list195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList<LectureSummary>(_list195.size); + for (int _i196 = 0; _i196 < _list195.size; ++_i196) { - LectureSummary _elem141; - _elem141 = new LectureSummary(); - _elem141.read(iprot); - struct.success.add(_elem141); + LectureSummary _elem197; + _elem197 = new LectureSummary(); + _elem197.read(iprot); + struct.success.add(_elem197); } } struct.setSuccessIsSet(true); @@ -25837,16 +26948,16 @@ public class SatelliteServer { case 3: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin(); - struct.permissions = new HashMap<String,LecturePermissions>(2*_map142.size); - for (int _i143 = 0; _i143 < _map142.size; ++_i143) + org.apache.thrift.protocol.TMap _map198 = iprot.readMapBegin(); + struct.permissions = new HashMap<String,LecturePermissions>(2*_map198.size); + for (int _i199 = 0; _i199 < _map198.size; ++_i199) { - String _key144; - LecturePermissions _val145; - _key144 = iprot.readString(); - _val145 = new LecturePermissions(); - _val145.read(iprot); - struct.permissions.put(_key144, _val145); + String _key200; + LecturePermissions _val201; + _key200 = iprot.readString(); + _val201 = new LecturePermissions(); + _val201.read(iprot); + struct.permissions.put(_key200, _val201); } iprot.readMapEnd(); } @@ -25884,10 +26995,10 @@ public class SatelliteServer { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); - for (Map.Entry<String, LecturePermissions> _iter146 : struct.permissions.entrySet()) + for (Map.Entry<String, LecturePermissions> _iter202 : struct.permissions.entrySet()) { - oprot.writeString(_iter146.getKey()); - _iter146.getValue().write(oprot); + oprot.writeString(_iter202.getKey()); + _iter202.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -25930,10 +27041,10 @@ public class SatelliteServer { if (struct.isSetPermissions()) { { oprot.writeI32(struct.permissions.size()); - for (Map.Entry<String, LecturePermissions> _iter147 : struct.permissions.entrySet()) + for (Map.Entry<String, LecturePermissions> _iter203 : struct.permissions.entrySet()) { - oprot.writeString(_iter147.getKey()); - _iter147.getValue().write(oprot); + oprot.writeString(_iter203.getKey()); + _iter203.getValue().write(oprot); } } } @@ -25953,16 +27064,16 @@ public class SatelliteServer { } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map148 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.permissions = new HashMap<String,LecturePermissions>(2*_map148.size); - for (int _i149 = 0; _i149 < _map148.size; ++_i149) + org.apache.thrift.protocol.TMap _map204 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.permissions = new HashMap<String,LecturePermissions>(2*_map204.size); + for (int _i205 = 0; _i205 < _map204.size; ++_i205) { - String _key150; - LecturePermissions _val151; - _key150 = iprot.readString(); - _val151 = new LecturePermissions(); - _val151.read(iprot); - struct.permissions.put(_key150, _val151); + String _key206; + LecturePermissions _val207; + _key206 = iprot.readString(); + _val207 = new LecturePermissions(); + _val207.read(iprot); + struct.permissions.put(_key206, _val207); } } struct.setPermissionsIsSet(true); @@ -27452,16 +28563,16 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map152 = iprot.readMapBegin(); - struct.success = new HashMap<String,LecturePermissions>(2*_map152.size); - for (int _i153 = 0; _i153 < _map152.size; ++_i153) + org.apache.thrift.protocol.TMap _map208 = iprot.readMapBegin(); + struct.success = new HashMap<String,LecturePermissions>(2*_map208.size); + for (int _i209 = 0; _i209 < _map208.size; ++_i209) { - String _key154; - LecturePermissions _val155; - _key154 = iprot.readString(); - _val155 = new LecturePermissions(); - _val155.read(iprot); - struct.success.put(_key154, _val155); + String _key210; + LecturePermissions _val211; + _key210 = iprot.readString(); + _val211 = new LecturePermissions(); + _val211.read(iprot); + struct.success.put(_key210, _val211); } iprot.readMapEnd(); } @@ -27507,10 +28618,10 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Map.Entry<String, LecturePermissions> _iter156 : struct.success.entrySet()) + for (Map.Entry<String, LecturePermissions> _iter212 : struct.success.entrySet()) { - oprot.writeString(_iter156.getKey()); - _iter156.getValue().write(oprot); + oprot.writeString(_iter212.getKey()); + _iter212.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -27557,10 +28668,10 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry<String, LecturePermissions> _iter157 : struct.success.entrySet()) + for (Map.Entry<String, LecturePermissions> _iter213 : struct.success.entrySet()) { - oprot.writeString(_iter157.getKey()); - _iter157.getValue().write(oprot); + oprot.writeString(_iter213.getKey()); + _iter213.getValue().write(oprot); } } } @@ -27578,16 +28689,16 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map158 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new HashMap<String,LecturePermissions>(2*_map158.size); - for (int _i159 = 0; _i159 < _map158.size; ++_i159) + org.apache.thrift.protocol.TMap _map214 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap<String,LecturePermissions>(2*_map214.size); + for (int _i215 = 0; _i215 < _map214.size; ++_i215) { - String _key160; - LecturePermissions _val161; - _key160 = iprot.readString(); - _val161 = new LecturePermissions(); - _val161.read(iprot); - struct.success.put(_key160, _val161); + String _key216; + LecturePermissions _val217; + _key216 = iprot.readString(); + _val217 = new LecturePermissions(); + _val217.read(iprot); + struct.success.put(_key216, _val217); } } struct.setSuccessIsSet(true); |