/**
* 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 LectureSummary implements org.apache.thrift.TBase<LectureSummary, LectureSummary._Fields>, java.io.Serializable, Cloneable, Comparable<LectureSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureSummary");
private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)1);
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 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 IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new LectureSummaryStandardSchemeFactory());
schemes.put(TupleScheme.class, new LectureSummaryTupleSchemeFactory());
}
public String lectureId; // required
public String lectureName; // required
public String imageVersionId; // required
public String imageName; // required
public boolean isEnabled; // required
public long startTime; // required
public long endTime; // required
public long lastUsed; // required
public int useCount; // required
public String ownerId; // required
public String updaterId; // required
public boolean isExam; // required
public boolean hasInternetAccess; // required
public LecturePermissions defaultPermissions; // required
public LecturePermissions userPermissions; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
LECTURE_ID((short)1, "lectureId"),
LECTURE_NAME((short)2, "lectureName"),
IMAGE_VERSION_ID((short)3, "imageVersionId"),
IMAGE_NAME((short)4, "imageName"),
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");
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: // LECTURE_ID
return LECTURE_ID;
case 2: // LECTURE_NAME
return LECTURE_NAME;
case 3: // IMAGE_VERSION_ID
return IMAGE_VERSION_ID;
case 4: // IMAGE_NAME
return IMAGE_NAME;
case 5: // IS_ENABLED
return IS_ENABLED;
case 6: // START_TIME
return START_TIME;
case 7: // END_TIME
return END_TIME;
case 8: // LAST_USED
return LAST_USED;
case 9: // USE_COUNT
return USE_COUNT;
case 10: // OWNER_ID
return OWNER_ID;
case 11: // UPDATER_ID
return UPDATER_ID;
case 12: // IS_EXAM
return IS_EXAM;
case 13: // HAS_INTERNET_ACCESS
return HAS_INTERNET_ACCESS;
case 14: // DEFAULT_PERMISSIONS
return DEFAULT_PERMISSIONS;
case 15: // USER_PERMISSIONS
return USER_PERMISSIONS;
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 __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 byte __isset_bitfield = 0;
private _Fields optionals[] = {_Fields.USER_PERMISSIONS};
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.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", org.apache.thrift.TFieldRequirementType.DEFAULT,
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.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
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,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
tmpMap.put(_Fields.LAST_USED, new org.apache.thrift.meta_data.FieldMetaData("lastUsed", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
tmpMap.put(_Fields.USE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("useCount", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
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.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.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,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.DEFAULT_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultPermissions", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class)));
tmpMap.put(_Fields.USER_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("userPermissions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LectureSummary.class, metaDataMap);
}
public LectureSummary() {
}
public LectureSummary(
String lectureId,
String lectureName,
String imageVersionId,
String imageName,
boolean isEnabled,
long startTime,
long endTime,
long lastUsed,
int useCount,
String ownerId,
String updaterId,
boolean isExam,
boolean hasInternetAccess,
LecturePermissions defaultPermissions)
{
this();
this.lectureId = lectureId;
this.lectureName = lectureName;
this.imageVersionId = imageVersionId;
this.imageName = imageName;
this.isEnabled = isEnabled;
setIsEnabledIsSet(true);
this.startTime = startTime;
setStartTimeIsSet(true);
this.endTime = endTime;
setEndTimeIsSet(true);
this.lastUsed = lastUsed;
setLastUsedIsSet(true);
this.useCount = useCount;
setUseCountIsSet(true);
this.ownerId = ownerId;
this.updaterId = updaterId;
this.isExam = isExam;
setIsExamIsSet(true);
this.hasInternetAccess = hasInternetAccess;
setHasInternetAccessIsSet(true);
this.defaultPermissions = defaultPermissions;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public LectureSummary(LectureSummary other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetLectureId()) {
this.lectureId = other.lectureId;
}
if (other.isSetLectureName()) {
this.lectureName = other.lectureName;
}
if (other.isSetImageVersionId()) {
this.imageVersionId = other.imageVersionId;
}
if (other.isSetImageName()) {
this.imageName = other.imageName;
}
this.isEnabled = other.isEnabled;
this.startTime = other.startTime;
this.endTime = other.endTime;
this.lastUsed = other.lastUsed;
this.useCount = other.useCount;
if (other.isSetOwnerId()) {
this.ownerId = other.ownerId;
}
if (other.isSetUpdaterId()) {
this.updaterId = other.updaterId;
}
this.isExam = other.isExam;
this.hasInternetAccess = other.hasInternetAccess;
if (other.isSetDefaultPermissions()) {
this.defaultPermissions = new LecturePermissions(other.defaultPermissions);
}
if (other.isSetUserPermissions()) {
this.userPermissions = new LecturePermissions(other.userPermissions);
}
}
public LectureSummary deepCopy() {
return new LectureSummary(this);
}
@Override
public void clear() {
this.lectureId = null;
this.lectureName = null;
this.imageVersionId = null;
this.imageName = null;
setIsEnabledIsSet(false);
this.isEnabled = false;
setStartTimeIsSet(false);
this.startTime = 0;
setEndTimeIsSet(false);
this.endTime = 0;
setLastUsedIsSet(false);
this.lastUsed = 0;
setUseCountIsSet(false);
this.useCount = 0;
this.ownerId = null;
this.updaterId = null;
setIsExamIsSet(false);
this.isExam = false;
setHasInternetAccessIsSet(false);
this.hasInternetAccess = false;
this.defaultPermissions = null;
this.userPermissions = null;
}
public String getLectureId() {
return this.lectureId;
}
public LectureSummary setLectureId(String lectureId) {
this.lectureId = lectureId;
return this;
}
public void unsetLectureId() {
this.lectureId = null;
}
/** Returns true if field lectureId is set (has been assigned a value) and false otherwise */
public boolean isSetLectureId() {
return this.lectureId != null;
}
public void setLectureIdIsSet(boolean value) {
if (!value) {
this.lectureId = null;
}
}
public String getLectureName() {
return this.lectureName;
}
public LectureSummary setLectureName(String lectureName) {
this.lectureName = lectureName;
return this;
}
public void unsetLectureName() {
this.lectureName = null;
}
/** Returns true if field lectureName is set (has been assigned a value) and false otherwise */
public boolean isSetLectureName() {
return this.lectureName != null;
}
public void setLectureNameIsSet(boolean value) {
if (!value) {
this.lectureName = null;
}
}
public String getImageVersionId() {
return this.imageVersionId;
}
public LectureSummary setImageVersionId(String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
public void unsetImageVersionId() {
this.imageVersionId = null;
}
/** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */
public boolean isSetImageVersionId() {
return this.imageVersionId != null;
}
public void setImageVersionIdIsSet(boolean value) {
if (!value) {
this.imageVersionId = null;
}
}
public String getImageName() {
return this.imageName;
}
public LectureSummary setImageName(String imageName) {
this.imageName = imageName;
return this;
}
public void unsetImageName() {
this.imageName = null;
}
/** Returns true if field imageName is set (has been assigned a value) and false otherwise */
public boolean isSetImageName() {
return this.imageName != null;
}
public void setImageNameIsSet(boolean value) {
if (!value) {
this.imageName = null;
}
}
public boolean isIsEnabled() {
return this.isEnabled;
}
public LectureSummary setIsEnabled(boolean isEnabled) {
this.isEnabled = isEnabled;
setIsEnabledIsSet(true);
return this;
}
public void unsetIsEnabled() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
}
/** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
public boolean isSetIsEnabled() {
return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
}
public void setIsEnabledIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
}
public long getStartTime() {
return this.startTime;
}
public LectureSummary setStartTime(long startTime) {
this.startTime = startTime;
setStartTimeIsSet(true);
return this;
}
public void unsetStartTime() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
/** Returns true if field startTime is set (has been assigned a value) and false otherwise */
public boolean isSetStartTime() {
return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
public void setStartTimeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
}
public long getEndTime() {
return this.endTime;
}
public LectureSummary setEndTime(long endTime) {
this.endTime = endTime;
setEndTimeIsSet(true);
return this;
}
public void unsetEndTime() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
/** Returns true if field endTime is set (has been assigned a value) and false otherwise */
public boolean isSetEndTime() {
return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
public void setEndTimeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
}
public long getLastUsed() {
return this.lastUsed;
}
public LectureSummary setLastUsed(long lastUsed) {
this.lastUsed = lastUsed;
setLastUsedIsSet(true);
return this;
}
public void unsetLastUsed() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTUSED_ISSET_ID);
}
/** Returns true if field lastUsed is set (has been assigned a value) and false otherwise */
public boolean isSetLastUsed() {
return EncodingUtils.testBit(__isset_bitfield, __LASTUSED_ISSET_ID);
}
public void setLastUsedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTUSED_ISSET_ID, value);
}
public int getUseCount() {
return this.useCount;
}
public LectureSummary setUseCount(int useCount) {
this.useCount = useCount;
setUseCountIsSet(true);
return this;
}
public void unsetUseCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USECOUNT_ISSET_ID);
}
/** Returns true if field useCount is set (has been assigned a value) and false otherwise */
public boolean isSetUseCount() {
return EncodingUtils.testBit(__isset_bitfield, __USECOUNT_ISSET_ID);
}
public void setUseCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USECOUNT_ISSET_ID, value);
}
public String getOwnerId() {
return this.ownerId;
}
public LectureSummary setOwnerId(String ownerId) {
this.ownerId = ownerId;
return this;
}
public void unsetOwnerId() {
this.ownerId = null;
}
/** Returns true if field ownerId is set (has been assigned a value) and false otherwise */
public boolean isSetOwnerId() {
return this.ownerId != null;
}
public void setOwnerIdIsSet(boolean value) {
if (!value) {
this.ownerId = null;
}
}
public String getUpdaterId() {
return this.updaterId;
}
public LectureSummary setUpdaterId(String updaterId) {
this.updaterId = updaterId;
return this;
}
public void unsetUpdaterId() {
this.updaterId = null;
}
/** Returns true if field updaterId is set (has been assigned a value) and false otherwise */
public boolean isSetUpdaterId() {
return this.updaterId != null;
}
public void setUpdaterIdIsSet(boolean value) {
if (!value) {
this.updaterId = null;
}
}
public boolean isIsExam() {
return this.isExam;
}
public LectureSummary setIsExam(boolean isExam) {
this.isExam = isExam;
setIsExamIsSet(true);
return this;
}
public void unsetIsExam() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
}
/** Returns true if field isExam is set (has been assigned a value) and false otherwise */
public boolean isSetIsExam() {
return EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
}
public void setIsExamIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
}
public boolean isHasInternetAccess() {
return this.hasInternetAccess;
}
public LectureSummary setHasInternetAccess(boolean hasInternetAccess) {
this.hasInternetAccess = hasInternetAccess;
setHasInternetAccessIsSet(true);
return this;
}
public void unsetHasInternetAccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
}
/** Returns true if field hasInternetAccess is set (has been assigned a value) and false otherwise */
public boolean isSetHasInternetAccess() {
return EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
}
public void setHasInternetAccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
}
public LecturePermissions getDefaultPermissions() {
return this.defaultPermissions;
}
public LectureSummary setDefaultPermissions(LecturePermissions defaultPermissions) {
this.defaultPermissions = defaultPermissions;
return this;
}
public void unsetDefaultPermissions() {
this.defaultPermissions = null;
}
/** Returns true if field defaultPermissions is set (has been assigned a value) and false otherwise */
public boolean isSetDefaultPermissions() {
return this.defaultPermissions != null;
}
public void setDefaultPermissionsIsSet(boolean value) {
if (!value) {
this.defaultPermissions = null;
}
}
public LecturePermissions getUserPermissions() {
return this.userPermissions;
}
public LectureSummary setUserPermissions(LecturePermissions userPermissions) {
this.userPermissions = userPermissions;
return this;
}
public void unsetUserPermissions() {
this.userPermissions = null;
}
/** Returns true if field userPermissions is set (has been assigned a value) and false otherwise */
public boolean isSetUserPermissions() {
return this.userPermissions != null;
}
public void setUserPermissionsIsSet(boolean value) {
if (!value) {
this.userPermissions = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case LECTURE_ID:
if (value == null) {
unsetLectureId();
} else {
setLectureId((String)value);
}
break;
case LECTURE_NAME:
if (value == null) {
unsetLectureName();
} else {
setLectureName((String)value);
}
break;
case IMAGE_VERSION_ID:
if (value == null) {
unsetImageVersionId();
} else {
setImageVersionId((String)value);
}
break;
case IMAGE_NAME:
if (value == null) {
unsetImageName();
} else {
setImageName((String)value);
}
break;
case IS_ENABLED:
if (value == null) {
unsetIsEnabled();
} else {
setIsEnabled((Boolean)value);
}
break;
case START_TIME:
if (value == null) {
unsetStartTime();
} else {
setStartTime((Long)value);
}
break;
case END_TIME:
if (value == null) {
unsetEndTime();
} else {
setEndTime((Long)value);
}
break;
case LAST_USED:
if (value == null) {
unsetLastUsed();
} else {
setLastUsed((Long)value);
}
break;
case USE_COUNT:
if (value == null) {
unsetUseCount();
} else {
setUseCount((Integer)value);
}
break;
case OWNER_ID:
if (value == null) {
unsetOwnerId();
} else {
setOwnerId((String)value);
}
break;
case UPDATER_ID:
if (value == null) {
unsetUpdaterId();
} else {
setUpdaterId((String)value);
}
break;
case IS_EXAM:
if (value == null) {
unsetIsExam();
} else {
setIsExam((Boolean)value);
}
break;
case HAS_INTERNET_ACCESS:
if (value == null) {
unsetHasInternetAccess();
} else {
setHasInternetAccess((Boolean)value);
}
break;
case DEFAULT_PERMISSIONS:
if (value == null) {
unsetDefaultPermissions();
} else {
setDefaultPermissions((LecturePermissions)value);
}
break;
case USER_PERMISSIONS:
if (value == null) {
unsetUserPermissions();
} else {
setUserPermissions((LecturePermissions)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case LECTURE_ID:
return getLectureId();
case LECTURE_NAME:
return getLectureName();
case IMAGE_VERSION_ID:
return getImageVersionId();
case IMAGE_NAME:
return getImageName();
case IS_ENABLED:
return Boolean.valueOf(isIsEnabled());
case START_TIME:
return Long.valueOf(getStartTime());
case END_TIME:
return Long.valueOf(getEndTime());
case LAST_USED:
return Long.valueOf(getLastUsed());
case USE_COUNT:
return Integer.valueOf(getUseCount());
case OWNER_ID:
return getOwnerId();
case UPDATER_ID:
return getUpdaterId();
case IS_EXAM:
return Boolean.valueOf(isIsExam());
case HAS_INTERNET_ACCESS:
return Boolean.valueOf(isHasInternetAccess());
case DEFAULT_PERMISSIONS:
return getDefaultPermissions();
case USER_PERMISSIONS:
return getUserPermissions();
}
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 LECTURE_ID:
return isSetLectureId();
case LECTURE_NAME:
return isSetLectureName();
case IMAGE_VERSION_ID:
return isSetImageVersionId();
case IMAGE_NAME:
return isSetImageName();
case IS_ENABLED:
return isSetIsEnabled();
case START_TIME:
return isSetStartTime();
case END_TIME:
return isSetEndTime();
case LAST_USED:
return isSetLastUsed();
case USE_COUNT:
return isSetUseCount();
case OWNER_ID:
return isSetOwnerId();
case UPDATER_ID:
return isSetUpdaterId();
case IS_EXAM:
return isSetIsExam();
case HAS_INTERNET_ACCESS:
return isSetHasInternetAccess();
case DEFAULT_PERMISSIONS:
return isSetDefaultPermissions();
case USER_PERMISSIONS:
return isSetUserPermissions();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof LectureSummary)
return this.equals((LectureSummary)that);
return false;
}
public boolean equals(LectureSummary that) {
if (that == null)
return false;
boolean this_present_lectureId = true && this.isSetLectureId();
boolean that_present_lectureId = true && that.isSetLectureId();
if (this_present_lectureId || that_present_lectureId) {
if (!(this_present_lectureId && that_present_lectureId))
return false;
if (!this.lectureId.equals(that.lectureId))
return false;
}
boolean this_present_lectureName = true && this.isSetLectureName();
boolean that_present_lectureName = true && that.isSetLectureName();
if (this_present_lectureName || that_present_lectureName) {
if (!(this_present_lectureName && that_present_lectureName))
return false;
if (!this.lectureName.equals(that.lectureName))
return false;
}
boolean this_present_imageVersionId = true && this.isSetImageVersionId();
boolean that_present_imageVersionId = true && that.isSetImageVersionId();
if (this_present_imageVersionId || that_present_imageVersionId) {
if (!(this_present_imageVersionId && that_present_imageVersionId))
return false;
if (!this.imageVersionId.equals(that.imageVersionId))
return false;
}
boolean this_present_imageName = true && this.isSetImageName();
boolean that_present_imageName = true && that.isSetImageName();
if (this_present_imageName || that_present_imageName) {
if (!(this_present_imageName && that_present_imageName))
return false;
if (!this.imageName.equals(that.imageName))
return false;
}
boolean this_present_isEnabled = true;
boolean that_present_isEnabled = true;
if (this_present_isEnabled || that_present_isEnabled) {
if (!(this_present_isEnabled && that_present_isEnabled))
return false;
if (this.isEnabled != that.isEnabled)
return false;
}
boolean this_present_startTime = true;
boolean that_present_startTime = true;
if (this_present_startTime || that_present_startTime) {
if (!(this_present_startTime && that_present_startTime))
return false;
if (this.startTime != that.startTime)
return false;
}
boolean this_present_endTime = true;
boolean that_present_endTime = true;
if (this_present_endTime || that_present_endTime) {
if (!(this_present_endTime && that_present_endTime))
return false;
if (this.endTime != that.endTime)
return false;
}
boolean this_present_lastUsed = true;
boolean that_present_lastUsed = true;
if (this_present_lastUsed || that_present_lastUsed) {
if (!(this_present_lastUsed && that_present_lastUsed))
return false;
if (this.lastUsed != that.lastUsed)
return false;
}
boolean this_present_useCount = true;
boolean that_present_useCount = true;
if (this_present_useCount || that_present_useCount) {
if (!(this_present_useCount && that_present_useCount))
return false;
if (this.useCount != that.useCount)
return false;
}
boolean this_present_ownerId = true && this.isSetOwnerId();
boolean that_present_ownerId = true && that.isSetOwnerId();
if (this_present_ownerId || that_present_ownerId) {
if (!(this_present_ownerId && that_present_ownerId))
return false;
if (!this.ownerId.equals(that.ownerId))
return false;
}
boolean this_present_updaterId = true && this.isSetUpdaterId();
boolean that_present_updaterId = true && that.isSetUpdaterId();
if (this_present_updaterId || that_present_updaterId) {
if (!(this_present_updaterId && that_present_updaterId))
return false;
if (!this.updaterId.equals(that.updaterId))
return false;
}
boolean this_present_isExam = true;
boolean that_present_isExam = true;
if (this_present_isExam || that_present_isExam) {
if (!(this_present_isExam && that_present_isExam))
return false;
if (this.isExam != that.isExam)
return false;
}
boolean this_present_hasInternetAccess = true;
boolean that_present_hasInternetAccess = true;
if (this_present_hasInternetAccess || that_present_hasInternetAccess) {
if (!(this_present_hasInternetAccess && that_present_hasInternetAccess))
return false;
if (this.hasInternetAccess != that.hasInternetAccess)
return false;
}
boolean this_present_defaultPermissions = true && this.isSetDefaultPermissions();
boolean that_present_defaultPermissions = true && that.isSetDefaultPermissions();
if (this_present_defaultPermissions || that_present_defaultPermissions) {
if (!(this_present_defaultPermissions && that_present_defaultPermissions))
return false;
if (!this.defaultPermissions.equals(that.defaultPermissions))
return false;
}
boolean this_present_userPermissions = true && this.isSetUserPermissions();
boolean that_present_userPermissions = true && that.isSetUserPermissions();
if (this_present_userPermissions || that_present_userPermissions) {
if (!(this_present_userPermissions && that_present_userPermissions))
return false;
if (!this.userPermissions.equals(that.userPermissions))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(LectureSummary other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLectureId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureId, other.lectureId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLectureName()).compareTo(other.isSetLectureName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLectureName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lectureName, other.lectureName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetImageVersionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetImageName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIsEnabled()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isEnabled, other.isEnabled);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStartTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, other.startTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEndTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetLastUsed()).compareTo(other.isSetLastUsed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLastUsed()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastUsed, other.lastUsed);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetUseCount()).compareTo(other.isSetUseCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUseCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.useCount, other.useCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOwnerId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetUpdaterId()).compareTo(other.isSetUpdaterId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpdaterId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updaterId, other.updaterId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIsExam()).compareTo(other.isSetIsExam());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIsExam()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isExam, other.isExam);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetHasInternetAccess()).compareTo(other.isSetHasInternetAccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHasInternetAccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasInternetAccess, other.hasInternetAccess);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDefaultPermissions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPermissions, other.defaultPermissions);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserPermissions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userPermissions, other.userPermissions);
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("LectureSummary(");
boolean first = true;
sb.append("lectureId:");
if (this.lectureId == null) {
sb.append("null");
} else {
sb.append(this.lectureId);
}
first = false;
if (!first) sb.append(", ");
sb.append("lectureName:");
if (this.lectureName == null) {
sb.append("null");
} else {
sb.append(this.lectureName);
}
first = false;
if (!first) sb.append(", ");
sb.append("imageVersionId:");
if (this.imageVersionId == null) {
sb.append("null");
} else {
sb.append(this.imageVersionId);
}
first = false;
if (!first) sb.append(", ");
sb.append("imageName:");
if (this.imageName == null) {
sb.append("null");
} else {
sb.append(this.imageName);
}
first = false;
if (!first) sb.append(", ");
sb.append("isEnabled:");
sb.append(this.isEnabled);
first = false;
if (!first) sb.append(", ");
sb.append("startTime:");
sb.append(this.startTime);
first = false;
if (!first) sb.append(", ");
sb.append("endTime:");
sb.append(this.endTime);
first = false;
if (!first) sb.append(", ");
sb.append("lastUsed:");
sb.append(this.lastUsed);
first = false;
if (!first) sb.append(", ");
sb.append("useCount:");
sb.append(this.useCount);
first = false;
if (!first) sb.append(", ");
sb.append("ownerId:");
if (this.ownerId == null) {
sb.append("null");
} else {
sb.append(this.ownerId);
}
first = false;
if (!first) sb.append(", ");
sb.append("updaterId:");
if (this.updaterId == null) {
sb.append("null");
} else {
sb.append(this.updaterId);
}
first = false;
if (!first) sb.append(", ");
sb.append("isExam:");
sb.append(this.isExam);
first = false;
if (!first) sb.append(", ");
sb.append("hasInternetAccess:");
sb.append(this.hasInternetAccess);
first = false;
if (!first) sb.append(", ");
sb.append("defaultPermissions:");
if (this.defaultPermissions == null) {
sb.append("null");
} else {
sb.append(this.defaultPermissions);
}
first = false;
if (isSetUserPermissions()) {
if (!first) sb.append(", ");
sb.append("userPermissions:");
if (this.userPermissions == null) {
sb.append("null");
} else {
sb.append(this.userPermissions);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (defaultPermissions != null) {
defaultPermissions.validate();
}
if (userPermissions != null) {
userPermissions.validate();
}
}
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 LectureSummaryStandardSchemeFactory implements SchemeFactory {
public LectureSummaryStandardScheme getScheme() {
return new LectureSummaryStandardScheme();
}
}
private static class LectureSummaryStandardScheme extends StandardScheme<LectureSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LectureSummary 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: // LECTURE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.lectureId = iprot.readString();
struct.setLectureIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // LECTURE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.lectureName = iprot.readString();
struct.setLectureNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // IMAGE_VERSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.imageVersionId = iprot.readString();
struct.setImageVersionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // IMAGE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.imageName = iprot.readString();
struct.setImageNameIsSet(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);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // START_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.startTime = iprot.readI64();
struct.setStartTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // END_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.endTime = iprot.readI64();
struct.setEndTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // LAST_USED
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.lastUsed = iprot.readI64();
struct.setLastUsedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // USE_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.useCount = iprot.readI32();
struct.setUseCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // OWNER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // UPDATER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.updaterId = iprot.readString();
struct.setUpdaterIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // IS_EXAM
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.isExam = iprot.readBool();
struct.setIsExamIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // HAS_INTERNET_ACCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.hasInternetAccess = iprot.readBool();
struct.setHasInternetAccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // DEFAULT_PERMISSIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.defaultPermissions = new LecturePermissions();
struct.defaultPermissions.read(iprot);
struct.setDefaultPermissionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 15: // USER_PERMISSIONS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.userPermissions = new LecturePermissions();
struct.userPermissions.read(iprot);
struct.setUserPermissionsIsSet(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, LectureSummary struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.lectureId != null) {
oprot.writeFieldBegin(LECTURE_ID_FIELD_DESC);
oprot.writeString(struct.lectureId);
oprot.writeFieldEnd();
}
if (struct.lectureName != null) {
oprot.writeFieldBegin(LECTURE_NAME_FIELD_DESC);
oprot.writeString(struct.lectureName);
oprot.writeFieldEnd();
}
if (struct.imageVersionId != null) {
oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
oprot.writeString(struct.imageVersionId);
oprot.writeFieldEnd();
}
if (struct.imageName != null) {
oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC);
oprot.writeString(struct.imageName);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC);
oprot.writeBool(struct.isEnabled);
oprot.writeFieldEnd();
oprot.writeFieldBegin(START_TIME_FIELD_DESC);
oprot.writeI64(struct.startTime);
oprot.writeFieldEnd();
oprot.writeFieldBegin(END_TIME_FIELD_DESC);
oprot.writeI64(struct.endTime);
oprot.writeFieldEnd();
oprot.writeFieldBegin(LAST_USED_FIELD_DESC);
oprot.writeI64(struct.lastUsed);
oprot.writeFieldEnd();
oprot.writeFieldBegin(USE_COUNT_FIELD_DESC);
oprot.writeI32(struct.useCount);
oprot.writeFieldEnd();
if (struct.ownerId != null) {
oprot.writeFieldBegin(OWNER_ID_FIELD_DESC);
oprot.writeString(struct.ownerId);
oprot.writeFieldEnd();
}
if (struct.updaterId != null) {
oprot.writeFieldBegin(UPDATER_ID_FIELD_DESC);
oprot.writeString(struct.updaterId);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(IS_EXAM_FIELD_DESC);
oprot.writeBool(struct.isExam);
oprot.writeFieldEnd();
oprot.writeFieldBegin(HAS_INTERNET_ACCESS_FIELD_DESC);
oprot.writeBool(struct.hasInternetAccess);
oprot.writeFieldEnd();
if (struct.defaultPermissions != null) {
oprot.writeFieldBegin(DEFAULT_PERMISSIONS_FIELD_DESC);
struct.defaultPermissions.write(oprot);
oprot.writeFieldEnd();
}
if (struct.userPermissions != null) {
if (struct.isSetUserPermissions()) {
oprot.writeFieldBegin(USER_PERMISSIONS_FIELD_DESC);
struct.userPermissions.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class LectureSummaryTupleSchemeFactory implements SchemeFactory {
public LectureSummaryTupleScheme getScheme() {
return new LectureSummaryTupleScheme();
}
}
private static class LectureSummaryTupleScheme extends TupleScheme<LectureSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LectureSummary struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetLectureId()) {
optionals.set(0);
}
if (struct.isSetLectureName()) {
optionals.set(1);
}
if (struct.isSetImageVersionId()) {
optionals.set(2);
}
if (struct.isSetImageName()) {
optionals.set(3);
}
if (struct.isSetIsEnabled()) {
optionals.set(4);
}
if (struct.isSetStartTime()) {
optionals.set(5);
}
if (struct.isSetEndTime()) {
optionals.set(6);
}
if (struct.isSetLastUsed()) {
optionals.set(7);
}
if (struct.isSetUseCount()) {
optionals.set(8);
}
if (struct.isSetOwnerId()) {
optionals.set(9);
}
if (struct.isSetUpdaterId()) {
optionals.set(10);
}
if (struct.isSetIsExam()) {
optionals.set(11);
}
if (struct.isSetHasInternetAccess()) {
optionals.set(12);
}
if (struct.isSetDefaultPermissions()) {
optionals.set(13);
}
if (struct.isSetUserPermissions()) {
optionals.set(14);
}
oprot.writeBitSet(optionals, 15);
if (struct.isSetLectureId()) {
oprot.writeString(struct.lectureId);
}
if (struct.isSetLectureName()) {
oprot.writeString(struct.lectureName);
}
if (struct.isSetImageVersionId()) {
oprot.writeString(struct.imageVersionId);
}
if (struct.isSetImageName()) {
oprot.writeString(struct.imageName);
}
if (struct.isSetIsEnabled()) {
oprot.writeBool(struct.isEnabled);
}
if (struct.isSetStartTime()) {
oprot.writeI64(struct.startTime);
}
if (struct.isSetEndTime()) {
oprot.writeI64(struct.endTime);
}
if (struct.isSetLastUsed()) {
oprot.writeI64(struct.lastUsed);
}
if (struct.isSetUseCount()) {
oprot.writeI32(struct.useCount);
}
if (struct.isSetOwnerId()) {
oprot.writeString(struct.ownerId);
}
if (struct.isSetUpdaterId()) {
oprot.writeString(struct.updaterId);
}
if (struct.isSetIsExam()) {
oprot.writeBool(struct.isExam);
}
if (struct.isSetHasInternetAccess()) {
oprot.writeBool(struct.hasInternetAccess);
}
if (struct.isSetDefaultPermissions()) {
struct.defaultPermissions.write(oprot);
}
if (struct.isSetUserPermissions()) {
struct.userPermissions.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LectureSummary struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(15);
if (incoming.get(0)) {
struct.lectureId = iprot.readString();
struct.setLectureIdIsSet(true);
}
if (incoming.get(1)) {
struct.lectureName = iprot.readString();
struct.setLectureNameIsSet(true);
}
if (incoming.get(2)) {
struct.imageVersionId = iprot.readString();
struct.setImageVersionIdIsSet(true);
}
if (incoming.get(3)) {
struct.imageName = iprot.readString();
struct.setImageNameIsSet(true);
}
if (incoming.get(4)) {
struct.isEnabled = iprot.readBool();
struct.setIsEnabledIsSet(true);
}
if (incoming.get(5)) {
struct.startTime = iprot.readI64();
struct.setStartTimeIsSet(true);
}
if (incoming.get(6)) {
struct.endTime = iprot.readI64();
struct.setEndTimeIsSet(true);
}
if (incoming.get(7)) {
struct.lastUsed = iprot.readI64();
struct.setLastUsedIsSet(true);
}
if (incoming.get(8)) {
struct.useCount = iprot.readI32();
struct.setUseCountIsSet(true);
}
if (incoming.get(9)) {
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(true);
}
if (incoming.get(10)) {
struct.updaterId = iprot.readString();
struct.setUpdaterIdIsSet(true);
}
if (incoming.get(11)) {
struct.isExam = iprot.readBool();
struct.setIsExamIsSet(true);
}
if (incoming.get(12)) {
struct.hasInternetAccess = iprot.readBool();
struct.setHasInternetAccessIsSet(true);
}
if (incoming.get(13)) {
struct.defaultPermissions = new LecturePermissions();
struct.defaultPermissions.read(iprot);
struct.setDefaultPermissionsIsSet(true);
}
if (incoming.get(14)) {
struct.userPermissions = new LecturePermissions();
struct.userPermissions.read(iprot);
struct.setUserPermissionsIsSet(true);
}
}
}
}