Source: payments/VasPayloadElement.js

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

var payments_VasResponseFormat = require("../payments/VasResponseFormat");
var payments_VasProtocol = require("../payments/VasProtocol");
var payments_VasDataType = require("../payments/VasDataType");

/**
* @constructor
* @memberof payments
*/
var VasPayloadElement = function() {
  this._class_ = VasPayloadElement;
  this.dataType = undefined;
  this.responseFormat = undefined;
  this.vasData = undefined;
  this.protocolId = undefined;
  this.merchantId = undefined;
};


/**
* Set the field value
* Indicates the type of data in this response.
*
* @memberof payments.VasPayloadElement
* @param {payments.VasDataType} dataType 
*/
VasPayloadElement.prototype.setDataType = function(dataType) {
  this.dataType = dataType;
};

/**
* Get the field value
* Indicates the type of data in this response.
* @memberof payments.VasPayloadElement
* @return {payments.VasDataType} 
*/
VasPayloadElement.prototype.getDataType = function() {
  return this.dataType;
};

/**
* Set the field value
* Format of vasData payload.
*
* @memberof payments.VasPayloadElement
* @param {payments.VasResponseFormat} responseFormat 
*/
VasPayloadElement.prototype.setResponseFormat = function(responseFormat) {
  this.responseFormat = responseFormat;
};

/**
* Get the field value
* Format of vasData payload.
* @memberof payments.VasPayloadElement
* @return {payments.VasResponseFormat} 
*/
VasPayloadElement.prototype.getResponseFormat = function() {
  return this.responseFormat;
};

/**
* Set the field value
* Vas data.  For NDEF it will be base64 encoded binary.
*
* @memberof payments.VasPayloadElement
* @param {String} vasData 
*/
VasPayloadElement.prototype.setVasData = function(vasData) {
  this.vasData = vasData;
};

/**
* Get the field value
* Vas data.  For NDEF it will be base64 encoded binary.
* @memberof payments.VasPayloadElement
* @return {String} 
*/
VasPayloadElement.prototype.getVasData = function() {
  return this.vasData;
};

/**
* Set the field value
* Protocol this payload element was derived from
*
* @memberof payments.VasPayloadElement
* @param {payments.VasProtocol} protocolId 
*/
VasPayloadElement.prototype.setProtocolId = function(protocolId) {
  this.protocolId = protocolId;
};

/**
* Get the field value
* Protocol this payload element was derived from
* @memberof payments.VasPayloadElement
* @return {payments.VasProtocol} 
*/
VasPayloadElement.prototype.getProtocolId = function() {
  return this.protocolId;
};

/**
* Set the field value
* Merchant id associated with this payload element (hex encoded)
*
* @memberof payments.VasPayloadElement
* @param {String} merchantId 
*/
VasPayloadElement.prototype.setMerchantId = function(merchantId) {
  this.merchantId = merchantId;
};

/**
* Get the field value
* Merchant id associated with this payload element (hex encoded)
* @memberof payments.VasPayloadElement
* @return {String} 
*/
VasPayloadElement.prototype.getMerchantId = function() {
  return this.merchantId;
};

/**
* @memberof payments.VasPayloadElement
* @private
*/
VasPayloadElement.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;
};

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

VasPayloadElement._meta_ =  {fields:  {}};
VasPayloadElement._meta_._class_ =  VasPayloadElement;
VasPayloadElement._meta_.fields["dataType"] = {};
VasPayloadElement._meta_.fields["dataType"].type = payments_VasDataType;
VasPayloadElement._meta_.fields["responseFormat"] = {};
VasPayloadElement._meta_.fields["responseFormat"].type = payments_VasResponseFormat;
VasPayloadElement._meta_.fields["vasData"] = {};
VasPayloadElement._meta_.fields["vasData"].type = String;
VasPayloadElement._meta_.fields["protocolId"] = {};
VasPayloadElement._meta_.fields["protocolId"].type = payments_VasProtocol;
VasPayloadElement._meta_.fields["merchantId"] = {};
VasPayloadElement._meta_.fields["merchantId"].type = String;

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