File: /var/www/fintechfuel/node_modules/pipedrive/dist/model/ChannelObject.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
/**
* Pipedrive API v1
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
/**
* The ChannelObject model module.
* @module model/ChannelObject
* @version 1.0.0
*/
var ChannelObject = /*#__PURE__*/function () {
/**
* Constructs a new <code>ChannelObject</code>.
* @alias module:model/ChannelObject
* @param name {String} The name of the channel
* @param providerChannelId {String} The channel ID
*/
function ChannelObject(name, providerChannelId) {
(0, _classCallCheck2["default"])(this, ChannelObject);
ChannelObject.initialize(this, name, providerChannelId);
}
/**
* 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.
*/
(0, _createClass2["default"])(ChannelObject, null, [{
key: "initialize",
value: function initialize(obj, name, providerChannelId) {
obj['name'] = name;
obj['provider_channel_id'] = providerChannelId;
}
/**
* Constructs a <code>ChannelObject</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:model/ChannelObject} obj Optional instance to populate.
* @return {module:model/ChannelObject} The populated <code>ChannelObject</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new ChannelObject();
if (data.hasOwnProperty('name')) {
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
delete data['name'];
}
if (data.hasOwnProperty('provider_channel_id')) {
obj['provider_channel_id'] = _ApiClient["default"].convertToType(data['provider_channel_id'], 'String');
delete data['provider_channel_id'];
}
if (data.hasOwnProperty('avatar_url')) {
obj['avatar_url'] = _ApiClient["default"].convertToType(data['avatar_url'], 'String');
delete data['avatar_url'];
}
if (data.hasOwnProperty('template_support')) {
obj['template_support'] = _ApiClient["default"].convertToType(data['template_support'], 'Boolean');
delete data['template_support'];
}
if (data.hasOwnProperty('provider_type')) {
obj['provider_type'] = _ApiClient["default"].convertToType(data['provider_type'], 'String');
delete data['provider_type'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return ChannelObject;
}();
/**
* The name of the channel
* @member {String} name
*/
ChannelObject.prototype['name'] = undefined;
/**
* The channel ID
* @member {String} provider_channel_id
*/
ChannelObject.prototype['provider_channel_id'] = undefined;
/**
* The URL for an icon that represents your channel
* @member {String} avatar_url
*/
ChannelObject.prototype['avatar_url'] = undefined;
/**
* If true, enables templates logic on UI. Requires getTemplates endpoint implemented. Find out more [here](https://pipedrive.readme.io/docs/implementing-messaging-app-extension).
* @member {Boolean} template_support
* @default false
*/
ChannelObject.prototype['template_support'] = false;
/**
* It controls the icons (like the icon next to the conversation)
* @member {module:model/ChannelObject.ProviderTypeEnum} provider_type
* @default 'other'
*/
ChannelObject.prototype['provider_type'] = 'other';
/**
* Allowed values for the <code>provider_type</code> property.
* @enum {String}
* @readonly
*/
ChannelObject['ProviderTypeEnum'] = {
/**
* value: "facebook"
* @const
*/
"facebook": "facebook",
/**
* value: "whatsapp"
* @const
*/
"whatsapp": "whatsapp",
/**
* value: "other"
* @const
*/
"other": "other"
};
var _default = ChannelObject;
exports["default"] = _default;