UNPKG

@topoos/push

Version:

SDK para el servicio de envío de notificaciones mediante Firebase Cloud Messaging, desarrollado en NodeJS.

112 lines (87 loc) 4.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ApiClient = _interopRequireDefault(require("../ApiClient")); var _Notification = _interopRequireDefault(require("./Notification")); var _SendNotificationOptions = _interopRequireDefault(require("./SendNotificationOptions")); var _TopicId = _interopRequireDefault(require("./TopicId")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } /** * The SendNotificationTopicId model module. * @module org.wso2.client.model.PUSH/SendNotificationTopicId * @version 1.0.0 */ var SendNotificationTopicId = /*#__PURE__*/function () { /** * Constructs a new <code>SendNotificationTopicId</code>. * @alias module:org.wso2.client.model.PUSH/SendNotificationTopicId * @param to {module:org.wso2.client.model.PUSH/TopicId} */ function SendNotificationTopicId(to) { _classCallCheck(this, SendNotificationTopicId); SendNotificationTopicId.initialize(this, to); } /** * Initializes the fields of this object. * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ _createClass(SendNotificationTopicId, null, [{ key: "initialize", value: function initialize(obj, to) { obj['to'] = to; } /** * Constructs a <code>SendNotificationTopicId</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:org.wso2.client.model.PUSH/SendNotificationTopicId} obj Optional instance to populate. * @return {module:org.wso2.client.model.PUSH/SendNotificationTopicId} The populated <code>SendNotificationTopicId</code> instance. */ }, { key: "constructFromObject", value: function constructFromObject(data, obj) { if (data) { obj = obj || new SendNotificationTopicId(); if (data.hasOwnProperty('to')) { obj['to'] = _TopicId["default"].constructFromObject(data['to']); } if (data.hasOwnProperty('options')) { obj['options'] = _SendNotificationOptions["default"].constructFromObject(data['options']); } if (data.hasOwnProperty('notification')) { obj['notification'] = _Notification["default"].constructFromObject(data['notification']); } if (data.hasOwnProperty('data')) { obj['data'] = _ApiClient["default"].convertToType(data['data'], Object); } } return obj; } }]); return SendNotificationTopicId; }(); /** * @member {module:org.wso2.client.model.PUSH/TopicId} to */ SendNotificationTopicId.prototype['to'] = undefined; /** * @member {module:org.wso2.client.model.PUSH/SendNotificationOptions} options */ SendNotificationTopicId.prototype['options'] = undefined; /** * @member {module:org.wso2.client.model.PUSH/Notification} notification */ SendNotificationTopicId.prototype['notification'] = undefined; /** * Carga de datos de la aplicación. Claves y valores deben ser de tipo string. La clave no puede ser una palabra reservada, por ejemplo \"from\", cualquier palabra que comience por \"google\" o \"gcm\", o cualquiera de las propiedades de este esquema * @member {Object} data */ SendNotificationTopicId.prototype['data'] = undefined; var _default = SendNotificationTopicId; exports["default"] = _default;