summaryrefslogblamecommitdiffstats
path: root/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
blob: 8f65fc94d337e549e57b9b9f241d17f3364eff02 (plain) (tree)








































                                                                                                                                                                                           















                                                                                                                                                                                                          










                                                                                                                                     
                                        






                                       



                                                     










                                                                                                                  















                                                         





















                                                                                      


                              
                            
                             
                            
                           
                          
                            
                           
                             
                           
                            
                          
                              
                            








                                      
                         
                                       
                                     
                                       
                                     
                                    








































                                                                                                     







                                                            












                                                                                                                                                    

                                                                                                                                                 













                                                                                                                                               










                                                                                                                                                               



















                                                                                                                                                                 
                       






                      



                                    








                                          

                                 











                               



                                               























                                                     
                                       










                                       

















                                                                                                       



















                                                                                 

                              











                             



                                  







































































































                                                                                                 






















                                                                                                


































































































































































                                                                                               












































































































































                                                                                                       































































































































                                                                                                        







                                      























































                                     































                                                   
















































                                                         


                                             




















                                            











                                    






























                                                                                                              

                               













                              







                                      




























































                                                                       








                                                                






























































                                                                   



































                                                                                   



























































































                                                                                                    









                                                                                                  





































































                                                                                                







































                                                                                                                



























































































                                                                                                                  



                                



































                                 































                                         















































































































                                                                                                                                    








                                                                                     






                                                                                     
                               






                                                                                     
                             






                                                                                     
                              






                                                                                     
                               






                                                                                     
                              






                                                                                     
                                






                                                                                     































































                                                                                     






                                                                                     
                                         






                                                                                     
                                         







                                                                                     
                                      










































                                                                                                                           


                                                    
























                                                     








































                                                                                                                                               















































                                                                                                                          
                                     

                         
                                    

                         
                                    

                         
                                  

                         
                                   

                         
                                   

                         
                                  

                          
                                    

                          
                                    

                          
                               

                          
                                       

                          















                                             











                                              


                                           




















                                            





























                                                          
















                                                                                                                         
                                             

















                                                



                                             


                                            
                            


                                           
                            


                                         
                            


                                          
                            


                                          
                             


                                            
                             


                                              












































                                                                                                                                                     


                                         
                             


                                                    
                             



                                                             
                             








                                                          
/**
 * 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 LectureRead implements org.apache.thrift.TBase<LectureRead, LectureRead._Fields>, java.io.Serializable, Cloneable, Comparable<LectureRead> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureRead");

  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 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 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 {
    schemes.put(StandardScheme.class, new LectureReadStandardSchemeFactory());
    schemes.put(TupleScheme.class, new LectureReadTupleSchemeFactory());
  }

  public String lectureId; // required
  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
  public long lastUsed; // required
  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
  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"),
    DESCRIPTION((short)3, "description"),
    IMAGE((short)4, "image"),
    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>();

    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: // DESCRIPTION
          return DESCRIPTION;
        case 4: // IMAGE
          return IMAGE;
        case 5: // AUTO_UPDATE
          return AUTO_UPDATE;
        case 6: // IS_ENABLED
          return IS_ENABLED;
        case 7: // START_TIME
          return START_TIME;
        case 8: // END_TIME
          return END_TIME;
        case 9: // LAST_USED
          return LAST_USED;
        case 10: // USE_COUNT
          return USE_COUNT;
        case 11: // OWNER_ID
          return OWNER_ID;
        case 12: // UPDATER_ID
          return UPDATER_ID;
        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 18: // HAS_INTERNET_ACCESS
          return HAS_INTERNET_ACCESS;
        case 19: // DEFAULT_PERMISSIONS
          return DEFAULT_PERMISSIONS;
        case 20: // 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 __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;
  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.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        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, 
        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.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, 
        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(LectureRead.class, metaDataMap);
  }

  public LectureRead() {
  }

  public LectureRead(
    String lectureId,
    String lectureName,
    String description,
    ImageSummaryRead image,
    boolean autoUpdate,
    boolean isEnabled,
    long startTime,
    long endTime,
    long lastUsed,
    int useCount,
    String ownerId,
    String updaterId,
    String runscript,
    List<String> nics,
    List<String> allowedUsers,
    List<NetRule> networkExceptions,
    boolean isExam,
    boolean hasInternetAccess,
    LecturePermissions defaultPermissions)
  {
    this();
    this.lectureId = lectureId;
    this.lectureName = lectureName;
    this.description = description;
    this.image = image;
    this.autoUpdate = autoUpdate;
    setAutoUpdateIsSet(true);
    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.runscript = runscript;
    this.nics = nics;
    this.allowedUsers = allowedUsers;
    this.networkExceptions = networkExceptions;
    this.isExam = isExam;
    setIsExamIsSet(true);
    this.hasInternetAccess = hasInternetAccess;
    setHasInternetAccessIsSet(true);
    this.defaultPermissions = defaultPermissions;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public LectureRead(LectureRead other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetLectureId()) {
      this.lectureId = other.lectureId;
    }
    if (other.isSetLectureName()) {
      this.lectureName = other.lectureName;
    }
    if (other.isSetDescription()) {
      this.description = other.description;
    }
    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;
    this.lastUsed = other.lastUsed;
    this.useCount = other.useCount;
    if (other.isSetOwnerId()) {
      this.ownerId = other.ownerId;
    }
    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()) {
      this.defaultPermissions = new LecturePermissions(other.defaultPermissions);
    }
    if (other.isSetUserPermissions()) {
      this.userPermissions = new LecturePermissions(other.userPermissions);
    }
  }

  public LectureRead deepCopy() {
    return new LectureRead(this);
  }

  @Override
  public void clear() {
    this.lectureId = null;
    this.lectureName = null;
    this.description = null;
    this.image = null;
    setAutoUpdateIsSet(false);
    this.autoUpdate = false;
    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;
    this.runscript = null;
    this.nics = null;
    this.allowedUsers = null;
    this.networkExceptions = null;
    setIsExamIsSet(false);
    this.isExam = false;
    setHasInternetAccessIsSet(false);
    this.hasInternetAccess = false;
    this.defaultPermissions = null;
    this.userPermissions = null;
  }

  public String getLectureId() {
    return this.lectureId;
  }

  public LectureRead 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 LectureRead 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 getDescription() {
    return this.description;
  }

  public LectureRead setDescription(String description) {
    this.description = description;
    return this;
  }

  public void unsetDescription() {
    this.description = null;
  }

  /** Returns true if field description is set (has been assigned a value) and false otherwise */
  public boolean isSetDescription() {
    return this.description != null;
  }

  public void setDescriptionIsSet(boolean value) {
    if (!value) {
      this.description = null;
    }
  }

  public ImageSummaryRead getImage() {
    return this.image;
  }

  public LectureRead setImage(ImageSummaryRead image) {
    this.image = image;
    return this;
  }

  public void unsetImage() {
    this.image = null;
  }

  /** Returns true if field image is set (has been assigned a value) and false otherwise */
  public boolean isSetImage() {
    return this.image != null;
  }

  public void setImageIsSet(boolean value) {
    if (!value) {
      this.image = null;
    }
  }

  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;
  }

  public LectureRead 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 LectureRead 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 LectureRead 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 LectureRead 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 LectureRead 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 LectureRead 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 LectureRead 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 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;
  }

  public LectureRead 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 LectureRead 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 LectureRead 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 LectureRead 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 DESCRIPTION:
      if (value == null) {
        unsetDescription();
      } else {
        setDescription((String)value);
      }
      break;

    case IMAGE:
      if (value == null) {
        unsetImage();
      } else {
        setImage((ImageSummaryRead)value);
      }
      break;

    case AUTO_UPDATE:
      if (value == null) {
        unsetAutoUpdate();
      } else {
        setAutoUpdate((Boolean)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 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();
      } 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 DESCRIPTION:
      return getDescription();

    case IMAGE:
      return getImage();

    case AUTO_UPDATE:
      return Boolean.valueOf(isAutoUpdate());

    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 RUNSCRIPT:
      return getRunscript();

    case NICS:
      return getNics();

    case ALLOWED_USERS:
      return getAllowedUsers();

    case NETWORK_EXCEPTIONS:
      return getNetworkExceptions();

    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 DESCRIPTION:
      return isSetDescription();
    case IMAGE:
      return isSetImage();
    case AUTO_UPDATE:
      return isSetAutoUpdate();
    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 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:
      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 LectureRead)
      return this.equals((LectureRead)that);
    return false;
  }

  public boolean equals(LectureRead 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_description = true && this.isSetDescription();
    boolean that_present_description = true && that.isSetDescription();
    if (this_present_description || that_present_description) {
      if (!(this_present_description && that_present_description))
        return false;
      if (!this.description.equals(that.description))
        return false;
    }

    boolean this_present_image = true && this.isSetImage();
    boolean that_present_image = true && that.isSetImage();
    if (this_present_image || that_present_image) {
      if (!(this_present_image && that_present_image))
        return false;
      if (!this.image.equals(that.image))
        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) {
      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_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) {
      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(LectureRead 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(isSetDescription()).compareTo(other.isSetDescription());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDescription()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetImage()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.image, other.image);
      if (lastComparison != 0) {
        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;
    }
    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(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;
    }
    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("LectureRead(");
    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("description:");
    if (this.description == null) {
      sb.append("null");
    } else {
      sb.append(this.description);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("image:");
    if (this.image == null) {
      sb.append("null");
    } else {
      sb.append(this.image);
    }
    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;
    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("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;
    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 (image != null) {
      image.validate();
    }
    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 LectureReadStandardSchemeFactory implements SchemeFactory {
    public LectureReadStandardScheme getScheme() {
      return new LectureReadStandardScheme();
    }
  }

  private static class LectureReadStandardScheme extends StandardScheme<LectureRead> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, LectureRead 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: // DESCRIPTION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.description = iprot.readString();
              struct.setDescriptionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // IMAGE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.image = new ImageSummaryRead();
              struct.image.read(iprot);
              struct.setImageIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          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);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // 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 8: // 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 9: // 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 10: // 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 11: // 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 12: // 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 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);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 18: // 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 19: // 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 20: // 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, LectureRead 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.description != null) {
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
        oprot.writeString(struct.description);
        oprot.writeFieldEnd();
      }
      if (struct.image != null) {
        oprot.writeFieldBegin(IMAGE_FIELD_DESC);
        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();
      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();
      }
      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();
      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 LectureReadTupleSchemeFactory implements SchemeFactory {
    public LectureReadTupleScheme getScheme() {
      return new LectureReadTupleScheme();
    }
  }

  private static class LectureReadTupleScheme extends TupleScheme<LectureRead> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, LectureRead 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.isSetDescription()) {
        optionals.set(2);
      }
      if (struct.isSetImage()) {
        optionals.set(3);
      }
      if (struct.isSetAutoUpdate()) {
        optionals.set(4);
      }
      if (struct.isSetIsEnabled()) {
        optionals.set(5);
      }
      if (struct.isSetStartTime()) {
        optionals.set(6);
      }
      if (struct.isSetEndTime()) {
        optionals.set(7);
      }
      if (struct.isSetLastUsed()) {
        optionals.set(8);
      }
      if (struct.isSetUseCount()) {
        optionals.set(9);
      }
      if (struct.isSetOwnerId()) {
        optionals.set(10);
      }
      if (struct.isSetUpdaterId()) {
        optionals.set(11);
      }
      if (struct.isSetRunscript()) {
        optionals.set(12);
      }
      if (struct.isSetNics()) {
        optionals.set(13);
      }
      if (struct.isSetAllowedUsers()) {
        optionals.set(14);
      }
      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);
      }
      if (struct.isSetLectureName()) {
        oprot.writeString(struct.lectureName);
      }
      if (struct.isSetDescription()) {
        oprot.writeString(struct.description);
      }
      if (struct.isSetImage()) {
        struct.image.write(oprot);
      }
      if (struct.isSetAutoUpdate()) {
        oprot.writeBool(struct.autoUpdate);
      }
      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.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);
      }
      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, LectureRead struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(20);
      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.description = iprot.readString();
        struct.setDescriptionIsSet(true);
      }
      if (incoming.get(3)) {
        struct.image = new ImageSummaryRead();
        struct.image.read(iprot);
        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(6)) {
        struct.startTime = iprot.readI64();
        struct.setStartTimeIsSet(true);
      }
      if (incoming.get(7)) {
        struct.endTime = iprot.readI64();
        struct.setEndTimeIsSet(true);
      }
      if (incoming.get(8)) {
        struct.lastUsed = iprot.readI64();
        struct.setLastUsedIsSet(true);
      }
      if (incoming.get(9)) {
        struct.useCount = iprot.readI32();
        struct.setUseCountIsSet(true);
      }
      if (incoming.get(10)) {
        struct.ownerId = iprot.readString();
        struct.setOwnerIdIsSet(true);
      }
      if (incoming.get(11)) {
        struct.updaterId = iprot.readString();
        struct.setUpdaterIdIsSet(true);
      }
      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(17)) {
        struct.hasInternetAccess = iprot.readBool();
        struct.setHasInternetAccessIsSet(true);
      }
      if (incoming.get(18)) {
        struct.defaultPermissions = new LecturePermissions();
        struct.defaultPermissions.read(iprot);
        struct.setDefaultPermissionsIsSet(true);
      }
      if (incoming.get(19)) {
        struct.userPermissions = new LecturePermissions();
        struct.userPermissions.read(iprot);
        struct.setUserPermissionsIsSet(true);
      }
    }
  }

}