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.src = undefined;
  13. this.width = undefined;
  14. this.height = undefined;
  15. };
  16. /**
  17. * Set the field value
  18. * The url to the image if available
  19. *
  20. * @memberof remotepay.Img
  21. * @param {String} src
  22. */
  23. Img.prototype.setSrc = function(src) {
  24. this.src = src;
  25. };
  26. /**
  27. * Get the field value
  28. * The url to the image if available
  29. * @memberof remotepay.Img
  30. * @return {String}
  31. */
  32. Img.prototype.getSrc = function() {
  33. return this.src;
  34. };
  35. /**
  36. * Set the field value
  37. * The width of the image if available
  38. *
  39. * @memberof remotepay.Img
  40. * @param {Number} width must be a long integer
  41. */
  42. Img.prototype.setWidth = function(width) {
  43. this.width = width;
  44. };
  45. /**
  46. * Get the field value
  47. * The width of the image if available
  48. * @memberof remotepay.Img
  49. * @return {Number} must be a long integer
  50. */
  51. Img.prototype.getWidth = function() {
  52. return this.width;
  53. };
  54. /**
  55. * Set the field value
  56. * The height of the image if available
  57. *
  58. * @memberof remotepay.Img
  59. * @param {Number} height must be a long integer
  60. */
  61. Img.prototype.setHeight = function(height) {
  62. this.height = height;
  63. };
  64. /**
  65. * Get the field value
  66. * The height of the image if available
  67. * @memberof remotepay.Img
  68. * @return {Number} must be a long integer
  69. */
  70. Img.prototype.getHeight = function() {
  71. return this.height;
  72. };
  73. /**
  74. * @memberof remotepay.Img
  75. * @private
  76. */
  77. Img.prototype.getMetaInfo = function(fieldName) {
  78. var curclass = this._class_;
  79. do {
  80. var fieldMetaInfo = curclass._meta_.fields[fieldName];
  81. if(fieldMetaInfo) {
  82. return fieldMetaInfo;
  83. }
  84. if(curclass._meta_._superMeta_) {
  85. curclass = curclass._meta_._superMeta_._class_;
  86. } else {
  87. curclass = null;
  88. }
  89. } while(curclass);
  90. return null;
  91. };
  92. Img.prototype.toString = function() {
  93. return JSON.stringify(this);
  94. };
  95. Img._meta_ = {fields: {}};
  96. Img._meta_._class_ = Img;
  97. Img._meta_.fields["src"] = {};
  98. Img._meta_.fields["src"].type = String;
  99. Img._meta_.fields["width"] = {};
  100. Img._meta_.fields["width"].type = Number;
  101. Img._meta_.fields["height"] = {};
  102. Img._meta_.fields["height"].type = Number;
  103. //
  104. // Expose the module.
  105. //
  106. if ('undefined' !== typeof module) {
  107. module.exports = Img;
  108. }