public getCourse_result getResult(I iface, getCourse_args args) throws org.apache.thrift.TException {
        getCourse_result result = new getCourse_result();
        try {
          result.success = iface.getCourse(args.courseNumber);
        } catch (CourseNotFound cnf) {
          result.cnf = cnf;
        }
        return result;
      }
    }

    public static class addCourse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addCourse_args> {
      public addCourse() {
        super("addCourse");
      }

      public addCourse_args getEmptyArgsInstance() {
        return new addCourse_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public addCourse_result getResult(I iface, addCourse_args args) throws org.apache.thrift.TException {
        addCourse_result result = new addCourse_result();
        try {
          iface.addCourse(args.course);
        } catch (UnacceptableCourse uc) {
          result.uc = uc;
        }
        return result;
      }
    }

    public static class deleteCourse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteCourse_args> {
      public deleteCourse() {
        super("deleteCourse");
      }

      public deleteCourse_args getEmptyArgsInstance() {
        return new deleteCourse_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public deleteCourse_result getResult(I iface, deleteCourse_args args) throws org.apache.thrift.TException {
        deleteCourse_result result = new deleteCourse_result();
        try {
          iface.deleteCourse(args.courseNumber);
        } catch (CourseNotFound cnf) {
          result.cnf = cnf;
        }
        return result;
      }
    }

  }

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


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


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

      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) {
          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;
      }
    }
    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);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCourseInventory_args.class, metaDataMap);
    }

    public getCourseInventory_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCourseInventory_args(getCourseInventory_args other) {
    }

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      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) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

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

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

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

      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("getCourseInventory_args(");
      boolean first = true;

      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 getCourseInventory_argsStandardSchemeFactory implements SchemeFactory {
      public getCourseInventory_argsStandardScheme getScheme() {
        return new getCourseInventory_argsStandardScheme();
      }
    }

    private static class getCourseInventory_argsStandardScheme extends StandardScheme<getCourseInventory_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getCourseInventory_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) {
            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, getCourseInventory_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getCourseInventory_argsTupleSchemeFactory implements SchemeFactory {
      public getCourseInventory_argsTupleScheme getScheme() {
        return new getCourseInventory_argsTupleScheme();
      }
    }

    private static class getCourseInventory_argsTupleScheme extends TupleScheme<getCourseInventory_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getCourseInventory_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getCourseInventory_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

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

    public List<String> success; // required

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

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public getCourseInventory_result() {
    }

    public getCourseInventory_result(
      List<String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCourseInventory_result(getCourseInventory_result other) {
      if (other.isSetSuccess()) {
        List<String> __this__success = new ArrayList<String>();
        for (String other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

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

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

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(String elem) {
      if (this.success == null) {
        this.success = new ArrayList<String>();
      }
      this.success.add(elem);
    }

    public List<String> getSuccess() {
      return this.success;
    }

    public getCourseInventory_result setSuccess(List<String> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

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

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

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

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

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 getCourseInventory_resultStandardSchemeFactory implements SchemeFactory {
      public getCourseInventory_resultStandardScheme getScheme() {
        return new getCourseInventory_resultStandardScheme();
      }
    }

    private static class getCourseInventory_resultStandardScheme extends StandardScheme<getCourseInventory_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getCourseInventory_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
                  struct.success = new ArrayList<String>(_list16.size);
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
                  {
                    String _elem18; // required
                    _elem18 = iprot.readString();
                    struct.success.add(_elem18);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(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, getCourseInventory_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (String _iter19 : struct.success)
            {
              oprot.writeString(_iter19);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getCourseInventory_resultTupleSchemeFactory implements SchemeFactory {
      public getCourseInventory_resultTupleScheme getScheme() {
        return new getCourseInventory_resultTupleScheme();
      }
    }

    private static class getCourseInventory_resultTupleScheme extends TupleScheme<getCourseInventory_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getCourseInventory_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (String _iter20 : struct.success)
            {
              oprot.writeString(_iter20);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getCourseInventory_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new ArrayList<String>(_list21.size);
            for (int _i22 = 0; _i22 < _list21.size; ++_i22)
            {
              String _elem23; // required
              _elem23 = iprot.readString();
              struct.success.add(_elem23);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

  public static class getCourse_args implements org.apache.thrift.TBase<getCourse_args, getCourse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCourse_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 getCourse_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getCourse_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(getCourse_args.class, metaDataMap);
    }

    public getCourse_args() {
    }

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

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

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

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

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

    public getCourse_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 getCourse_args)
        return this.equals((getCourse_args)that);
      return false;
    }

    public boolean equals(getCourse_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(getCourse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getCourse_args typedOther = (getCourse_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("getCourse_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 getCourse_argsStandardSchemeFactory implements SchemeFactory {
      public getCourse_argsStandardScheme getScheme() {
        return new getCourse_argsStandardScheme();
      }
    }

    private static class getCourse_argsStandardScheme extends StandardScheme<getCourse_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getCourse_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, getCourse_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 getCourse_argsTupleSchemeFactory implements SchemeFactory {
      public getCourse_argsTupleScheme getScheme() {
        return new getCourse_argsTupleScheme();
      }
    }

    private static class getCourse_argsTupleScheme extends TupleScheme<getCourse_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getCourse_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, getCourse_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 getCourse_result implements org.apache.thrift.TBase<getCourse_result, getCourse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCourse_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    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 getCourse_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getCourse_resultTupleSchemeFactory());
    }

    public Course success; // required
    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 {
      SUCCESS((short)0, "success"),
      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 0: // SUCCESS
            return SUCCESS;
          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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Course.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(getCourse_result.class, metaDataMap);
    }

    public getCourse_result() {
    }

    public getCourse_result(
      Course success,
      CourseNotFound cnf)
    {
      this();
      this.success = success;
      this.cnf = cnf;
    }

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

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

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

    public Course getSuccess() {
      return this.success;
    }

    public getCourse_result setSuccess(Course success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

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

    public getCourse_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 SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Course)value);
        }
        break;

      case CNF:
        if (value == null) {
          unsetCnf();
        } else {
          setCnf((CourseNotFound)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

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

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_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(getCourse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

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

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

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("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
      if (success != null) {
        success.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 {
        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 getCourse_resultStandardSchemeFactory implements SchemeFactory {
      public getCourse_resultStandardScheme getScheme() {
        return new getCourse_resultStandardScheme();
      }
    }

    private static class getCourse_resultStandardScheme extends StandardScheme<getCourse_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getCourse_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new Course();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            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, getCourse_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class getCourse_resultTupleSchemeFactory implements SchemeFactory {
      public getCourse_resultTupleScheme getScheme() {
        return new getCourse_resultTupleScheme();
      }
    }

    private static class getCourse_resultTupleScheme extends TupleScheme<getCourse_result> {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField COURSE_FIELD_DESC = new org.apache.thrift.protocol.TField("course", 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_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new addCourse_argsTupleSchemeFactory());
    }

    public Course course; // 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((short)1, "course");

      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
            return COURSE;
          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, new org.apache.thrift.meta_data.FieldMetaData("course", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Course.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCourse_args.class, metaDataMap);
    }

    public addCourse_args() {
    }

    public addCourse_args(
      Course course)
    {
      this();
      this.course = course;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addCourse_args(addCourse_args other) {
      if (other.isSetCourse()) {
        this.course = new Course(other.course);
      }
    }

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

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

    public Course getCourse() {
      return this.course;
    }

    public addCourse_args setCourse(Course course) {
      this.course = course;
      return this;
    }

    public void unsetCourse() {
      this.course = null;
    }

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

    public void setCourseIsSet(boolean value) {
      if (!value) {
        this.course = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case COURSE:
        if (value == null) {
          unsetCourse();
        } else {
          setCourse((Course)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case COURSE:
        return getCourse();

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

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

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

      boolean this_present_course = true && this.isSetCourse();
      boolean that_present_course = true && that.isSetCourse();
      if (this_present_course || that_present_course) {
        if (!(this_present_course && that_present_course))
          return false;
        if (!this.course.equals(that.course))
          return false;
      }

      return true;
    }

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

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

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

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

      sb.append("course:");
      if (this.course == null) {
        sb.append("null");
      } else {
        sb.append(this.course);
      }
      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 (course != null) {
        course.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 {
        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_argsStandardSchemeFactory implements SchemeFactory {
      public addCourse_argsStandardScheme getScheme() {
        return new addCourse_argsStandardScheme();
      }
    }

    private static class addCourse_argsStandardScheme extends StandardScheme<addCourse_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, addCourse_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
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.course = new Course();
                struct.course.read(iprot);
                struct.setCourseIsSet(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_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);
        }
      }