//
// Autogenerated by Thrift Compiler (0.13.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
if (typeof Int64 === 'undefined' && typeof require === 'function') {
  var Int64 = require('node-int64');
}


CommitItemChangeType = {
  'ADDED' : 0,
  'DELETED' : 1,
  'REPLACED' : 2,
  'UNKNOWN' : 3,
  'UPDATED' : 4
};
HawkPluginCategory = {
  'BACKEND' : 0,
  'GRAPH_CHANGE_LISTENER' : 1,
  'INDEX_FACTORY' : 2,
  'METAMODEL_INTROSPECTOR' : 3,
  'METAMODEL_RESOURCE_FACTORY' : 4,
  'METAMODEL_UPDATER' : 5,
  'MODEL_RESOURCE_FACTORY' : 6,
  'MODEL_UPDATER' : 7,
  'QUERY_ENGINE' : 8,
  'VCS_MANAGER' : 9
};
HawkState = {
  'RUNNING' : 0,
  'STOPPED' : 1,
  'UPDATING' : 2
};
SubscriptionDurability = {
  'DEFAULT' : 0,
  'DURABLE' : 1,
  'TEMPORARY' : 2
};
CommitItem = function(args) {
  this.repoURL = null;
  this.revision = null;
  this.path = null;
  this.type = null;
  if (args) {
    if (args.repoURL !== undefined && args.repoURL !== null) {
      this.repoURL = args.repoURL;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field repoURL is unset!');
    }
    if (args.revision !== undefined && args.revision !== null) {
      this.revision = args.revision;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field revision is unset!');
    }
    if (args.path !== undefined && args.path !== null) {
      this.path = args.path;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field path is unset!');
    }
    if (args.type !== undefined && args.type !== null) {
      this.type = args.type;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!');
    }
  }
};
CommitItem.prototype = {};
CommitItem.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.repoURL = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.revision = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.path = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I32) {
        this.type = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

CommitItem.prototype.write = function(output) {
  output.writeStructBegin('CommitItem');
  if (this.repoURL !== null && this.repoURL !== undefined) {
    output.writeFieldBegin('repoURL', Thrift.Type.STRING, 1);
    output.writeString(this.repoURL);
    output.writeFieldEnd();
  }
  if (this.revision !== null && this.revision !== undefined) {
    output.writeFieldBegin('revision', Thrift.Type.STRING, 2);
    output.writeString(this.revision);
    output.writeFieldEnd();
  }
  if (this.path !== null && this.path !== undefined) {
    output.writeFieldBegin('path', Thrift.Type.STRING, 3);
    output.writeString(this.path);
    output.writeFieldEnd();
  }
  if (this.type !== null && this.type !== undefined) {
    output.writeFieldBegin('type', Thrift.Type.I32, 4);
    output.writeI32(this.type);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Credentials = function(args) {
  this.username = null;
  this.password = null;
  if (args) {
    if (args.username !== undefined && args.username !== null) {
      this.username = args.username;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field username is unset!');
    }
    if (args.password !== undefined && args.password !== null) {
      this.password = args.password;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field password is unset!');
    }
  }
};
Credentials.prototype = {};
Credentials.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.username = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.password = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Credentials.prototype.write = function(output) {
  output.writeStructBegin('Credentials');
  if (this.username !== null && this.username !== undefined) {
    output.writeFieldBegin('username', Thrift.Type.STRING, 1);
    output.writeString(this.username);
    output.writeFieldEnd();
  }
  if (this.password !== null && this.password !== undefined) {
    output.writeFieldBegin('password', Thrift.Type.STRING, 2);
    output.writeString(this.password);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

DerivedAttributeSpec = function(args) {
  this.metamodelUri = null;
  this.typeName = null;
  this.attributeName = null;
  this.attributeType = null;
  this.isMany = null;
  this.isOrdered = null;
  this.isUnique = null;
  this.derivationLanguage = null;
  this.derivationLogic = null;
  if (args) {
    if (args.metamodelUri !== undefined && args.metamodelUri !== null) {
      this.metamodelUri = args.metamodelUri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metamodelUri is unset!');
    }
    if (args.typeName !== undefined && args.typeName !== null) {
      this.typeName = args.typeName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field typeName is unset!');
    }
    if (args.attributeName !== undefined && args.attributeName !== null) {
      this.attributeName = args.attributeName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field attributeName is unset!');
    }
    if (args.attributeType !== undefined && args.attributeType !== null) {
      this.attributeType = args.attributeType;
    }
    if (args.isMany !== undefined && args.isMany !== null) {
      this.isMany = args.isMany;
    }
    if (args.isOrdered !== undefined && args.isOrdered !== null) {
      this.isOrdered = args.isOrdered;
    }
    if (args.isUnique !== undefined && args.isUnique !== null) {
      this.isUnique = args.isUnique;
    }
    if (args.derivationLanguage !== undefined && args.derivationLanguage !== null) {
      this.derivationLanguage = args.derivationLanguage;
    }
    if (args.derivationLogic !== undefined && args.derivationLogic !== null) {
      this.derivationLogic = args.derivationLogic;
    }
  }
};
DerivedAttributeSpec.prototype = {};
DerivedAttributeSpec.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.metamodelUri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.typeName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.attributeName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.attributeType = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.BOOL) {
        this.isMany = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.BOOL) {
        this.isOrdered = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 7:
      if (ftype == Thrift.Type.BOOL) {
        this.isUnique = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 8:
      if (ftype == Thrift.Type.STRING) {
        this.derivationLanguage = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 9:
      if (ftype == Thrift.Type.STRING) {
        this.derivationLogic = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

DerivedAttributeSpec.prototype.write = function(output) {
  output.writeStructBegin('DerivedAttributeSpec');
  if (this.metamodelUri !== null && this.metamodelUri !== undefined) {
    output.writeFieldBegin('metamodelUri', Thrift.Type.STRING, 1);
    output.writeString(this.metamodelUri);
    output.writeFieldEnd();
  }
  if (this.typeName !== null && this.typeName !== undefined) {
    output.writeFieldBegin('typeName', Thrift.Type.STRING, 2);
    output.writeString(this.typeName);
    output.writeFieldEnd();
  }
  if (this.attributeName !== null && this.attributeName !== undefined) {
    output.writeFieldBegin('attributeName', Thrift.Type.STRING, 3);
    output.writeString(this.attributeName);
    output.writeFieldEnd();
  }
  if (this.attributeType !== null && this.attributeType !== undefined) {
    output.writeFieldBegin('attributeType', Thrift.Type.STRING, 4);
    output.writeString(this.attributeType);
    output.writeFieldEnd();
  }
  if (this.isMany !== null && this.isMany !== undefined) {
    output.writeFieldBegin('isMany', Thrift.Type.BOOL, 5);
    output.writeBool(this.isMany);
    output.writeFieldEnd();
  }
  if (this.isOrdered !== null && this.isOrdered !== undefined) {
    output.writeFieldBegin('isOrdered', Thrift.Type.BOOL, 6);
    output.writeBool(this.isOrdered);
    output.writeFieldEnd();
  }
  if (this.isUnique !== null && this.isUnique !== undefined) {
    output.writeFieldBegin('isUnique', Thrift.Type.BOOL, 7);
    output.writeBool(this.isUnique);
    output.writeFieldEnd();
  }
  if (this.derivationLanguage !== null && this.derivationLanguage !== undefined) {
    output.writeFieldBegin('derivationLanguage', Thrift.Type.STRING, 8);
    output.writeString(this.derivationLanguage);
    output.writeFieldEnd();
  }
  if (this.derivationLogic !== null && this.derivationLogic !== undefined) {
    output.writeFieldBegin('derivationLogic', Thrift.Type.STRING, 9);
    output.writeString(this.derivationLogic);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

FailedQuery = function(args) {
  this.reason = null;
  if (args) {
    if (args.reason !== undefined && args.reason !== null) {
      this.reason = args.reason;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field reason is unset!');
    }
  }
};
Thrift.inherits(FailedQuery, Thrift.TException);
FailedQuery.prototype.name = 'FailedQuery';
FailedQuery.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.reason = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

FailedQuery.prototype.write = function(output) {
  output.writeStructBegin('FailedQuery');
  if (this.reason !== null && this.reason !== undefined) {
    output.writeFieldBegin('reason', Thrift.Type.STRING, 1);
    output.writeString(this.reason);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

File = function(args) {
  this.name = null;
  this.contents = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.contents !== undefined && args.contents !== null) {
      this.contents = args.contents;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field contents is unset!');
    }
  }
};
File.prototype = {};
File.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.contents = input.readBinary().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

File.prototype.write = function(output) {
  output.writeStructBegin('File');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.contents !== null && this.contents !== undefined) {
    output.writeFieldBegin('contents', Thrift.Type.STRING, 2);
    output.writeBinary(this.contents);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkFactoryNotFound = function(args) {
  this.factoryName = null;
  if (args) {
    if (args.factoryName !== undefined && args.factoryName !== null) {
      this.factoryName = args.factoryName;
    }
  }
};
Thrift.inherits(HawkFactoryNotFound, Thrift.TException);
HawkFactoryNotFound.prototype.name = 'HawkFactoryNotFound';
HawkFactoryNotFound.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.factoryName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkFactoryNotFound.prototype.write = function(output) {
  output.writeStructBegin('HawkFactoryNotFound');
  if (this.factoryName !== null && this.factoryName !== undefined) {
    output.writeFieldBegin('factoryName', Thrift.Type.STRING, 1);
    output.writeString(this.factoryName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkInstance = function(args) {
  this.name = null;
  this.state = null;
  this.message = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.state !== undefined && args.state !== null) {
      this.state = args.state;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field state is unset!');
    }
    if (args.message !== undefined && args.message !== null) {
      this.message = args.message;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field message is unset!');
    }
  }
};
HawkInstance.prototype = {};
HawkInstance.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I32) {
        this.state = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.message = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkInstance.prototype.write = function(output) {
  output.writeStructBegin('HawkInstance');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.state !== null && this.state !== undefined) {
    output.writeFieldBegin('state', Thrift.Type.I32, 2);
    output.writeI32(this.state);
    output.writeFieldEnd();
  }
  if (this.message !== null && this.message !== undefined) {
    output.writeFieldBegin('message', Thrift.Type.STRING, 3);
    output.writeString(this.message);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkInstanceNotFound = function(args) {
  this.instanceName = null;
  if (args) {
    if (args.instanceName !== undefined && args.instanceName !== null) {
      this.instanceName = args.instanceName;
    }
  }
};
Thrift.inherits(HawkInstanceNotFound, Thrift.TException);
HawkInstanceNotFound.prototype.name = 'HawkInstanceNotFound';
HawkInstanceNotFound.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.instanceName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkInstanceNotFound.prototype.write = function(output) {
  output.writeStructBegin('HawkInstanceNotFound');
  if (this.instanceName !== null && this.instanceName !== undefined) {
    output.writeFieldBegin('instanceName', Thrift.Type.STRING, 1);
    output.writeString(this.instanceName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkInstanceNotRunning = function(args) {
  this.instanceName = null;
  if (args) {
    if (args.instanceName !== undefined && args.instanceName !== null) {
      this.instanceName = args.instanceName;
    }
  }
};
Thrift.inherits(HawkInstanceNotRunning, Thrift.TException);
HawkInstanceNotRunning.prototype.name = 'HawkInstanceNotRunning';
HawkInstanceNotRunning.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.instanceName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkInstanceNotRunning.prototype.write = function(output) {
  output.writeStructBegin('HawkInstanceNotRunning');
  if (this.instanceName !== null && this.instanceName !== undefined) {
    output.writeFieldBegin('instanceName', Thrift.Type.STRING, 1);
    output.writeString(this.instanceName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkMetamodelNotFound = function(args) {
  this.metamodelURI = null;
  if (args) {
    if (args.metamodelURI !== undefined && args.metamodelURI !== null) {
      this.metamodelURI = args.metamodelURI;
    }
  }
};
Thrift.inherits(HawkMetamodelNotFound, Thrift.TException);
HawkMetamodelNotFound.prototype.name = 'HawkMetamodelNotFound';
HawkMetamodelNotFound.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.metamodelURI = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkMetamodelNotFound.prototype.write = function(output) {
  output.writeStructBegin('HawkMetamodelNotFound');
  if (this.metamodelURI !== null && this.metamodelURI !== undefined) {
    output.writeFieldBegin('metamodelURI', Thrift.Type.STRING, 1);
    output.writeString(this.metamodelURI);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkPlugin = function(args) {
  this.name = null;
  this.description = null;
  this.category = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.description !== undefined && args.description !== null) {
      this.description = args.description;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field description is unset!');
    }
    if (args.category !== undefined && args.category !== null) {
      this.category = args.category;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field category is unset!');
    }
  }
};
HawkPlugin.prototype = {};
HawkPlugin.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.description = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I32) {
        this.category = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkPlugin.prototype.write = function(output) {
  output.writeStructBegin('HawkPlugin');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.description !== null && this.description !== undefined) {
    output.writeFieldBegin('description', Thrift.Type.STRING, 2);
    output.writeString(this.description);
    output.writeFieldEnd();
  }
  if (this.category !== null && this.category !== undefined) {
    output.writeFieldBegin('category', Thrift.Type.I32, 3);
    output.writeI32(this.category);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkStateEvent = function(args) {
  this.timestamp = null;
  this.state = null;
  this.message = null;
  if (args) {
    if (args.timestamp !== undefined && args.timestamp !== null) {
      this.timestamp = args.timestamp;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field timestamp is unset!');
    }
    if (args.state !== undefined && args.state !== null) {
      this.state = args.state;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field state is unset!');
    }
    if (args.message !== undefined && args.message !== null) {
      this.message = args.message;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field message is unset!');
    }
  }
};
HawkStateEvent.prototype = {};
HawkStateEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.I64) {
        this.timestamp = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I32) {
        this.state = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.message = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkStateEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkStateEvent');
  if (this.timestamp !== null && this.timestamp !== undefined) {
    output.writeFieldBegin('timestamp', Thrift.Type.I64, 1);
    output.writeI64(this.timestamp);
    output.writeFieldEnd();
  }
  if (this.state !== null && this.state !== undefined) {
    output.writeFieldBegin('state', Thrift.Type.I32, 2);
    output.writeI32(this.state);
    output.writeFieldEnd();
  }
  if (this.message !== null && this.message !== undefined) {
    output.writeFieldBegin('message', Thrift.Type.STRING, 3);
    output.writeString(this.message);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkSynchronizationEndEvent = function(args) {
  this.timestampNanos = null;
  if (args) {
    if (args.timestampNanos !== undefined && args.timestampNanos !== null) {
      this.timestampNanos = args.timestampNanos;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field timestampNanos is unset!');
    }
  }
};
HawkSynchronizationEndEvent.prototype = {};
HawkSynchronizationEndEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.I64) {
        this.timestampNanos = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkSynchronizationEndEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkSynchronizationEndEvent');
  if (this.timestampNanos !== null && this.timestampNanos !== undefined) {
    output.writeFieldBegin('timestampNanos', Thrift.Type.I64, 1);
    output.writeI64(this.timestampNanos);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkSynchronizationStartEvent = function(args) {
  this.timestampNanos = null;
  if (args) {
    if (args.timestampNanos !== undefined && args.timestampNanos !== null) {
      this.timestampNanos = args.timestampNanos;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field timestampNanos is unset!');
    }
  }
};
HawkSynchronizationStartEvent.prototype = {};
HawkSynchronizationStartEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.I64) {
        this.timestampNanos = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkSynchronizationStartEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkSynchronizationStartEvent');
  if (this.timestampNanos !== null && this.timestampNanos !== undefined) {
    output.writeFieldBegin('timestampNanos', Thrift.Type.I64, 1);
    output.writeI64(this.timestampNanos);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkTypeNotFound = function(args) {
  this.typeName = null;
  if (args) {
    if (args.typeName !== undefined && args.typeName !== null) {
      this.typeName = args.typeName;
    }
  }
};
Thrift.inherits(HawkTypeNotFound, Thrift.TException);
HawkTypeNotFound.prototype.name = 'HawkTypeNotFound';
HawkTypeNotFound.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.typeName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkTypeNotFound.prototype.write = function(output) {
  output.writeStructBegin('HawkTypeNotFound');
  if (this.typeName !== null && this.typeName !== undefined) {
    output.writeFieldBegin('typeName', Thrift.Type.STRING, 1);
    output.writeString(this.typeName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

IndexedAttributeSpec = function(args) {
  this.metamodelUri = null;
  this.typeName = null;
  this.attributeName = null;
  if (args) {
    if (args.metamodelUri !== undefined && args.metamodelUri !== null) {
      this.metamodelUri = args.metamodelUri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metamodelUri is unset!');
    }
    if (args.typeName !== undefined && args.typeName !== null) {
      this.typeName = args.typeName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field typeName is unset!');
    }
    if (args.attributeName !== undefined && args.attributeName !== null) {
      this.attributeName = args.attributeName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field attributeName is unset!');
    }
  }
};
IndexedAttributeSpec.prototype = {};
IndexedAttributeSpec.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.metamodelUri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.typeName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.attributeName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

IndexedAttributeSpec.prototype.write = function(output) {
  output.writeStructBegin('IndexedAttributeSpec');
  if (this.metamodelUri !== null && this.metamodelUri !== undefined) {
    output.writeFieldBegin('metamodelUri', Thrift.Type.STRING, 1);
    output.writeString(this.metamodelUri);
    output.writeFieldEnd();
  }
  if (this.typeName !== null && this.typeName !== undefined) {
    output.writeFieldBegin('typeName', Thrift.Type.STRING, 2);
    output.writeString(this.typeName);
    output.writeFieldEnd();
  }
  if (this.attributeName !== null && this.attributeName !== undefined) {
    output.writeFieldBegin('attributeName', Thrift.Type.STRING, 3);
    output.writeString(this.attributeName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

InvalidDerivedAttributeSpec = function(args) {
  this.reason = null;
  if (args) {
    if (args.reason !== undefined && args.reason !== null) {
      this.reason = args.reason;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field reason is unset!');
    }
  }
};
Thrift.inherits(InvalidDerivedAttributeSpec, Thrift.TException);
InvalidDerivedAttributeSpec.prototype.name = 'InvalidDerivedAttributeSpec';
InvalidDerivedAttributeSpec.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.reason = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

InvalidDerivedAttributeSpec.prototype.write = function(output) {
  output.writeStructBegin('InvalidDerivedAttributeSpec');
  if (this.reason !== null && this.reason !== undefined) {
    output.writeFieldBegin('reason', Thrift.Type.STRING, 1);
    output.writeString(this.reason);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

InvalidIndexedAttributeSpec = function(args) {
  this.reason = null;
  if (args) {
    if (args.reason !== undefined && args.reason !== null) {
      this.reason = args.reason;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field reason is unset!');
    }
  }
};
Thrift.inherits(InvalidIndexedAttributeSpec, Thrift.TException);
InvalidIndexedAttributeSpec.prototype.name = 'InvalidIndexedAttributeSpec';
InvalidIndexedAttributeSpec.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.reason = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

InvalidIndexedAttributeSpec.prototype.write = function(output) {
  output.writeStructBegin('InvalidIndexedAttributeSpec');
  if (this.reason !== null && this.reason !== undefined) {
    output.writeFieldBegin('reason', Thrift.Type.STRING, 1);
    output.writeString(this.reason);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

InvalidMetamodel = function(args) {
  this.reason = null;
  if (args) {
    if (args.reason !== undefined && args.reason !== null) {
      this.reason = args.reason;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field reason is unset!');
    }
  }
};
Thrift.inherits(InvalidMetamodel, Thrift.TException);
InvalidMetamodel.prototype.name = 'InvalidMetamodel';
InvalidMetamodel.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.reason = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

InvalidMetamodel.prototype.write = function(output) {
  output.writeStructBegin('InvalidMetamodel');
  if (this.reason !== null && this.reason !== undefined) {
    output.writeFieldBegin('reason', Thrift.Type.STRING, 1);
    output.writeString(this.reason);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

InvalidPollingConfiguration = function(args) {
  this.reason = null;
  if (args) {
    if (args.reason !== undefined && args.reason !== null) {
      this.reason = args.reason;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field reason is unset!');
    }
  }
};
Thrift.inherits(InvalidPollingConfiguration, Thrift.TException);
InvalidPollingConfiguration.prototype.name = 'InvalidPollingConfiguration';
InvalidPollingConfiguration.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.reason = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

InvalidPollingConfiguration.prototype.write = function(output) {
  output.writeStructBegin('InvalidPollingConfiguration');
  if (this.reason !== null && this.reason !== undefined) {
    output.writeFieldBegin('reason', Thrift.Type.STRING, 1);
    output.writeString(this.reason);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

InvalidQuery = function(args) {
  this.reason = null;
  if (args) {
    if (args.reason !== undefined && args.reason !== null) {
      this.reason = args.reason;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field reason is unset!');
    }
  }
};
Thrift.inherits(InvalidQuery, Thrift.TException);
InvalidQuery.prototype.name = 'InvalidQuery';
InvalidQuery.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.reason = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

InvalidQuery.prototype.write = function(output) {
  output.writeStructBegin('InvalidQuery');
  if (this.reason !== null && this.reason !== undefined) {
    output.writeFieldBegin('reason', Thrift.Type.STRING, 1);
    output.writeString(this.reason);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

InvalidTransformation = function(args) {
  this.reason = null;
  this.location = null;
  if (args) {
    if (args.reason !== undefined && args.reason !== null) {
      this.reason = args.reason;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field reason is unset!');
    }
    if (args.location !== undefined && args.location !== null) {
      this.location = args.location;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field location is unset!');
    }
  }
};
InvalidTransformation.prototype = {};
InvalidTransformation.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.reason = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.location = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

InvalidTransformation.prototype.write = function(output) {
  output.writeStructBegin('InvalidTransformation');
  if (this.reason !== null && this.reason !== undefined) {
    output.writeFieldBegin('reason', Thrift.Type.STRING, 1);
    output.writeString(this.reason);
    output.writeFieldEnd();
  }
  if (this.location !== null && this.location !== undefined) {
    output.writeFieldBegin('location', Thrift.Type.STRING, 2);
    output.writeString(this.location);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

MetamodelParserDetails = function(args) {
  this.fileExtensions = null;
  this.identifier = null;
  if (args) {
    if (args.fileExtensions !== undefined && args.fileExtensions !== null) {
      this.fileExtensions = Thrift.copyList(args.fileExtensions, [null]);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field fileExtensions is unset!');
    }
    if (args.identifier !== undefined && args.identifier !== null) {
      this.identifier = args.identifier;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field identifier is unset!');
    }
  }
};
MetamodelParserDetails.prototype = {};
MetamodelParserDetails.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.SET) {
        this.fileExtensions = [];
        var _rtmp31 = input.readSetBegin();
        var _size0 = _rtmp31.size || 0;
        for (var _i2 = 0; _i2 < _size0; ++_i2) {
          var elem3 = null;
          elem3 = input.readString().value;
          this.fileExtensions.push(elem3);
        }
        input.readSetEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.identifier = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

MetamodelParserDetails.prototype.write = function(output) {
  output.writeStructBegin('MetamodelParserDetails');
  if (this.fileExtensions !== null && this.fileExtensions !== undefined) {
    output.writeFieldBegin('fileExtensions', Thrift.Type.SET, 1);
    output.writeSetBegin(Thrift.Type.STRING, this.fileExtensions.length);
    for (var iter4 in this.fileExtensions) {
      if (this.fileExtensions.hasOwnProperty(iter4)) {
        iter4 = this.fileExtensions[iter4];
        output.writeString(iter4);
      }
    }
    output.writeSetEnd();
    output.writeFieldEnd();
  }
  if (this.identifier !== null && this.identifier !== undefined) {
    output.writeFieldBegin('identifier', Thrift.Type.STRING, 2);
    output.writeString(this.identifier);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

MixedReference = function(args) {
  this.id = null;
  this.position = null;
  if (args) {
    if (args.id !== undefined && args.id !== null) {
      this.id = args.id;
    }
    if (args.position !== undefined && args.position !== null) {
      this.position = args.position;
    }
  }
};
MixedReference.prototype = {};
MixedReference.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.id = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I32) {
        this.position = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

MixedReference.prototype.write = function(output) {
  output.writeStructBegin('MixedReference');
  if (this.id !== null && this.id !== undefined) {
    output.writeFieldBegin('id', Thrift.Type.STRING, 1);
    output.writeString(this.id);
    output.writeFieldEnd();
  }
  if (this.position !== null && this.position !== undefined) {
    output.writeFieldBegin('position', Thrift.Type.I32, 2);
    output.writeI32(this.position);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

ModelSpec = function(args) {
  this.uri = null;
  this.metamodelUris = null;
  if (args) {
    if (args.uri !== undefined && args.uri !== null) {
      this.uri = args.uri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uri is unset!');
    }
    if (args.metamodelUris !== undefined && args.metamodelUris !== null) {
      this.metamodelUris = Thrift.copyList(args.metamodelUris, [null]);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metamodelUris is unset!');
    }
  }
};
ModelSpec.prototype = {};
ModelSpec.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.uri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.LIST) {
        this.metamodelUris = [];
        var _rtmp36 = input.readListBegin();
        var _size5 = _rtmp36.size || 0;
        for (var _i7 = 0; _i7 < _size5; ++_i7) {
          var elem8 = null;
          elem8 = input.readString().value;
          this.metamodelUris.push(elem8);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ModelSpec.prototype.write = function(output) {
  output.writeStructBegin('ModelSpec');
  if (this.uri !== null && this.uri !== undefined) {
    output.writeFieldBegin('uri', Thrift.Type.STRING, 1);
    output.writeString(this.uri);
    output.writeFieldEnd();
  }
  if (this.metamodelUris !== null && this.metamodelUris !== undefined) {
    output.writeFieldBegin('metamodelUris', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRING, this.metamodelUris.length);
    for (var iter9 in this.metamodelUris) {
      if (this.metamodelUris.hasOwnProperty(iter9)) {
        iter9 = this.metamodelUris[iter9];
        output.writeString(iter9);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Repository = function(args) {
  this.uri = null;
  this.type = null;
  this.isFrozen = false;
  if (args) {
    if (args.uri !== undefined && args.uri !== null) {
      this.uri = args.uri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uri is unset!');
    }
    if (args.type !== undefined && args.type !== null) {
      this.type = args.type;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!');
    }
    if (args.isFrozen !== undefined && args.isFrozen !== null) {
      this.isFrozen = args.isFrozen;
    }
  }
};
Repository.prototype = {};
Repository.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.uri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.type = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.BOOL) {
        this.isFrozen = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Repository.prototype.write = function(output) {
  output.writeStructBegin('Repository');
  if (this.uri !== null && this.uri !== undefined) {
    output.writeFieldBegin('uri', Thrift.Type.STRING, 1);
    output.writeString(this.uri);
    output.writeFieldEnd();
  }
  if (this.type !== null && this.type !== undefined) {
    output.writeFieldBegin('type', Thrift.Type.STRING, 2);
    output.writeString(this.type);
    output.writeFieldEnd();
  }
  if (this.isFrozen !== null && this.isFrozen !== undefined) {
    output.writeFieldBegin('isFrozen', Thrift.Type.BOOL, 3);
    output.writeBool(this.isFrozen);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Slot = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Slot.prototype = {};
Slot.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Slot.prototype.write = function(output) {
  output.writeStructBegin('Slot');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

SlotMetadata = function(args) {
  this.name = null;
  this.type = null;
  this.isMany = null;
  this.isOrdered = null;
  this.isUnique = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.type !== undefined && args.type !== null) {
      this.type = args.type;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!');
    }
    if (args.isMany !== undefined && args.isMany !== null) {
      this.isMany = args.isMany;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field isMany is unset!');
    }
    if (args.isOrdered !== undefined && args.isOrdered !== null) {
      this.isOrdered = args.isOrdered;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field isOrdered is unset!');
    }
    if (args.isUnique !== undefined && args.isUnique !== null) {
      this.isUnique = args.isUnique;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field isUnique is unset!');
    }
  }
};
SlotMetadata.prototype = {};
SlotMetadata.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.type = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.BOOL) {
        this.isMany = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.BOOL) {
        this.isOrdered = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.BOOL) {
        this.isUnique = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

SlotMetadata.prototype.write = function(output) {
  output.writeStructBegin('SlotMetadata');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.type !== null && this.type !== undefined) {
    output.writeFieldBegin('type', Thrift.Type.STRING, 2);
    output.writeString(this.type);
    output.writeFieldEnd();
  }
  if (this.isMany !== null && this.isMany !== undefined) {
    output.writeFieldBegin('isMany', Thrift.Type.BOOL, 3);
    output.writeBool(this.isMany);
    output.writeFieldEnd();
  }
  if (this.isOrdered !== null && this.isOrdered !== undefined) {
    output.writeFieldBegin('isOrdered', Thrift.Type.BOOL, 4);
    output.writeBool(this.isOrdered);
    output.writeFieldEnd();
  }
  if (this.isUnique !== null && this.isUnique !== undefined) {
    output.writeFieldBegin('isUnique', Thrift.Type.BOOL, 5);
    output.writeBool(this.isUnique);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

SlotValue = function(args) {
  this.vBoolean = null;
  this.vByte = null;
  this.vShort = null;
  this.vInteger = null;
  this.vLong = null;
  this.vDouble = null;
  this.vString = null;
  this.vBooleans = null;
  this.vBytes = null;
  this.vShorts = null;
  this.vIntegers = null;
  this.vLongs = null;
  this.vDoubles = null;
  this.vStrings = null;
  this.vLists = null;
  if (args) {
    if (args.vBoolean !== undefined && args.vBoolean !== null) {
      this.vBoolean = args.vBoolean;
    }
    if (args.vByte !== undefined && args.vByte !== null) {
      this.vByte = args.vByte;
    }
    if (args.vShort !== undefined && args.vShort !== null) {
      this.vShort = args.vShort;
    }
    if (args.vInteger !== undefined && args.vInteger !== null) {
      this.vInteger = args.vInteger;
    }
    if (args.vLong !== undefined && args.vLong !== null) {
      this.vLong = args.vLong;
    }
    if (args.vDouble !== undefined && args.vDouble !== null) {
      this.vDouble = args.vDouble;
    }
    if (args.vString !== undefined && args.vString !== null) {
      this.vString = args.vString;
    }
    if (args.vBooleans !== undefined && args.vBooleans !== null) {
      this.vBooleans = Thrift.copyList(args.vBooleans, [null]);
    }
    if (args.vBytes !== undefined && args.vBytes !== null) {
      this.vBytes = args.vBytes;
    }
    if (args.vShorts !== undefined && args.vShorts !== null) {
      this.vShorts = Thrift.copyList(args.vShorts, [null]);
    }
    if (args.vIntegers !== undefined && args.vIntegers !== null) {
      this.vIntegers = Thrift.copyList(args.vIntegers, [null]);
    }
    if (args.vLongs !== undefined && args.vLongs !== null) {
      this.vLongs = Thrift.copyList(args.vLongs, [null]);
    }
    if (args.vDoubles !== undefined && args.vDoubles !== null) {
      this.vDoubles = Thrift.copyList(args.vDoubles, [null]);
    }
    if (args.vStrings !== undefined && args.vStrings !== null) {
      this.vStrings = Thrift.copyList(args.vStrings, [null]);
    }
    if (args.vLists !== undefined && args.vLists !== null) {
      this.vLists = Thrift.copyList(args.vLists, [null]);
    }
  }
};
SlotValue.prototype = {};
SlotValue.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.BOOL) {
        this.vBoolean = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.BYTE) {
        this.vByte = input.readByte().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I16) {
        this.vShort = input.readI16().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I32) {
        this.vInteger = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.I64) {
        this.vLong = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.DOUBLE) {
        this.vDouble = input.readDouble().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 7:
      if (ftype == Thrift.Type.STRING) {
        this.vString = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 8:
      if (ftype == Thrift.Type.LIST) {
        this.vBooleans = [];
        var _rtmp311 = input.readListBegin();
        var _size10 = _rtmp311.size || 0;
        for (var _i12 = 0; _i12 < _size10; ++_i12) {
          var elem13 = null;
          elem13 = input.readBool().value;
          this.vBooleans.push(elem13);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 9:
      if (ftype == Thrift.Type.STRING) {
        this.vBytes = input.readBinary().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 10:
      if (ftype == Thrift.Type.LIST) {
        this.vShorts = [];
        var _rtmp315 = input.readListBegin();
        var _size14 = _rtmp315.size || 0;
        for (var _i16 = 0; _i16 < _size14; ++_i16) {
          var elem17 = null;
          elem17 = input.readI16().value;
          this.vShorts.push(elem17);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 11:
      if (ftype == Thrift.Type.LIST) {
        this.vIntegers = [];
        var _rtmp319 = input.readListBegin();
        var _size18 = _rtmp319.size || 0;
        for (var _i20 = 0; _i20 < _size18; ++_i20) {
          var elem21 = null;
          elem21 = input.readI32().value;
          this.vIntegers.push(elem21);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 12:
      if (ftype == Thrift.Type.LIST) {
        this.vLongs = [];
        var _rtmp323 = input.readListBegin();
        var _size22 = _rtmp323.size || 0;
        for (var _i24 = 0; _i24 < _size22; ++_i24) {
          var elem25 = null;
          elem25 = input.readI64().value;
          this.vLongs.push(elem25);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 13:
      if (ftype == Thrift.Type.LIST) {
        this.vDoubles = [];
        var _rtmp327 = input.readListBegin();
        var _size26 = _rtmp327.size || 0;
        for (var _i28 = 0; _i28 < _size26; ++_i28) {
          var elem29 = null;
          elem29 = input.readDouble().value;
          this.vDoubles.push(elem29);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 14:
      if (ftype == Thrift.Type.LIST) {
        this.vStrings = [];
        var _rtmp331 = input.readListBegin();
        var _size30 = _rtmp331.size || 0;
        for (var _i32 = 0; _i32 < _size30; ++_i32) {
          var elem33 = null;
          elem33 = input.readString().value;
          this.vStrings.push(elem33);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 15:
      if (ftype == Thrift.Type.LIST) {
        this.vLists = [];
        var _rtmp335 = input.readListBegin();
        var _size34 = _rtmp335.size || 0;
        for (var _i36 = 0; _i36 < _size34; ++_i36) {
          var elem37 = null;
          elem37 = new SlotValue();
          elem37.read(input);
          this.vLists.push(elem37);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

SlotValue.prototype.write = function(output) {
  output.writeStructBegin('SlotValue');
  if (this.vBoolean !== null && this.vBoolean !== undefined) {
    output.writeFieldBegin('vBoolean', Thrift.Type.BOOL, 1);
    output.writeBool(this.vBoolean);
    output.writeFieldEnd();
  }
  if (this.vByte !== null && this.vByte !== undefined) {
    output.writeFieldBegin('vByte', Thrift.Type.BYTE, 2);
    output.writeByte(this.vByte);
    output.writeFieldEnd();
  }
  if (this.vShort !== null && this.vShort !== undefined) {
    output.writeFieldBegin('vShort', Thrift.Type.I16, 3);
    output.writeI16(this.vShort);
    output.writeFieldEnd();
  }
  if (this.vInteger !== null && this.vInteger !== undefined) {
    output.writeFieldBegin('vInteger', Thrift.Type.I32, 4);
    output.writeI32(this.vInteger);
    output.writeFieldEnd();
  }
  if (this.vLong !== null && this.vLong !== undefined) {
    output.writeFieldBegin('vLong', Thrift.Type.I64, 5);
    output.writeI64(this.vLong);
    output.writeFieldEnd();
  }
  if (this.vDouble !== null && this.vDouble !== undefined) {
    output.writeFieldBegin('vDouble', Thrift.Type.DOUBLE, 6);
    output.writeDouble(this.vDouble);
    output.writeFieldEnd();
  }
  if (this.vString !== null && this.vString !== undefined) {
    output.writeFieldBegin('vString', Thrift.Type.STRING, 7);
    output.writeString(this.vString);
    output.writeFieldEnd();
  }
  if (this.vBooleans !== null && this.vBooleans !== undefined) {
    output.writeFieldBegin('vBooleans', Thrift.Type.LIST, 8);
    output.writeListBegin(Thrift.Type.BOOL, this.vBooleans.length);
    for (var iter38 in this.vBooleans) {
      if (this.vBooleans.hasOwnProperty(iter38)) {
        iter38 = this.vBooleans[iter38];
        output.writeBool(iter38);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.vBytes !== null && this.vBytes !== undefined) {
    output.writeFieldBegin('vBytes', Thrift.Type.STRING, 9);
    output.writeBinary(this.vBytes);
    output.writeFieldEnd();
  }
  if (this.vShorts !== null && this.vShorts !== undefined) {
    output.writeFieldBegin('vShorts', Thrift.Type.LIST, 10);
    output.writeListBegin(Thrift.Type.I16, this.vShorts.length);
    for (var iter39 in this.vShorts) {
      if (this.vShorts.hasOwnProperty(iter39)) {
        iter39 = this.vShorts[iter39];
        output.writeI16(iter39);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.vIntegers !== null && this.vIntegers !== undefined) {
    output.writeFieldBegin('vIntegers', Thrift.Type.LIST, 11);
    output.writeListBegin(Thrift.Type.I32, this.vIntegers.length);
    for (var iter40 in this.vIntegers) {
      if (this.vIntegers.hasOwnProperty(iter40)) {
        iter40 = this.vIntegers[iter40];
        output.writeI32(iter40);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.vLongs !== null && this.vLongs !== undefined) {
    output.writeFieldBegin('vLongs', Thrift.Type.LIST, 12);
    output.writeListBegin(Thrift.Type.I64, this.vLongs.length);
    for (var iter41 in this.vLongs) {
      if (this.vLongs.hasOwnProperty(iter41)) {
        iter41 = this.vLongs[iter41];
        output.writeI64(iter41);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.vDoubles !== null && this.vDoubles !== undefined) {
    output.writeFieldBegin('vDoubles', Thrift.Type.LIST, 13);
    output.writeListBegin(Thrift.Type.DOUBLE, this.vDoubles.length);
    for (var iter42 in this.vDoubles) {
      if (this.vDoubles.hasOwnProperty(iter42)) {
        iter42 = this.vDoubles[iter42];
        output.writeDouble(iter42);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.vStrings !== null && this.vStrings !== undefined) {
    output.writeFieldBegin('vStrings', Thrift.Type.LIST, 14);
    output.writeListBegin(Thrift.Type.STRING, this.vStrings.length);
    for (var iter43 in this.vStrings) {
      if (this.vStrings.hasOwnProperty(iter43)) {
        iter43 = this.vStrings[iter43];
        output.writeString(iter43);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.vLists !== null && this.vLists !== undefined) {
    output.writeFieldBegin('vLists', Thrift.Type.LIST, 15);
    output.writeListBegin(Thrift.Type.STRUCT, this.vLists.length);
    for (var iter44 in this.vLists) {
      if (this.vLists.hasOwnProperty(iter44)) {
        iter44 = this.vLists[iter44];
        iter44.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Subscription = function(args) {
  this.host = null;
  this.port = null;
  this.queueAddress = null;
  this.queueName = null;
  this.sslRequired = false;
  if (args) {
    if (args.host !== undefined && args.host !== null) {
      this.host = args.host;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field host is unset!');
    }
    if (args.port !== undefined && args.port !== null) {
      this.port = args.port;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field port is unset!');
    }
    if (args.queueAddress !== undefined && args.queueAddress !== null) {
      this.queueAddress = args.queueAddress;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field queueAddress is unset!');
    }
    if (args.queueName !== undefined && args.queueName !== null) {
      this.queueName = args.queueName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field queueName is unset!');
    }
    if (args.sslRequired !== undefined && args.sslRequired !== null) {
      this.sslRequired = args.sslRequired;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sslRequired is unset!');
    }
  }
};
Subscription.prototype = {};
Subscription.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.host = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I32) {
        this.port = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.queueAddress = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.queueName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.BOOL) {
        this.sslRequired = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Subscription.prototype.write = function(output) {
  output.writeStructBegin('Subscription');
  if (this.host !== null && this.host !== undefined) {
    output.writeFieldBegin('host', Thrift.Type.STRING, 1);
    output.writeString(this.host);
    output.writeFieldEnd();
  }
  if (this.port !== null && this.port !== undefined) {
    output.writeFieldBegin('port', Thrift.Type.I32, 2);
    output.writeI32(this.port);
    output.writeFieldEnd();
  }
  if (this.queueAddress !== null && this.queueAddress !== undefined) {
    output.writeFieldBegin('queueAddress', Thrift.Type.STRING, 3);
    output.writeString(this.queueAddress);
    output.writeFieldEnd();
  }
  if (this.queueName !== null && this.queueName !== undefined) {
    output.writeFieldBegin('queueName', Thrift.Type.STRING, 4);
    output.writeString(this.queueName);
    output.writeFieldEnd();
  }
  if (this.sslRequired !== null && this.sslRequired !== undefined) {
    output.writeFieldBegin('sslRequired', Thrift.Type.BOOL, 5);
    output.writeBool(this.sslRequired);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

UnknownQueryLanguage = function(args) {
  this.queryLanguage = null;
  if (args) {
    if (args.queryLanguage !== undefined && args.queryLanguage !== null) {
      this.queryLanguage = args.queryLanguage;
    }
  }
};
Thrift.inherits(UnknownQueryLanguage, Thrift.TException);
UnknownQueryLanguage.prototype.name = 'UnknownQueryLanguage';
UnknownQueryLanguage.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.queryLanguage = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

UnknownQueryLanguage.prototype.write = function(output) {
  output.writeStructBegin('UnknownQueryLanguage');
  if (this.queryLanguage !== null && this.queryLanguage !== undefined) {
    output.writeFieldBegin('queryLanguage', Thrift.Type.STRING, 1);
    output.writeString(this.queryLanguage);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

UnknownRepositoryType = function(args) {
  this.repositoryType = null;
  if (args) {
    if (args.repositoryType !== undefined && args.repositoryType !== null) {
      this.repositoryType = args.repositoryType;
    }
  }
};
Thrift.inherits(UnknownRepositoryType, Thrift.TException);
UnknownRepositoryType.prototype.name = 'UnknownRepositoryType';
UnknownRepositoryType.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.repositoryType = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

UnknownRepositoryType.prototype.write = function(output) {
  output.writeStructBegin('UnknownRepositoryType');
  if (this.repositoryType !== null && this.repositoryType !== undefined) {
    output.writeFieldBegin('repositoryType', Thrift.Type.STRING, 1);
    output.writeString(this.repositoryType);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

UserExists = function(args) {
};
Thrift.inherits(UserExists, Thrift.TException);
UserExists.prototype.name = 'UserExists';
UserExists.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

UserExists.prototype.write = function(output) {
  output.writeStructBegin('UserExists');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

UserNotFound = function(args) {
};
Thrift.inherits(UserNotFound, Thrift.TException);
UserNotFound.prototype.name = 'UserNotFound';
UserNotFound.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

UserNotFound.prototype.write = function(output) {
  output.writeStructBegin('UserNotFound');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

UserProfile = function(args) {
  this.realName = null;
  this.admin = null;
  if (args) {
    if (args.realName !== undefined && args.realName !== null) {
      this.realName = args.realName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field realName is unset!');
    }
    if (args.admin !== undefined && args.admin !== null) {
      this.admin = args.admin;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field admin is unset!');
    }
  }
};
UserProfile.prototype = {};
UserProfile.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.realName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.BOOL) {
        this.admin = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

UserProfile.prototype.write = function(output) {
  output.writeStructBegin('UserProfile');
  if (this.realName !== null && this.realName !== undefined) {
    output.writeFieldBegin('realName', Thrift.Type.STRING, 1);
    output.writeString(this.realName);
    output.writeFieldEnd();
  }
  if (this.admin !== null && this.admin !== undefined) {
    output.writeFieldBegin('admin', Thrift.Type.BOOL, 2);
    output.writeBool(this.admin);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

VCSAuthenticationFailed = function(args) {
};
Thrift.inherits(VCSAuthenticationFailed, Thrift.TException);
VCSAuthenticationFailed.prototype.name = 'VCSAuthenticationFailed';
VCSAuthenticationFailed.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

VCSAuthenticationFailed.prototype.write = function(output) {
  output.writeStructBegin('VCSAuthenticationFailed');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Value = function(args) {
  this.vBoolean = null;
  this.vByte = null;
  this.vShort = null;
  this.vInteger = null;
  this.vLong = null;
  this.vDouble = null;
  this.vString = null;
  if (args) {
    if (args.vBoolean !== undefined && args.vBoolean !== null) {
      this.vBoolean = args.vBoolean;
    }
    if (args.vByte !== undefined && args.vByte !== null) {
      this.vByte = args.vByte;
    }
    if (args.vShort !== undefined && args.vShort !== null) {
      this.vShort = args.vShort;
    }
    if (args.vInteger !== undefined && args.vInteger !== null) {
      this.vInteger = args.vInteger;
    }
    if (args.vLong !== undefined && args.vLong !== null) {
      this.vLong = args.vLong;
    }
    if (args.vDouble !== undefined && args.vDouble !== null) {
      this.vDouble = args.vDouble;
    }
    if (args.vString !== undefined && args.vString !== null) {
      this.vString = args.vString;
    }
  }
};
Value.prototype = {};
Value.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.BOOL) {
        this.vBoolean = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.BYTE) {
        this.vByte = input.readByte().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I16) {
        this.vShort = input.readI16().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I32) {
        this.vInteger = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.I64) {
        this.vLong = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.DOUBLE) {
        this.vDouble = input.readDouble().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 7:
      if (ftype == Thrift.Type.STRING) {
        this.vString = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Value.prototype.write = function(output) {
  output.writeStructBegin('Value');
  if (this.vBoolean !== null && this.vBoolean !== undefined) {
    output.writeFieldBegin('vBoolean', Thrift.Type.BOOL, 1);
    output.writeBool(this.vBoolean);
    output.writeFieldEnd();
  }
  if (this.vByte !== null && this.vByte !== undefined) {
    output.writeFieldBegin('vByte', Thrift.Type.BYTE, 2);
    output.writeByte(this.vByte);
    output.writeFieldEnd();
  }
  if (this.vShort !== null && this.vShort !== undefined) {
    output.writeFieldBegin('vShort', Thrift.Type.I16, 3);
    output.writeI16(this.vShort);
    output.writeFieldEnd();
  }
  if (this.vInteger !== null && this.vInteger !== undefined) {
    output.writeFieldBegin('vInteger', Thrift.Type.I32, 4);
    output.writeI32(this.vInteger);
    output.writeFieldEnd();
  }
  if (this.vLong !== null && this.vLong !== undefined) {
    output.writeFieldBegin('vLong', Thrift.Type.I64, 5);
    output.writeI64(this.vLong);
    output.writeFieldEnd();
  }
  if (this.vDouble !== null && this.vDouble !== undefined) {
    output.writeFieldBegin('vDouble', Thrift.Type.DOUBLE, 6);
    output.writeDouble(this.vDouble);
    output.writeFieldEnd();
  }
  if (this.vString !== null && this.vString !== undefined) {
    output.writeFieldBegin('vString', Thrift.Type.STRING, 7);
    output.writeString(this.vString);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

AttributeSlot = function(args) {
  this.name = null;
  this.value = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.value !== undefined && args.value !== null) {
      this.value = new SlotValue(args.value);
    }
  }
};
AttributeSlot.prototype = {};
AttributeSlot.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.value = new SlotValue();
        this.value.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

AttributeSlot.prototype.write = function(output) {
  output.writeStructBegin('AttributeSlot');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.value !== null && this.value !== undefined) {
    output.writeFieldBegin('value', Thrift.Type.STRUCT, 2);
    this.value.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkAttributeRemovalEvent = function(args) {
  this.vcsItem = null;
  this.id = null;
  this.attribute = null;
  if (args) {
    if (args.vcsItem !== undefined && args.vcsItem !== null) {
      this.vcsItem = new CommitItem(args.vcsItem);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field vcsItem is unset!');
    }
    if (args.id !== undefined && args.id !== null) {
      this.id = args.id;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!');
    }
    if (args.attribute !== undefined && args.attribute !== null) {
      this.attribute = args.attribute;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field attribute is unset!');
    }
  }
};
HawkAttributeRemovalEvent.prototype = {};
HawkAttributeRemovalEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.vcsItem = new CommitItem();
        this.vcsItem.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.id = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.attribute = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkAttributeRemovalEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkAttributeRemovalEvent');
  if (this.vcsItem !== null && this.vcsItem !== undefined) {
    output.writeFieldBegin('vcsItem', Thrift.Type.STRUCT, 1);
    this.vcsItem.write(output);
    output.writeFieldEnd();
  }
  if (this.id !== null && this.id !== undefined) {
    output.writeFieldBegin('id', Thrift.Type.STRING, 2);
    output.writeString(this.id);
    output.writeFieldEnd();
  }
  if (this.attribute !== null && this.attribute !== undefined) {
    output.writeFieldBegin('attribute', Thrift.Type.STRING, 3);
    output.writeString(this.attribute);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkAttributeUpdateEvent = function(args) {
  this.vcsItem = null;
  this.id = null;
  this.attribute = null;
  this.value = null;
  if (args) {
    if (args.vcsItem !== undefined && args.vcsItem !== null) {
      this.vcsItem = new CommitItem(args.vcsItem);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field vcsItem is unset!');
    }
    if (args.id !== undefined && args.id !== null) {
      this.id = args.id;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!');
    }
    if (args.attribute !== undefined && args.attribute !== null) {
      this.attribute = args.attribute;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field attribute is unset!');
    }
    if (args.value !== undefined && args.value !== null) {
      this.value = new SlotValue(args.value);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field value is unset!');
    }
  }
};
HawkAttributeUpdateEvent.prototype = {};
HawkAttributeUpdateEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.vcsItem = new CommitItem();
        this.vcsItem.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.id = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.attribute = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.value = new SlotValue();
        this.value.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkAttributeUpdateEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkAttributeUpdateEvent');
  if (this.vcsItem !== null && this.vcsItem !== undefined) {
    output.writeFieldBegin('vcsItem', Thrift.Type.STRUCT, 1);
    this.vcsItem.write(output);
    output.writeFieldEnd();
  }
  if (this.id !== null && this.id !== undefined) {
    output.writeFieldBegin('id', Thrift.Type.STRING, 2);
    output.writeString(this.id);
    output.writeFieldEnd();
  }
  if (this.attribute !== null && this.attribute !== undefined) {
    output.writeFieldBegin('attribute', Thrift.Type.STRING, 3);
    output.writeString(this.attribute);
    output.writeFieldEnd();
  }
  if (this.value !== null && this.value !== undefined) {
    output.writeFieldBegin('value', Thrift.Type.STRUCT, 4);
    this.value.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkFileAdditionEvent = function(args) {
  this.vcsItem = null;
  if (args) {
    if (args.vcsItem !== undefined && args.vcsItem !== null) {
      this.vcsItem = new CommitItem(args.vcsItem);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field vcsItem is unset!');
    }
  }
};
HawkFileAdditionEvent.prototype = {};
HawkFileAdditionEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.vcsItem = new CommitItem();
        this.vcsItem.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkFileAdditionEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkFileAdditionEvent');
  if (this.vcsItem !== null && this.vcsItem !== undefined) {
    output.writeFieldBegin('vcsItem', Thrift.Type.STRUCT, 1);
    this.vcsItem.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkFileRemovalEvent = function(args) {
  this.vcsItem = null;
  if (args) {
    if (args.vcsItem !== undefined && args.vcsItem !== null) {
      this.vcsItem = new CommitItem(args.vcsItem);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field vcsItem is unset!');
    }
  }
};
HawkFileRemovalEvent.prototype = {};
HawkFileRemovalEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.vcsItem = new CommitItem();
        this.vcsItem.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkFileRemovalEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkFileRemovalEvent');
  if (this.vcsItem !== null && this.vcsItem !== undefined) {
    output.writeFieldBegin('vcsItem', Thrift.Type.STRUCT, 1);
    this.vcsItem.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkModelElementAdditionEvent = function(args) {
  this.vcsItem = null;
  this.metamodelURI = null;
  this.typeName = null;
  this.id = null;
  if (args) {
    if (args.vcsItem !== undefined && args.vcsItem !== null) {
      this.vcsItem = new CommitItem(args.vcsItem);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field vcsItem is unset!');
    }
    if (args.metamodelURI !== undefined && args.metamodelURI !== null) {
      this.metamodelURI = args.metamodelURI;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metamodelURI is unset!');
    }
    if (args.typeName !== undefined && args.typeName !== null) {
      this.typeName = args.typeName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field typeName is unset!');
    }
    if (args.id !== undefined && args.id !== null) {
      this.id = args.id;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!');
    }
  }
};
HawkModelElementAdditionEvent.prototype = {};
HawkModelElementAdditionEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.vcsItem = new CommitItem();
        this.vcsItem.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.metamodelURI = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.typeName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.id = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkModelElementAdditionEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkModelElementAdditionEvent');
  if (this.vcsItem !== null && this.vcsItem !== undefined) {
    output.writeFieldBegin('vcsItem', Thrift.Type.STRUCT, 1);
    this.vcsItem.write(output);
    output.writeFieldEnd();
  }
  if (this.metamodelURI !== null && this.metamodelURI !== undefined) {
    output.writeFieldBegin('metamodelURI', Thrift.Type.STRING, 2);
    output.writeString(this.metamodelURI);
    output.writeFieldEnd();
  }
  if (this.typeName !== null && this.typeName !== undefined) {
    output.writeFieldBegin('typeName', Thrift.Type.STRING, 3);
    output.writeString(this.typeName);
    output.writeFieldEnd();
  }
  if (this.id !== null && this.id !== undefined) {
    output.writeFieldBegin('id', Thrift.Type.STRING, 4);
    output.writeString(this.id);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkModelElementRemovalEvent = function(args) {
  this.vcsItem = null;
  this.id = null;
  if (args) {
    if (args.vcsItem !== undefined && args.vcsItem !== null) {
      this.vcsItem = new CommitItem(args.vcsItem);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field vcsItem is unset!');
    }
    if (args.id !== undefined && args.id !== null) {
      this.id = args.id;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!');
    }
  }
};
HawkModelElementRemovalEvent.prototype = {};
HawkModelElementRemovalEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.vcsItem = new CommitItem();
        this.vcsItem.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.id = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkModelElementRemovalEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkModelElementRemovalEvent');
  if (this.vcsItem !== null && this.vcsItem !== undefined) {
    output.writeFieldBegin('vcsItem', Thrift.Type.STRUCT, 1);
    this.vcsItem.write(output);
    output.writeFieldEnd();
  }
  if (this.id !== null && this.id !== undefined) {
    output.writeFieldBegin('id', Thrift.Type.STRING, 2);
    output.writeString(this.id);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkReferenceAdditionEvent = function(args) {
  this.vcsItem = null;
  this.sourceId = null;
  this.targetId = null;
  this.refName = null;
  if (args) {
    if (args.vcsItem !== undefined && args.vcsItem !== null) {
      this.vcsItem = new CommitItem(args.vcsItem);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field vcsItem is unset!');
    }
    if (args.sourceId !== undefined && args.sourceId !== null) {
      this.sourceId = args.sourceId;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sourceId is unset!');
    }
    if (args.targetId !== undefined && args.targetId !== null) {
      this.targetId = args.targetId;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field targetId is unset!');
    }
    if (args.refName !== undefined && args.refName !== null) {
      this.refName = args.refName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field refName is unset!');
    }
  }
};
HawkReferenceAdditionEvent.prototype = {};
HawkReferenceAdditionEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.vcsItem = new CommitItem();
        this.vcsItem.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.sourceId = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.targetId = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.refName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkReferenceAdditionEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkReferenceAdditionEvent');
  if (this.vcsItem !== null && this.vcsItem !== undefined) {
    output.writeFieldBegin('vcsItem', Thrift.Type.STRUCT, 1);
    this.vcsItem.write(output);
    output.writeFieldEnd();
  }
  if (this.sourceId !== null && this.sourceId !== undefined) {
    output.writeFieldBegin('sourceId', Thrift.Type.STRING, 2);
    output.writeString(this.sourceId);
    output.writeFieldEnd();
  }
  if (this.targetId !== null && this.targetId !== undefined) {
    output.writeFieldBegin('targetId', Thrift.Type.STRING, 3);
    output.writeString(this.targetId);
    output.writeFieldEnd();
  }
  if (this.refName !== null && this.refName !== undefined) {
    output.writeFieldBegin('refName', Thrift.Type.STRING, 4);
    output.writeString(this.refName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkReferenceRemovalEvent = function(args) {
  this.vcsItem = null;
  this.sourceId = null;
  this.targetId = null;
  this.refName = null;
  if (args) {
    if (args.vcsItem !== undefined && args.vcsItem !== null) {
      this.vcsItem = new CommitItem(args.vcsItem);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field vcsItem is unset!');
    }
    if (args.sourceId !== undefined && args.sourceId !== null) {
      this.sourceId = args.sourceId;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field sourceId is unset!');
    }
    if (args.targetId !== undefined && args.targetId !== null) {
      this.targetId = args.targetId;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field targetId is unset!');
    }
    if (args.refName !== undefined && args.refName !== null) {
      this.refName = args.refName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field refName is unset!');
    }
  }
};
HawkReferenceRemovalEvent.prototype = {};
HawkReferenceRemovalEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.vcsItem = new CommitItem();
        this.vcsItem.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.sourceId = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.targetId = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.refName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkReferenceRemovalEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkReferenceRemovalEvent');
  if (this.vcsItem !== null && this.vcsItem !== undefined) {
    output.writeFieldBegin('vcsItem', Thrift.Type.STRUCT, 1);
    this.vcsItem.write(output);
    output.writeFieldEnd();
  }
  if (this.sourceId !== null && this.sourceId !== undefined) {
    output.writeFieldBegin('sourceId', Thrift.Type.STRING, 2);
    output.writeString(this.sourceId);
    output.writeFieldEnd();
  }
  if (this.targetId !== null && this.targetId !== undefined) {
    output.writeFieldBegin('targetId', Thrift.Type.STRING, 3);
    output.writeString(this.targetId);
    output.writeFieldEnd();
  }
  if (this.refName !== null && this.refName !== undefined) {
    output.writeFieldBegin('refName', Thrift.Type.STRING, 4);
    output.writeString(this.refName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

InvalidModelSpec = function(args) {
  this.spec = null;
  this.reason = null;
  if (args) {
    if (args.spec !== undefined && args.spec !== null) {
      this.spec = new ModelSpec(args.spec);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field spec is unset!');
    }
    if (args.reason !== undefined && args.reason !== null) {
      this.reason = args.reason;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field reason is unset!');
    }
  }
};
InvalidModelSpec.prototype = {};
InvalidModelSpec.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.spec = new ModelSpec();
        this.spec.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.reason = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

InvalidModelSpec.prototype.write = function(output) {
  output.writeStructBegin('InvalidModelSpec');
  if (this.spec !== null && this.spec !== undefined) {
    output.writeFieldBegin('spec', Thrift.Type.STRUCT, 1);
    this.spec.write(output);
    output.writeFieldEnd();
  }
  if (this.reason !== null && this.reason !== undefined) {
    output.writeFieldBegin('reason', Thrift.Type.STRING, 2);
    output.writeString(this.reason);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

ModelElementType = function(args) {
  this.id = null;
  this.metamodelUri = null;
  this.typeName = null;
  this.attributes = null;
  this.references = null;
  if (args) {
    if (args.id !== undefined && args.id !== null) {
      this.id = args.id;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field id is unset!');
    }
    if (args.metamodelUri !== undefined && args.metamodelUri !== null) {
      this.metamodelUri = args.metamodelUri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metamodelUri is unset!');
    }
    if (args.typeName !== undefined && args.typeName !== null) {
      this.typeName = args.typeName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field typeName is unset!');
    }
    if (args.attributes !== undefined && args.attributes !== null) {
      this.attributes = Thrift.copyList(args.attributes, [SlotMetadata]);
    }
    if (args.references !== undefined && args.references !== null) {
      this.references = Thrift.copyList(args.references, [SlotMetadata]);
    }
  }
};
ModelElementType.prototype = {};
ModelElementType.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.id = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.metamodelUri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.typeName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.LIST) {
        this.attributes = [];
        var _rtmp346 = input.readListBegin();
        var _size45 = _rtmp346.size || 0;
        for (var _i47 = 0; _i47 < _size45; ++_i47) {
          var elem48 = null;
          elem48 = new SlotMetadata();
          elem48.read(input);
          this.attributes.push(elem48);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.LIST) {
        this.references = [];
        var _rtmp350 = input.readListBegin();
        var _size49 = _rtmp350.size || 0;
        for (var _i51 = 0; _i51 < _size49; ++_i51) {
          var elem52 = null;
          elem52 = new SlotMetadata();
          elem52.read(input);
          this.references.push(elem52);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ModelElementType.prototype.write = function(output) {
  output.writeStructBegin('ModelElementType');
  if (this.id !== null && this.id !== undefined) {
    output.writeFieldBegin('id', Thrift.Type.STRING, 1);
    output.writeString(this.id);
    output.writeFieldEnd();
  }
  if (this.metamodelUri !== null && this.metamodelUri !== undefined) {
    output.writeFieldBegin('metamodelUri', Thrift.Type.STRING, 2);
    output.writeString(this.metamodelUri);
    output.writeFieldEnd();
  }
  if (this.typeName !== null && this.typeName !== undefined) {
    output.writeFieldBegin('typeName', Thrift.Type.STRING, 3);
    output.writeString(this.typeName);
    output.writeFieldEnd();
  }
  if (this.attributes !== null && this.attributes !== undefined) {
    output.writeFieldBegin('attributes', Thrift.Type.LIST, 4);
    output.writeListBegin(Thrift.Type.STRUCT, this.attributes.length);
    for (var iter53 in this.attributes) {
      if (this.attributes.hasOwnProperty(iter53)) {
        iter53 = this.attributes[iter53];
        iter53.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.references !== null && this.references !== undefined) {
    output.writeFieldBegin('references', Thrift.Type.LIST, 5);
    output.writeListBegin(Thrift.Type.STRUCT, this.references.length);
    for (var iter54 in this.references) {
      if (this.references.hasOwnProperty(iter54)) {
        iter54 = this.references[iter54];
        iter54.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

ReferenceSlot = function(args) {
  this.name = null;
  this.position = null;
  this.positions = null;
  this.id = null;
  this.ids = null;
  this.mixed = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.position !== undefined && args.position !== null) {
      this.position = args.position;
    }
    if (args.positions !== undefined && args.positions !== null) {
      this.positions = Thrift.copyList(args.positions, [null]);
    }
    if (args.id !== undefined && args.id !== null) {
      this.id = args.id;
    }
    if (args.ids !== undefined && args.ids !== null) {
      this.ids = Thrift.copyList(args.ids, [null]);
    }
    if (args.mixed !== undefined && args.mixed !== null) {
      this.mixed = Thrift.copyList(args.mixed, [MixedReference]);
    }
  }
};
ReferenceSlot.prototype = {};
ReferenceSlot.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I32) {
        this.position = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.positions = [];
        var _rtmp356 = input.readListBegin();
        var _size55 = _rtmp356.size || 0;
        for (var _i57 = 0; _i57 < _size55; ++_i57) {
          var elem58 = null;
          elem58 = input.readI32().value;
          this.positions.push(elem58);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.id = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.LIST) {
        this.ids = [];
        var _rtmp360 = input.readListBegin();
        var _size59 = _rtmp360.size || 0;
        for (var _i61 = 0; _i61 < _size59; ++_i61) {
          var elem62 = null;
          elem62 = input.readString().value;
          this.ids.push(elem62);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.LIST) {
        this.mixed = [];
        var _rtmp364 = input.readListBegin();
        var _size63 = _rtmp364.size || 0;
        for (var _i65 = 0; _i65 < _size63; ++_i65) {
          var elem66 = null;
          elem66 = new MixedReference();
          elem66.read(input);
          this.mixed.push(elem66);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ReferenceSlot.prototype.write = function(output) {
  output.writeStructBegin('ReferenceSlot');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.position !== null && this.position !== undefined) {
    output.writeFieldBegin('position', Thrift.Type.I32, 2);
    output.writeI32(this.position);
    output.writeFieldEnd();
  }
  if (this.positions !== null && this.positions !== undefined) {
    output.writeFieldBegin('positions', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.I32, this.positions.length);
    for (var iter67 in this.positions) {
      if (this.positions.hasOwnProperty(iter67)) {
        iter67 = this.positions[iter67];
        output.writeI32(iter67);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.id !== null && this.id !== undefined) {
    output.writeFieldBegin('id', Thrift.Type.STRING, 4);
    output.writeString(this.id);
    output.writeFieldEnd();
  }
  if (this.ids !== null && this.ids !== undefined) {
    output.writeFieldBegin('ids', Thrift.Type.LIST, 5);
    output.writeListBegin(Thrift.Type.STRING, this.ids.length);
    for (var iter68 in this.ids) {
      if (this.ids.hasOwnProperty(iter68)) {
        iter68 = this.ids[iter68];
        output.writeString(iter68);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.mixed !== null && this.mixed !== undefined) {
    output.writeFieldBegin('mixed', Thrift.Type.LIST, 6);
    output.writeListBegin(Thrift.Type.STRUCT, this.mixed.length);
    for (var iter69 in this.mixed) {
      if (this.mixed.hasOwnProperty(iter69)) {
        iter69 = this.mixed[iter69];
        iter69.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkChangeEvent = function(args) {
  this.modelElementAddition = null;
  this.modelElementRemoval = null;
  this.modelElementAttributeUpdate = null;
  this.modelElementAttributeRemoval = null;
  this.referenceAddition = null;
  this.referenceRemoval = null;
  this.syncStart = null;
  this.syncEnd = null;
  this.fileAddition = null;
  this.fileRemoval = null;
  if (args) {
    if (args.modelElementAddition !== undefined && args.modelElementAddition !== null) {
      this.modelElementAddition = new HawkModelElementAdditionEvent(args.modelElementAddition);
    }
    if (args.modelElementRemoval !== undefined && args.modelElementRemoval !== null) {
      this.modelElementRemoval = new HawkModelElementRemovalEvent(args.modelElementRemoval);
    }
    if (args.modelElementAttributeUpdate !== undefined && args.modelElementAttributeUpdate !== null) {
      this.modelElementAttributeUpdate = new HawkAttributeUpdateEvent(args.modelElementAttributeUpdate);
    }
    if (args.modelElementAttributeRemoval !== undefined && args.modelElementAttributeRemoval !== null) {
      this.modelElementAttributeRemoval = new HawkAttributeRemovalEvent(args.modelElementAttributeRemoval);
    }
    if (args.referenceAddition !== undefined && args.referenceAddition !== null) {
      this.referenceAddition = new HawkReferenceAdditionEvent(args.referenceAddition);
    }
    if (args.referenceRemoval !== undefined && args.referenceRemoval !== null) {
      this.referenceRemoval = new HawkReferenceRemovalEvent(args.referenceRemoval);
    }
    if (args.syncStart !== undefined && args.syncStart !== null) {
      this.syncStart = new HawkSynchronizationStartEvent(args.syncStart);
    }
    if (args.syncEnd !== undefined && args.syncEnd !== null) {
      this.syncEnd = new HawkSynchronizationEndEvent(args.syncEnd);
    }
    if (args.fileAddition !== undefined && args.fileAddition !== null) {
      this.fileAddition = new HawkFileAdditionEvent(args.fileAddition);
    }
    if (args.fileRemoval !== undefined && args.fileRemoval !== null) {
      this.fileRemoval = new HawkFileRemovalEvent(args.fileRemoval);
    }
  }
};
HawkChangeEvent.prototype = {};
HawkChangeEvent.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.modelElementAddition = new HawkModelElementAdditionEvent();
        this.modelElementAddition.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.modelElementRemoval = new HawkModelElementRemovalEvent();
        this.modelElementRemoval.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.modelElementAttributeUpdate = new HawkAttributeUpdateEvent();
        this.modelElementAttributeUpdate.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.modelElementAttributeRemoval = new HawkAttributeRemovalEvent();
        this.modelElementAttributeRemoval.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRUCT) {
        this.referenceAddition = new HawkReferenceAdditionEvent();
        this.referenceAddition.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.STRUCT) {
        this.referenceRemoval = new HawkReferenceRemovalEvent();
        this.referenceRemoval.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 7:
      if (ftype == Thrift.Type.STRUCT) {
        this.syncStart = new HawkSynchronizationStartEvent();
        this.syncStart.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 8:
      if (ftype == Thrift.Type.STRUCT) {
        this.syncEnd = new HawkSynchronizationEndEvent();
        this.syncEnd.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 9:
      if (ftype == Thrift.Type.STRUCT) {
        this.fileAddition = new HawkFileAdditionEvent();
        this.fileAddition.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 10:
      if (ftype == Thrift.Type.STRUCT) {
        this.fileRemoval = new HawkFileRemovalEvent();
        this.fileRemoval.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkChangeEvent.prototype.write = function(output) {
  output.writeStructBegin('HawkChangeEvent');
  if (this.modelElementAddition !== null && this.modelElementAddition !== undefined) {
    output.writeFieldBegin('modelElementAddition', Thrift.Type.STRUCT, 1);
    this.modelElementAddition.write(output);
    output.writeFieldEnd();
  }
  if (this.modelElementRemoval !== null && this.modelElementRemoval !== undefined) {
    output.writeFieldBegin('modelElementRemoval', Thrift.Type.STRUCT, 2);
    this.modelElementRemoval.write(output);
    output.writeFieldEnd();
  }
  if (this.modelElementAttributeUpdate !== null && this.modelElementAttributeUpdate !== undefined) {
    output.writeFieldBegin('modelElementAttributeUpdate', Thrift.Type.STRUCT, 3);
    this.modelElementAttributeUpdate.write(output);
    output.writeFieldEnd();
  }
  if (this.modelElementAttributeRemoval !== null && this.modelElementAttributeRemoval !== undefined) {
    output.writeFieldBegin('modelElementAttributeRemoval', Thrift.Type.STRUCT, 4);
    this.modelElementAttributeRemoval.write(output);
    output.writeFieldEnd();
  }
  if (this.referenceAddition !== null && this.referenceAddition !== undefined) {
    output.writeFieldBegin('referenceAddition', Thrift.Type.STRUCT, 5);
    this.referenceAddition.write(output);
    output.writeFieldEnd();
  }
  if (this.referenceRemoval !== null && this.referenceRemoval !== undefined) {
    output.writeFieldBegin('referenceRemoval', Thrift.Type.STRUCT, 6);
    this.referenceRemoval.write(output);
    output.writeFieldEnd();
  }
  if (this.syncStart !== null && this.syncStart !== undefined) {
    output.writeFieldBegin('syncStart', Thrift.Type.STRUCT, 7);
    this.syncStart.write(output);
    output.writeFieldEnd();
  }
  if (this.syncEnd !== null && this.syncEnd !== undefined) {
    output.writeFieldBegin('syncEnd', Thrift.Type.STRUCT, 8);
    this.syncEnd.write(output);
    output.writeFieldEnd();
  }
  if (this.fileAddition !== null && this.fileAddition !== undefined) {
    output.writeFieldBegin('fileAddition', Thrift.Type.STRUCT, 9);
    this.fileAddition.write(output);
    output.writeFieldEnd();
  }
  if (this.fileRemoval !== null && this.fileRemoval !== undefined) {
    output.writeFieldBegin('fileRemoval', Thrift.Type.STRUCT, 10);
    this.fileRemoval.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkQueryOptions = function(args) {
  this.repositoryPattern = '*';
  this.filePatterns = null;
  this.defaultNamespaces = null;
  this.includeAttributes = true;
  this.includeReferences = true;
  this.includeNodeIDs = false;
  this.includeContained = true;
  this.effectiveMetamodelIncludes = null;
  this.effectiveMetamodelExcludes = null;
  this.includeDerived = true;
  if (args) {
    if (args.repositoryPattern !== undefined && args.repositoryPattern !== null) {
      this.repositoryPattern = args.repositoryPattern;
    }
    if (args.filePatterns !== undefined && args.filePatterns !== null) {
      this.filePatterns = Thrift.copyList(args.filePatterns, [null]);
    }
    if (args.defaultNamespaces !== undefined && args.defaultNamespaces !== null) {
      this.defaultNamespaces = args.defaultNamespaces;
    }
    if (args.includeAttributes !== undefined && args.includeAttributes !== null) {
      this.includeAttributes = args.includeAttributes;
    }
    if (args.includeReferences !== undefined && args.includeReferences !== null) {
      this.includeReferences = args.includeReferences;
    }
    if (args.includeNodeIDs !== undefined && args.includeNodeIDs !== null) {
      this.includeNodeIDs = args.includeNodeIDs;
    }
    if (args.includeContained !== undefined && args.includeContained !== null) {
      this.includeContained = args.includeContained;
    }
    if (args.effectiveMetamodelIncludes !== undefined && args.effectiveMetamodelIncludes !== null) {
      this.effectiveMetamodelIncludes = Thrift.copyMap(args.effectiveMetamodelIncludes, [Thrift.copyMap, Thrift.copyList, null]);
    }
    if (args.effectiveMetamodelExcludes !== undefined && args.effectiveMetamodelExcludes !== null) {
      this.effectiveMetamodelExcludes = Thrift.copyMap(args.effectiveMetamodelExcludes, [Thrift.copyMap, Thrift.copyList, null]);
    }
    if (args.includeDerived !== undefined && args.includeDerived !== null) {
      this.includeDerived = args.includeDerived;
    }
  }
};
HawkQueryOptions.prototype = {};
HawkQueryOptions.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.repositoryPattern = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.LIST) {
        this.filePatterns = [];
        var _rtmp371 = input.readListBegin();
        var _size70 = _rtmp371.size || 0;
        for (var _i72 = 0; _i72 < _size70; ++_i72) {
          var elem73 = null;
          elem73 = input.readString().value;
          this.filePatterns.push(elem73);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.defaultNamespaces = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.BOOL) {
        this.includeAttributes = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.BOOL) {
        this.includeReferences = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.BOOL) {
        this.includeNodeIDs = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 7:
      if (ftype == Thrift.Type.BOOL) {
        this.includeContained = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 8:
      if (ftype == Thrift.Type.MAP) {
        this.effectiveMetamodelIncludes = {};
        var _rtmp375 = input.readMapBegin();
        var _size74 = _rtmp375.size || 0;
        for (var _i76 = 0; _i76 < _size74; ++_i76) {
          if (_i76 > 0 ) {
            if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
              input.rstack.pop();
            }
          }
          var key77 = null;
          var val78 = null;
          key77 = input.readString().value;
          val78 = {};
          var _rtmp380 = input.readMapBegin();
          var _size79 = _rtmp380.size || 0;
          for (var _i81 = 0; _i81 < _size79; ++_i81) {
            if (_i81 > 0 ) {
              if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
                input.rstack.pop();
              }
            }
            var key82 = null;
            var val83 = null;
            key82 = input.readString().value;
            val83 = [];
            var _rtmp385 = input.readSetBegin();
            var _size84 = _rtmp385.size || 0;
            for (var _i86 = 0; _i86 < _size84; ++_i86) {
              var elem87 = null;
              elem87 = input.readString().value;
              val83.push(elem87);
            }
            input.readSetEnd();
            val78[key82] = val83;
          }
          input.readMapEnd();
          this.effectiveMetamodelIncludes[key77] = val78;
        }
        input.readMapEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 9:
      if (ftype == Thrift.Type.MAP) {
        this.effectiveMetamodelExcludes = {};
        var _rtmp389 = input.readMapBegin();
        var _size88 = _rtmp389.size || 0;
        for (var _i90 = 0; _i90 < _size88; ++_i90) {
          if (_i90 > 0 ) {
            if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
              input.rstack.pop();
            }
          }
          var key91 = null;
          var val92 = null;
          key91 = input.readString().value;
          val92 = {};
          var _rtmp394 = input.readMapBegin();
          var _size93 = _rtmp394.size || 0;
          for (var _i95 = 0; _i95 < _size93; ++_i95) {
            if (_i95 > 0 ) {
              if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
                input.rstack.pop();
              }
            }
            var key96 = null;
            var val97 = null;
            key96 = input.readString().value;
            val97 = [];
            var _rtmp399 = input.readSetBegin();
            var _size98 = _rtmp399.size || 0;
            for (var _i100 = 0; _i100 < _size98; ++_i100) {
              var elem101 = null;
              elem101 = input.readString().value;
              val97.push(elem101);
            }
            input.readSetEnd();
            val92[key96] = val97;
          }
          input.readMapEnd();
          this.effectiveMetamodelExcludes[key91] = val92;
        }
        input.readMapEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 10:
      if (ftype == Thrift.Type.BOOL) {
        this.includeDerived = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

HawkQueryOptions.prototype.write = function(output) {
  output.writeStructBegin('HawkQueryOptions');
  if (this.repositoryPattern !== null && this.repositoryPattern !== undefined) {
    output.writeFieldBegin('repositoryPattern', Thrift.Type.STRING, 1);
    output.writeString(this.repositoryPattern);
    output.writeFieldEnd();
  }
  if (this.filePatterns !== null && this.filePatterns !== undefined) {
    output.writeFieldBegin('filePatterns', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRING, this.filePatterns.length);
    for (var iter102 in this.filePatterns) {
      if (this.filePatterns.hasOwnProperty(iter102)) {
        iter102 = this.filePatterns[iter102];
        output.writeString(iter102);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.defaultNamespaces !== null && this.defaultNamespaces !== undefined) {
    output.writeFieldBegin('defaultNamespaces', Thrift.Type.STRING, 3);
    output.writeString(this.defaultNamespaces);
    output.writeFieldEnd();
  }
  if (this.includeAttributes !== null && this.includeAttributes !== undefined) {
    output.writeFieldBegin('includeAttributes', Thrift.Type.BOOL, 4);
    output.writeBool(this.includeAttributes);
    output.writeFieldEnd();
  }
  if (this.includeReferences !== null && this.includeReferences !== undefined) {
    output.writeFieldBegin('includeReferences', Thrift.Type.BOOL, 5);
    output.writeBool(this.includeReferences);
    output.writeFieldEnd();
  }
  if (this.includeNodeIDs !== null && this.includeNodeIDs !== undefined) {
    output.writeFieldBegin('includeNodeIDs', Thrift.Type.BOOL, 6);
    output.writeBool(this.includeNodeIDs);
    output.writeFieldEnd();
  }
  if (this.includeContained !== null && this.includeContained !== undefined) {
    output.writeFieldBegin('includeContained', Thrift.Type.BOOL, 7);
    output.writeBool(this.includeContained);
    output.writeFieldEnd();
  }
  if (this.effectiveMetamodelIncludes !== null && this.effectiveMetamodelIncludes !== undefined) {
    output.writeFieldBegin('effectiveMetamodelIncludes', Thrift.Type.MAP, 8);
    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.MAP, Thrift.objectLength(this.effectiveMetamodelIncludes));
    for (var kiter103 in this.effectiveMetamodelIncludes) {
      if (this.effectiveMetamodelIncludes.hasOwnProperty(kiter103)) {
        var viter104 = this.effectiveMetamodelIncludes[kiter103];
        output.writeString(kiter103);
        output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.SET, Thrift.objectLength(viter104));
        for (var kiter105 in viter104) {
          if (viter104.hasOwnProperty(kiter105)) {
            var viter106 = viter104[kiter105];
            output.writeString(kiter105);
            output.writeSetBegin(Thrift.Type.STRING, viter106.length);
            for (var iter107 in viter106) {
              if (viter106.hasOwnProperty(iter107)) {
                iter107 = viter106[iter107];
                output.writeString(iter107);
              }
            }
            output.writeSetEnd();
          }
        }
        output.writeMapEnd();
      }
    }
    output.writeMapEnd();
    output.writeFieldEnd();
  }
  if (this.effectiveMetamodelExcludes !== null && this.effectiveMetamodelExcludes !== undefined) {
    output.writeFieldBegin('effectiveMetamodelExcludes', Thrift.Type.MAP, 9);
    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.MAP, Thrift.objectLength(this.effectiveMetamodelExcludes));
    for (var kiter108 in this.effectiveMetamodelExcludes) {
      if (this.effectiveMetamodelExcludes.hasOwnProperty(kiter108)) {
        var viter109 = this.effectiveMetamodelExcludes[kiter108];
        output.writeString(kiter108);
        output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.SET, Thrift.objectLength(viter109));
        for (var kiter110 in viter109) {
          if (viter109.hasOwnProperty(kiter110)) {
            var viter111 = viter109[kiter110];
            output.writeString(kiter110);
            output.writeSetBegin(Thrift.Type.STRING, viter111.length);
            for (var iter112 in viter111) {
              if (viter111.hasOwnProperty(iter112)) {
                iter112 = viter111[iter112];
                output.writeString(iter112);
              }
            }
            output.writeSetEnd();
          }
        }
        output.writeMapEnd();
      }
    }
    output.writeMapEnd();
    output.writeFieldEnd();
  }
  if (this.includeDerived !== null && this.includeDerived !== undefined) {
    output.writeFieldBegin('includeDerived', Thrift.Type.BOOL, 10);
    output.writeBool(this.includeDerived);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

ModelElement = function(args) {
  this.id = null;
  this.repositoryURL = null;
  this.file = null;
  this.metamodelUri = null;
  this.typeName = null;
  this.attributes = null;
  this.references = null;
  this.containers = null;
  if (args) {
    if (args.id !== undefined && args.id !== null) {
      this.id = args.id;
    }
    if (args.repositoryURL !== undefined && args.repositoryURL !== null) {
      this.repositoryURL = args.repositoryURL;
    }
    if (args.file !== undefined && args.file !== null) {
      this.file = args.file;
    }
    if (args.metamodelUri !== undefined && args.metamodelUri !== null) {
      this.metamodelUri = args.metamodelUri;
    }
    if (args.typeName !== undefined && args.typeName !== null) {
      this.typeName = args.typeName;
    }
    if (args.attributes !== undefined && args.attributes !== null) {
      this.attributes = Thrift.copyList(args.attributes, [AttributeSlot]);
    }
    if (args.references !== undefined && args.references !== null) {
      this.references = Thrift.copyList(args.references, [ReferenceSlot]);
    }
    if (args.containers !== undefined && args.containers !== null) {
      this.containers = Thrift.copyList(args.containers, [null]);
    }
  }
};
ModelElement.prototype = {};
ModelElement.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.id = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.repositoryURL = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.file = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.metamodelUri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRING) {
        this.typeName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.LIST) {
        this.attributes = [];
        var _rtmp3114 = input.readListBegin();
        var _size113 = _rtmp3114.size || 0;
        for (var _i115 = 0; _i115 < _size113; ++_i115) {
          var elem116 = null;
          elem116 = new AttributeSlot();
          elem116.read(input);
          this.attributes.push(elem116);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 7:
      if (ftype == Thrift.Type.LIST) {
        this.references = [];
        var _rtmp3118 = input.readListBegin();
        var _size117 = _rtmp3118.size || 0;
        for (var _i119 = 0; _i119 < _size117; ++_i119) {
          var elem120 = null;
          elem120 = new ReferenceSlot();
          elem120.read(input);
          this.references.push(elem120);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 8:
      if (ftype == Thrift.Type.LIST) {
        this.containers = [];
        var _rtmp3122 = input.readListBegin();
        var _size121 = _rtmp3122.size || 0;
        for (var _i123 = 0; _i123 < _size121; ++_i123) {
          var elem124 = null;
          elem124 = new ContainerSlot();
          elem124.read(input);
          this.containers.push(elem124);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ModelElement.prototype.write = function(output) {
  output.writeStructBegin('ModelElement');
  if (this.id !== null && this.id !== undefined) {
    output.writeFieldBegin('id', Thrift.Type.STRING, 1);
    output.writeString(this.id);
    output.writeFieldEnd();
  }
  if (this.repositoryURL !== null && this.repositoryURL !== undefined) {
    output.writeFieldBegin('repositoryURL', Thrift.Type.STRING, 2);
    output.writeString(this.repositoryURL);
    output.writeFieldEnd();
  }
  if (this.file !== null && this.file !== undefined) {
    output.writeFieldBegin('file', Thrift.Type.STRING, 3);
    output.writeString(this.file);
    output.writeFieldEnd();
  }
  if (this.metamodelUri !== null && this.metamodelUri !== undefined) {
    output.writeFieldBegin('metamodelUri', Thrift.Type.STRING, 4);
    output.writeString(this.metamodelUri);
    output.writeFieldEnd();
  }
  if (this.typeName !== null && this.typeName !== undefined) {
    output.writeFieldBegin('typeName', Thrift.Type.STRING, 5);
    output.writeString(this.typeName);
    output.writeFieldEnd();
  }
  if (this.attributes !== null && this.attributes !== undefined) {
    output.writeFieldBegin('attributes', Thrift.Type.LIST, 6);
    output.writeListBegin(Thrift.Type.STRUCT, this.attributes.length);
    for (var iter125 in this.attributes) {
      if (this.attributes.hasOwnProperty(iter125)) {
        iter125 = this.attributes[iter125];
        iter125.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.references !== null && this.references !== undefined) {
    output.writeFieldBegin('references', Thrift.Type.LIST, 7);
    output.writeListBegin(Thrift.Type.STRUCT, this.references.length);
    for (var iter126 in this.references) {
      if (this.references.hasOwnProperty(iter126)) {
        iter126 = this.references[iter126];
        iter126.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.containers !== null && this.containers !== undefined) {
    output.writeFieldBegin('containers', Thrift.Type.LIST, 8);
    output.writeListBegin(Thrift.Type.STRUCT, this.containers.length);
    for (var iter127 in this.containers) {
      if (this.containers.hasOwnProperty(iter127)) {
        iter127 = this.containers[iter127];
        iter127.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

ContainerSlot = function(args) {
  this.name = null;
  this.elements = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.elements !== undefined && args.elements !== null) {
      this.elements = Thrift.copyList(args.elements, [ModelElement]);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field elements is unset!');
    }
  }
};
ContainerSlot.prototype = {};
ContainerSlot.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.LIST) {
        this.elements = [];
        var _rtmp3129 = input.readListBegin();
        var _size128 = _rtmp3129.size || 0;
        for (var _i130 = 0; _i130 < _size128; ++_i130) {
          var elem131 = null;
          elem131 = new ModelElement();
          elem131.read(input);
          this.elements.push(elem131);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

ContainerSlot.prototype.write = function(output) {
  output.writeStructBegin('ContainerSlot');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.elements !== null && this.elements !== undefined) {
    output.writeFieldBegin('elements', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRUCT, this.elements.length);
    for (var iter132 in this.elements) {
      if (this.elements.hasOwnProperty(iter132)) {
        iter132 = this.elements[iter132];
        iter132.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

QueryResult = function(args) {
  this.vBoolean = null;
  this.vByte = null;
  this.vShort = null;
  this.vInteger = null;
  this.vLong = null;
  this.vDouble = null;
  this.vString = null;
  this.vModelElement = null;
  this.vModelElementType = null;
  this.vMap = null;
  this.vList = null;
  if (args) {
    if (args.vBoolean !== undefined && args.vBoolean !== null) {
      this.vBoolean = args.vBoolean;
    }
    if (args.vByte !== undefined && args.vByte !== null) {
      this.vByte = args.vByte;
    }
    if (args.vShort !== undefined && args.vShort !== null) {
      this.vShort = args.vShort;
    }
    if (args.vInteger !== undefined && args.vInteger !== null) {
      this.vInteger = args.vInteger;
    }
    if (args.vLong !== undefined && args.vLong !== null) {
      this.vLong = args.vLong;
    }
    if (args.vDouble !== undefined && args.vDouble !== null) {
      this.vDouble = args.vDouble;
    }
    if (args.vString !== undefined && args.vString !== null) {
      this.vString = args.vString;
    }
    if (args.vModelElement !== undefined && args.vModelElement !== null) {
      this.vModelElement = new ModelElement(args.vModelElement);
    }
    if (args.vModelElementType !== undefined && args.vModelElementType !== null) {
      this.vModelElementType = new ModelElementType(args.vModelElementType);
    }
    if (args.vMap !== undefined && args.vMap !== null) {
      this.vMap = Thrift.copyMap(args.vMap, [null]);
    }
    if (args.vList !== undefined && args.vList !== null) {
      this.vList = Thrift.copyList(args.vList, [null]);
    }
  }
};
QueryResult.prototype = {};
QueryResult.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.BOOL) {
        this.vBoolean = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.BYTE) {
        this.vByte = input.readByte().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I16) {
        this.vShort = input.readI16().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I32) {
        this.vInteger = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.I64) {
        this.vLong = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.DOUBLE) {
        this.vDouble = input.readDouble().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 7:
      if (ftype == Thrift.Type.STRING) {
        this.vString = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 8:
      if (ftype == Thrift.Type.STRUCT) {
        this.vModelElement = new ModelElement();
        this.vModelElement.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 9:
      if (ftype == Thrift.Type.STRUCT) {
        this.vModelElementType = new ModelElementType();
        this.vModelElementType.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 10:
      if (ftype == Thrift.Type.MAP) {
        this.vMap = {};
        var _rtmp3134 = input.readMapBegin();
        var _size133 = _rtmp3134.size || 0;
        for (var _i135 = 0; _i135 < _size133; ++_i135) {
          if (_i135 > 0 ) {
            if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) {
              input.rstack.pop();
            }
          }
          var key136 = null;
          var val137 = null;
          key136 = input.readString().value;
          val137 = new QueryResult();
          val137.read(input);
          this.vMap[key136] = val137;
        }
        input.readMapEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 11:
      if (ftype == Thrift.Type.LIST) {
        this.vList = [];
        var _rtmp3139 = input.readListBegin();
        var _size138 = _rtmp3139.size || 0;
        for (var _i140 = 0; _i140 < _size138; ++_i140) {
          var elem141 = null;
          elem141 = new QueryResult();
          elem141.read(input);
          this.vList.push(elem141);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

QueryResult.prototype.write = function(output) {
  output.writeStructBegin('QueryResult');
  if (this.vBoolean !== null && this.vBoolean !== undefined) {
    output.writeFieldBegin('vBoolean', Thrift.Type.BOOL, 1);
    output.writeBool(this.vBoolean);
    output.writeFieldEnd();
  }
  if (this.vByte !== null && this.vByte !== undefined) {
    output.writeFieldBegin('vByte', Thrift.Type.BYTE, 2);
    output.writeByte(this.vByte);
    output.writeFieldEnd();
  }
  if (this.vShort !== null && this.vShort !== undefined) {
    output.writeFieldBegin('vShort', Thrift.Type.I16, 3);
    output.writeI16(this.vShort);
    output.writeFieldEnd();
  }
  if (this.vInteger !== null && this.vInteger !== undefined) {
    output.writeFieldBegin('vInteger', Thrift.Type.I32, 4);
    output.writeI32(this.vInteger);
    output.writeFieldEnd();
  }
  if (this.vLong !== null && this.vLong !== undefined) {
    output.writeFieldBegin('vLong', Thrift.Type.I64, 5);
    output.writeI64(this.vLong);
    output.writeFieldEnd();
  }
  if (this.vDouble !== null && this.vDouble !== undefined) {
    output.writeFieldBegin('vDouble', Thrift.Type.DOUBLE, 6);
    output.writeDouble(this.vDouble);
    output.writeFieldEnd();
  }
  if (this.vString !== null && this.vString !== undefined) {
    output.writeFieldBegin('vString', Thrift.Type.STRING, 7);
    output.writeString(this.vString);
    output.writeFieldEnd();
  }
  if (this.vModelElement !== null && this.vModelElement !== undefined) {
    output.writeFieldBegin('vModelElement', Thrift.Type.STRUCT, 8);
    this.vModelElement.write(output);
    output.writeFieldEnd();
  }
  if (this.vModelElementType !== null && this.vModelElementType !== undefined) {
    output.writeFieldBegin('vModelElementType', Thrift.Type.STRUCT, 9);
    this.vModelElementType.write(output);
    output.writeFieldEnd();
  }
  if (this.vMap !== null && this.vMap !== undefined) {
    output.writeFieldBegin('vMap', Thrift.Type.MAP, 10);
    output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.vMap));
    for (var kiter142 in this.vMap) {
      if (this.vMap.hasOwnProperty(kiter142)) {
        var viter143 = this.vMap[kiter142];
        output.writeString(kiter142);
        viter143.write(output);
      }
    }
    output.writeMapEnd();
    output.writeFieldEnd();
  }
  if (this.vList !== null && this.vList !== undefined) {
    output.writeFieldBegin('vList', Thrift.Type.LIST, 11);
    output.writeListBegin(Thrift.Type.STRUCT, this.vList.length);
    for (var iter144 in this.vList) {
      if (this.vList.hasOwnProperty(iter144)) {
        iter144 = this.vList[iter144];
        iter144.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

QueryReport = function(args) {
  this.result = null;
  this.wallMillis = null;
  this.isCancelled = null;
  if (args) {
    if (args.result !== undefined && args.result !== null) {
      this.result = new QueryResult(args.result);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field result is unset!');
    }
    if (args.wallMillis !== undefined && args.wallMillis !== null) {
      this.wallMillis = args.wallMillis;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field wallMillis is unset!');
    }
    if (args.isCancelled !== undefined && args.isCancelled !== null) {
      this.isCancelled = args.isCancelled;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field isCancelled is unset!');
    }
  }
};
QueryReport.prototype = {};
QueryReport.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.result = new QueryResult();
        this.result.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I64) {
        this.wallMillis = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.BOOL) {
        this.isCancelled = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

QueryReport.prototype.write = function(output) {
  output.writeStructBegin('QueryReport');
  if (this.result !== null && this.result !== undefined) {
    output.writeFieldBegin('result', Thrift.Type.STRUCT, 1);
    this.result.write(output);
    output.writeFieldEnd();
  }
  if (this.wallMillis !== null && this.wallMillis !== undefined) {
    output.writeFieldBegin('wallMillis', Thrift.Type.I64, 2);
    output.writeI64(this.wallMillis);
    output.writeFieldEnd();
  }
  if (this.isCancelled !== null && this.isCancelled !== undefined) {
    output.writeFieldBegin('isCancelled', Thrift.Type.BOOL, 3);
    output.writeBool(this.isCancelled);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

