Source: payments/AssociatedPayment.js

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */

var payments_AssociationType = require("../payments/AssociationType");

/** Represents a relationship between two Payment objects */
/**
* @constructor
* @memberof payments
*/
var AssociatedPayment = function() {
  this._class_ = AssociatedPayment;
  this.id = undefined;
  this.type = undefined;
};


/**
* Set the field value
* Payment identifier
*
* @memberof payments.AssociatedPayment
* @param {String} id 
*/
AssociatedPayment.prototype.setId = function(id) {
  this.id = id;
};

/**
* Get the field value
* Payment identifier
* @memberof payments.AssociatedPayment
* @return {String} 
*/
AssociatedPayment.prototype.getId = function() {
  return this.id;
};

/**
* Set the field value
* The type of association
*
* @memberof payments.AssociatedPayment
* @param {payments.AssociationType} type 
*/
AssociatedPayment.prototype.setType = function(type) {
  this.type = type;
};

/**
* Get the field value
* The type of association
* @memberof payments.AssociatedPayment
* @return {payments.AssociationType} 
*/
AssociatedPayment.prototype.getType = function() {
  return this.type;
};

/**
* @memberof payments.AssociatedPayment
* @private
*/
AssociatedPayment.prototype.getMetaInfo = function(fieldName) {
  var curclass = this._class_;
  do {
    var fieldMetaInfo = curclass._meta_.fields[fieldName];
    if(fieldMetaInfo) {
      return fieldMetaInfo;
    }
    if(curclass._meta_._superMeta_) {
      curclass = curclass._meta_._superMeta_._class_;
    } else {
      curclass = null;
    }
  } while(curclass);
  return null;
};

AssociatedPayment.prototype.toString = function() {
  return JSON.stringify(this);
};

AssociatedPayment._meta_ =  {fields:  {}};
AssociatedPayment._meta_._class_ =  AssociatedPayment;
AssociatedPayment._meta_.fields["id"] = {};
AssociatedPayment._meta_.fields["id"].type = String;
AssociatedPayment._meta_.fields["type"] = {};
AssociatedPayment._meta_.fields["type"].type = payments_AssociationType;

//
// Expose the module.
//
if ('undefined' !== typeof module) {
module.exports = AssociatedPayment;
}