UNPKG

@topoos/push

Version:

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

103 lines (84 loc) 4.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ApiClient = _interopRequireDefault(require("../ApiClient")); 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 ConditionId model module. * @module org.wso2.client.model.PUSH/ConditionId * @version 1.0.0 */ var ConditionId = /*#__PURE__*/function () { /** * Constructs a new <code>ConditionId</code>. * @alias module:org.wso2.client.model.PUSH/ConditionId * @param id {String} En el caso de mensajes a condition se corresponde con la condición compatible deseada. Se especifica una expresión lógica de las condiciones que determinan el destinatario del mensaje. Condición compatible: Tema, formateado como \"'tuTopic' in topics\". Este valor no distingue mayúsculas de minúsculas. Operadores compatibles: &&, ||. Se admite un máximo de dos operadores */ function ConditionId(id) { _classCallCheck(this, ConditionId); ConditionId.initialize(this, "condition", id); } /** * 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(ConditionId, null, [{ key: "initialize", value: function initialize(obj, entity, id) { obj['entity'] = entity; obj['id'] = id; } /** * Constructs a <code>ConditionId</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/ConditionId} obj Optional instance to populate. * @return {module:org.wso2.client.model.PUSH/ConditionId} The populated <code>ConditionId</code> instance. */ }, { key: "constructFromObject", value: function constructFromObject(data, obj) { if (data) { obj = obj || new ConditionId(); if (data.hasOwnProperty('entity')) { obj['entity'] = _ApiClient["default"].convertToType(data['entity'], 'String'); } if (data.hasOwnProperty('id')) { obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); } } return obj; } }]); return ConditionId; }(); /** * Este parámetro especifica el tipo de destinatario de un mensaje. El valor debe ser 'condition' para enviar a varios topics * @member {module:org.wso2.client.model.PUSH/ConditionId.EntityEnum} entity */ ConditionId.prototype['entity'] = undefined; /** * En el caso de mensajes a condition se corresponde con la condición compatible deseada. Se especifica una expresión lógica de las condiciones que determinan el destinatario del mensaje. Condición compatible: Tema, formateado como \"'tuTopic' in topics\". Este valor no distingue mayúsculas de minúsculas. Operadores compatibles: &&, ||. Se admite un máximo de dos operadores * @member {String} id */ ConditionId.prototype['id'] = undefined; /** * Allowed values for the <code>entity</code> property. * @enum {String} * @readonly */ ConditionId['EntityEnum'] = { /** * value: "condition" * @const */ "condition": "condition" }; var _default = ConditionId; exports["default"] = _default;