Source: remotepay/Img.js

  1. /**
  2. * Autogenerated by Avro
  3. *
  4. * DO NOT EDIT DIRECTLY
  5. */
  6. /**
  7. * @constructor
  8. * @memberof remotepay
  9. */
  10. var Img = function() {
  11. this._class_ = Img;
  12. this.data = undefined;
  13. this.src = undefined;
  14. this.width = undefined;
  15. this.height = undefined;
  16. };
  17. /**
  18. * Set the field value
  19. * The base64 encoded data of the image if available
  20. *
  21. * @memberof remotepay.Img
  22. * @param {String} data
  23. */
  24. Img.prototype.setData = function(data) {
  25. this.data = data;
  26. };
  27. /**
  28. * Get the field value
  29. * The base64 encoded data of the image if available
  30. * @memberof remotepay.Img
  31. * @return {String}
  32. */
  33. Img.prototype.getData = function() {
  34. return this.data;
  35. };
  36. /**
  37. * Set the field value
  38. * The url to the image if available
  39. *
  40. * @memberof remotepay.Img
  41. * @param {String} src
  42. */
  43. Img.prototype.setSrc = function(src) {
  44. this.src = src;
  45. };
  46. /**
  47. * Get the field value
  48. * The url to the image if available
  49. * @memberof remotepay.Img
  50. * @return {String}
  51. */
  52. Img.prototype.getSrc = function() {
  53. return this.src;
  54. };
  55. /**
  56. * Set the field value
  57. * The width of the image if available
  58. *
  59. * @memberof remotepay.Img
  60. * @param {Number} width must be a long integer
  61. */
  62. Img.prototype.setWidth = function(width) {
  63. this.width = width;
  64. };
  65. /**
  66. * Get the field value
  67. * The width of the image if available
  68. * @memberof remotepay.Img
  69. * @return {Number} must be a long integer
  70. */
  71. Img.prototype.getWidth = function() {
  72. return this.width;
  73. };
  74. /**
  75. * Set the field value
  76. * The height of the image if available
  77. *
  78. * @memberof remotepay.Img
  79. * @param {Number} height must be a long integer
  80. */
  81. Img.prototype.setHeight = function(height) {
  82. this.height = height;
  83. };
  84. /**
  85. * Get the field value
  86. * The height of the image if available
  87. * @memberof remotepay.Img
  88. * @return {Number} must be a long integer
  89. */
  90. Img.prototype.getHeight = function() {
  91. return this.height;
  92. };
  93. /**
  94. * @memberof remotepay.Img
  95. * @private
  96. */
  97. Img.prototype.getMetaInfo = function(fieldName) {
  98. var curclass = this._class_;
  99. do {
  100. var fieldMetaInfo = curclass._meta_.fields[fieldName];
  101. if(fieldMetaInfo) {
  102. return fieldMetaInfo;
  103. }
  104. if(curclass._meta_._superMeta_) {
  105. curclass = curclass._meta_._superMeta_._class_;
  106. } else {
  107. curclass = null;
  108. }
  109. } while(curclass);
  110. return null;
  111. };
  112. Img.prototype.toString = function() {
  113. return JSON.stringify(this);
  114. };
  115. Img._meta_ = {fields: {}};
  116. Img._meta_._class_ = Img;
  117. Img._meta_.fields["data"] = {};
  118. Img._meta_.fields["data"].type = String;
  119. Img._meta_.fields["src"] = {};
  120. Img._meta_.fields["src"].type = String;
  121. Img._meta_.fields["width"] = {};
  122. Img._meta_.fields["width"].type = Number;
  123. Img._meta_.fields["height"] = {};
  124. Img._meta_.fields["height"].type = Number;
  125. //
  126. // Expose the module.
  127. //
  128. if ('undefined' !== typeof module) {
  129. module.exports = Img;
  130. }