MetadataEnumValue.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. import Check from "../Core/Check.js";
  2. /**
  3. * A metadata enum value.
  4. *
  5. * @param {Object} value The enum value JSON object.
  6. *
  7. * @alias MetadataEnumValue
  8. * @constructor
  9. * @private
  10. * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
  11. */
  12. function MetadataEnumValue(value) {
  13. //>>includeStart('debug', pragmas.debug);
  14. Check.typeOf.object("value", value);
  15. //>>includeEnd('debug');
  16. this._value = value.value;
  17. this._name = value.name;
  18. this._description = value.description;
  19. this._extras = value.extras;
  20. this._extensions = value.extensions;
  21. }
  22. Object.defineProperties(MetadataEnumValue.prototype, {
  23. /**
  24. * The integer value.
  25. *
  26. * @memberof MetadataEnumValue.prototype
  27. * @type {Number}
  28. * @readonly
  29. * @private
  30. */
  31. value: {
  32. get: function () {
  33. return this._value;
  34. },
  35. },
  36. /**
  37. * The name of the enum value.
  38. *
  39. * @memberof MetadataEnumValue.prototype
  40. * @type {String}
  41. * @readonly
  42. * @private
  43. */
  44. name: {
  45. get: function () {
  46. return this._name;
  47. },
  48. },
  49. /**
  50. * The description of the enum value.
  51. *
  52. * @memberof MetadataEnumValue.prototype
  53. * @type {String}
  54. * @readonly
  55. * @private
  56. */
  57. description: {
  58. get: function () {
  59. return this._description;
  60. },
  61. },
  62. /**
  63. * Extras in the JSON object.
  64. *
  65. * @memberof MetadataEnumValue.prototype
  66. * @type {*}
  67. * @readonly
  68. * @private
  69. */
  70. extras: {
  71. get: function () {
  72. return this._extras;
  73. },
  74. },
  75. /**
  76. * Extensions in the JSON object.
  77. *
  78. * @memberof MetadataEnumValue.prototype
  79. * @type {Object}
  80. * @readonly
  81. * @private
  82. */
  83. extensions: {
  84. get: function () {
  85. return this._extensions;
  86. },
  87. },
  88. });
  89. export default MetadataEnumValue;