code: function Message(name, attrs, opts) {
    opts = opts || {};
  
    if (!types.isValidName(name)) {
      throw new Error(f('invalid message name: %s', name));
    }
    this._name = name;
  
    var recordName = f('org.apache.avro.ipc.%sRequest', name);
    this._requestType = types.createType({
      name: recordName,
      type: 'record',
      namespace: opts.namespace || '', // Don't leak request namespace.
      fields: attrs.request
    }, opts);
    // We remove the record from the registry to prevent it from being exported
    // in the protocol's schema.
    delete opts.registry[recordName];
  
    if (!attrs.response) {
      throw new Error('missing response');
    }
    this._responseType = types.createType(attrs.response, opts);
  
    var errors = attrs.errors || [];
    errors.unshift('string');
    this._errorType = types.createType(errors, opts);
  
    this._oneWay = !!attrs['one-way'];
    if (this._oneWay) {
      if (this._responseType.getTypeName() !== 'null' || errors.length > 1) {
        throw new Error('unapplicable one-way parameter');
      }
    }
  }
docs: An Avro message.
  
  It contains the various types used to send it (request, error, response).