ParseInstallation.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. "use strict";
  2. var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
  3. Object.defineProperty(exports, "__esModule", {
  4. value: true
  5. });
  6. exports.default = void 0;
  7. var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
  8. var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
  9. var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
  10. var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
  11. var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
  12. var _ParseObject2 = _interopRequireDefault(require("./ParseObject"));
  13. /**
  14. * Copyright (c) 2015-present, Parse, LLC.
  15. * All rights reserved.
  16. *
  17. * This source code is licensed under the BSD-style license found in the
  18. * LICENSE file in the root directory of this source tree. An additional grant
  19. * of patent rights can be found in the PATENTS file in the same directory.
  20. *
  21. * @flow
  22. */
  23. var Installation =
  24. /*#__PURE__*/
  25. function (_ParseObject) {
  26. (0, _inherits2.default)(Installation, _ParseObject);
  27. function Installation(attributes
  28. /*: ?AttributeMap*/
  29. ) {
  30. var _this;
  31. (0, _classCallCheck2.default)(this, Installation);
  32. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Installation).call(this, '_Installation'));
  33. if (attributes && (0, _typeof2.default)(attributes) === 'object') {
  34. if (!_this.set(attributes || {})) {
  35. throw new Error('Can\'t create an invalid Session');
  36. }
  37. }
  38. return _this;
  39. }
  40. return Installation;
  41. }(_ParseObject2.default);
  42. exports.default = Installation;
  43. _ParseObject2.default.registerSubclass('_Installation', Installation);