public void write(org.apache.thrift.protocol.TProtocol oprot, addCourse_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.course != null) {
          oprot.writeFieldBegin(COURSE_FIELD_DESC);
          struct.course.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addCourse_argsTupleSchemeFactory implements SchemeFactory {
      public addCourse_argsTupleScheme getScheme() {
        return new addCourse_argsTupleScheme();
      }
    }

    private static class addCourse_argsTupleScheme extends TupleScheme<addCourse_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, addCourse_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetCourse()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetCourse()) {
          struct.course.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, addCourse_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.course = new Course();
          struct.course.read(iprot);
          struct.setCourseIsSet(true);
        }
      }
    }

  }

  public static class addCourse_result implements org.apache.thrift.TBase<addCourse_result, addCourse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCourse_result");

    private static final org.apache.thrift.protocol.TField UC_FIELD_DESC = new org.apache.thrift.protocol.TField("uc", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new addCourse_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addCourse_resultTupleSchemeFactory());
    }

    public UnacceptableCourse uc; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      UC((short)1, "uc");

      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: // UC
            return UC;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.UC, new org.apache.thrift.meta_data.FieldMetaData("uc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCourse_result.class, metaDataMap);
    }

    public addCourse_result() {
    }

    public addCourse_result(
      UnacceptableCourse uc)
    {
      this();
      this.uc = uc;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addCourse_result(addCourse_result other) {
      if (other.isSetUc()) {
        this.uc = new UnacceptableCourse(other.uc);
      }
    }

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

    @Override
    public void clear() {
      this.uc = null;
    }

    public UnacceptableCourse getUc() {
      return this.uc;
    }

    public addCourse_result setUc(UnacceptableCourse uc) {
      this.uc = uc;
      return this;
    }

    public void unsetUc() {
      this.uc = null;
    }

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

    public void setUcIsSet(boolean value) {
      if (!value) {
        this.uc = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case UC:
        if (value == null) {
          unsetUc();
        } else {
          setUc((UnacceptableCourse)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case UC:
        return getUc();

      }
      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 UC:
        return isSetUc();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addCourse_result)
        return this.equals((addCourse_result)that);
      return false;
    }

    public boolean equals(addCourse_result that) {
      if (that == null)
        return false;

      boolean this_present_uc = true && this.isSetUc();
      boolean that_present_uc = true && that.isSetUc();
      if (this_present_uc || that_present_uc) {
        if (!(this_present_uc && that_present_uc))
          return false;
        if (!this.uc.equals(that.uc))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addCourse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addCourse_result typedOther = (addCourse_result)other;

      lastComparison = Boolean.valueOf(isSetUc()).compareTo(typedOther.isSetUc());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUc()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uc, typedOther.uc);
        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("addCourse_result(");
      boolean first = true;

      sb.append("uc:");
      if (this.uc == null) {
        sb.append("null");
      } else {
        sb.append(this.uc);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class addCourse_resultStandardSchemeFactory implements SchemeFactory {
      public addCourse_resultStandardScheme getScheme() {
        return new addCourse_resultStandardScheme();
      }
    }

    private static class addCourse_resultStandardScheme extends StandardScheme<addCourse_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, addCourse_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // UC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.uc = new UnacceptableCourse();
                struct.uc.read(iprot);
                struct.setUcIsSet(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, addCourse_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.uc != null) {
          oprot.writeFieldBegin(UC_FIELD_DESC);
          struct.uc.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addCourse_resultTupleSchemeFactory implements SchemeFactory {
      public addCourse_resultTupleScheme getScheme() {
        return new addCourse_resultTupleScheme();
      }
    }

    private static class addCourse_resultTupleScheme extends TupleScheme<addCourse_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, addCourse_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetUc()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetUc()) {
          struct.uc.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, addCourse_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.uc = new UnacceptableCourse();
          struct.uc.read(iprot);
          struct.setUcIsSet(true);
        }
      }
    }

  }

  public static class deleteCourse_args implements org.apache.thrift.TBase<deleteCourse_args, deleteCourse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteCourse_args");

    private static final org.apache.thrift.protocol.TField COURSE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("courseNumber", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteCourse_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteCourse_argsTupleSchemeFactory());
    }

    public String courseNumber; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      COURSE_NUMBER((short)1, "courseNumber");

      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: // COURSE_NUMBER
            return COURSE_NUMBER;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.COURSE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("courseNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteCourse_args.class, metaDataMap);
    }

    public deleteCourse_args() {
    }

    public deleteCourse_args(
      String courseNumber)
    {
      this();
      this.courseNumber = courseNumber;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteCourse_args(deleteCourse_args other) {
      if (other.isSetCourseNumber()) {
        this.courseNumber = other.courseNumber;
      }
    }

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

    @Override
    public void clear() {
      this.courseNumber = null;
    }

    public String getCourseNumber() {
      return this.courseNumber;
    }

    public deleteCourse_args setCourseNumber(String courseNumber) {
      this.courseNumber = courseNumber;
      return this;
    }

    public void unsetCourseNumber() {
      this.courseNumber = null;
    }

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

    public void setCourseNumberIsSet(boolean value) {
      if (!value) {
        this.courseNumber = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case COURSE_NUMBER:
        if (value == null) {
          unsetCourseNumber();
        } else {
          setCourseNumber((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case COURSE_NUMBER:
        return getCourseNumber();

      }
      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 COURSE_NUMBER:
        return isSetCourseNumber();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteCourse_args)
        return this.equals((deleteCourse_args)that);
      return false;
    }

    public boolean equals(deleteCourse_args that) {
      if (that == null)
        return false;

      boolean this_present_courseNumber = true && this.isSetCourseNumber();
      boolean that_present_courseNumber = true && that.isSetCourseNumber();
      if (this_present_courseNumber || that_present_courseNumber) {
        if (!(this_present_courseNumber && that_present_courseNumber))
          return false;
        if (!this.courseNumber.equals(that.courseNumber))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteCourse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteCourse_args typedOther = (deleteCourse_args)other;

      lastComparison = Boolean.valueOf(isSetCourseNumber()).compareTo(typedOther.isSetCourseNumber());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCourseNumber()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.courseNumber, typedOther.courseNumber);
        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("deleteCourse_args(");
      boolean first = true;

      sb.append("courseNumber:");
      if (this.courseNumber == null) {
        sb.append("null");
      } else {
        sb.append(this.courseNumber);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteCourse_argsStandardSchemeFactory implements SchemeFactory {
      public deleteCourse_argsStandardScheme getScheme() {
        return new deleteCourse_argsStandardScheme();
      }
    }

    private static class deleteCourse_argsStandardScheme extends StandardScheme<deleteCourse_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteCourse_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // COURSE_NUMBER
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.courseNumber = iprot.readString();
                struct.setCourseNumberIsSet(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, deleteCourse_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.courseNumber != null) {
          oprot.writeFieldBegin(COURSE_NUMBER_FIELD_DESC);
          oprot.writeString(struct.courseNumber);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteCourse_argsTupleSchemeFactory implements SchemeFactory {
      public deleteCourse_argsTupleScheme getScheme() {
        return new deleteCourse_argsTupleScheme();
      }
    }

    private static class deleteCourse_argsTupleScheme extends TupleScheme<deleteCourse_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteCourse_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetCourseNumber()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetCourseNumber()) {
          oprot.writeString(struct.courseNumber);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteCourse_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.courseNumber = iprot.readString();
          struct.setCourseNumberIsSet(true);
        }
      }
    }

  }

  public static class deleteCourse_result implements org.apache.thrift.TBase<deleteCourse_result, deleteCourse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteCourse_result");

    private static final org.apache.thrift.protocol.TField CNF_FIELD_DESC = new org.apache.thrift.protocol.TField("cnf", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteCourse_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteCourse_resultTupleSchemeFactory());
    }

    public CourseNotFound cnf; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CNF((short)1, "cnf");

      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: // CNF
            return CNF;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CNF, new org.apache.thrift.meta_data.FieldMetaData("cnf", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteCourse_result.class, metaDataMap);
    }

    public deleteCourse_result() {
    }

    public deleteCourse_result(
      CourseNotFound cnf)
    {
      this();
      this.cnf = cnf;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteCourse_result(deleteCourse_result other) {
      if (other.isSetCnf()) {
        this.cnf = new CourseNotFound(other.cnf);
      }
    }

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

    @Override
    public void clear() {
      this.cnf = null;
    }

    public CourseNotFound getCnf() {
      return this.cnf;
    }

    public deleteCourse_result setCnf(CourseNotFound cnf) {
      this.cnf = cnf;
      return this;
    }

    public void unsetCnf() {
      this.cnf = null;
    }

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

    public void setCnfIsSet(boolean value) {
      if (!value) {
        this.cnf = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CNF:
        if (value == null) {
          unsetCnf();
        } else {
          setCnf((CourseNotFound)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CNF:
        return getCnf();

      }
      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 CNF:
        return isSetCnf();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteCourse_result)
        return this.equals((deleteCourse_result)that);
      return false;
    }

    public boolean equals(deleteCourse_result that) {
      if (that == null)
        return false;

      boolean this_present_cnf = true && this.isSetCnf();
      boolean that_present_cnf = true && that.isSetCnf();
      if (this_present_cnf || that_present_cnf) {
        if (!(this_present_cnf && that_present_cnf))
          return false;
        if (!this.cnf.equals(that.cnf))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteCourse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteCourse_result typedOther = (deleteCourse_result)other;

      lastComparison = Boolean.valueOf(isSetCnf()).compareTo(typedOther.isSetCnf());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCnf()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cnf, typedOther.cnf);
        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("deleteCourse_result(");
      boolean first = true;

      sb.append("cnf:");
      if (this.cnf == null) {
        sb.append("null");
      } else {
        sb.append(this.cnf);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteCourse_resultStandardSchemeFactory implements SchemeFactory {
      public deleteCourse_resultStandardScheme getScheme() {
        return new deleteCourse_resultStandardScheme();
      }
    }

    private static class deleteCourse_resultStandardScheme extends StandardScheme<deleteCourse_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteCourse_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // CNF
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.cnf = new CourseNotFound();
                struct.cnf.read(iprot);
                struct.setCnfIsSet(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, deleteCourse_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.cnf != null) {
          oprot.writeFieldBegin(CNF_FIELD_DESC);
          struct.cnf.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteCourse_resultTupleSchemeFactory implements SchemeFactory {
      public deleteCourse_resultTupleScheme getScheme() {
        return new deleteCourse_resultTupleScheme();
      }
    }

    private static class deleteCourse_resultTupleScheme extends TupleScheme<deleteCourse_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteCourse_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetCnf()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetCnf()) {
          struct.cnf.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteCourse_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.cnf = new CourseNotFound();
          struct.cnf.read(iprot);
          struct.setCnfIsSet(true);
        }
      }