File: /var/www/fintechfuel/node_modules/pipedrive/dist/model/Note.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"));
var _NoteAllOf = _interopRequireDefault(require("./NoteAllOf"));
var _NoteConnectToParams = _interopRequireDefault(require("./NoteConnectToParams"));
var _NoteParams = _interopRequireDefault(require("./NoteParams"));
var _NumberBoolean = _interopRequireDefault(require("./NumberBoolean"));
/**
* 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 Note model module.
* @module model/Note
* @version 1.0.0
*/
var Note = /*#__PURE__*/function () {
/**
* Constructs a new <code>Note</code>.
* @alias module:model/Note
* @implements module:model/NoteAllOf
* @implements module:model/NoteConnectToParams
* @implements module:model/NoteParams
*/
function Note() {
(0, _classCallCheck2["default"])(this, Note);
_NoteAllOf["default"].initialize(this);
_NoteConnectToParams["default"].initialize(this);
_NoteParams["default"].initialize(this);
Note.initialize(this);
}
/**
* 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"])(Note, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>Note</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/Note} obj Optional instance to populate.
* @return {module:model/Note} The populated <code>Note</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new Note();
_NoteAllOf["default"].constructFromObject(data, obj);
_NoteConnectToParams["default"].constructFromObject(data, obj);
_NoteParams["default"].constructFromObject(data, obj);
if (data.hasOwnProperty('content')) {
obj['content'] = _ApiClient["default"].convertToType(data['content'], 'String');
delete data['content'];
}
if (data.hasOwnProperty('lead_id')) {
obj['lead_id'] = _ApiClient["default"].convertToType(data['lead_id'], 'String');
delete data['lead_id'];
}
if (data.hasOwnProperty('deal_id')) {
obj['deal_id'] = _ApiClient["default"].convertToType(data['deal_id'], 'Number');
delete data['deal_id'];
}
if (data.hasOwnProperty('person_id')) {
obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
delete data['person_id'];
}
if (data.hasOwnProperty('org_id')) {
obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'Number');
delete data['org_id'];
}
if (data.hasOwnProperty('user_id')) {
obj['user_id'] = _ApiClient["default"].convertToType(data['user_id'], 'Number');
delete data['user_id'];
}
if (data.hasOwnProperty('add_time')) {
obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
delete data['add_time'];
}
if (data.hasOwnProperty('pinned_to_lead_flag')) {
obj['pinned_to_lead_flag'] = _ApiClient["default"].convertToType(data['pinned_to_lead_flag'], _NumberBoolean["default"]);
delete data['pinned_to_lead_flag'];
}
if (data.hasOwnProperty('pinned_to_deal_flag')) {
obj['pinned_to_deal_flag'] = _ApiClient["default"].convertToType(data['pinned_to_deal_flag'], _NumberBoolean["default"]);
delete data['pinned_to_deal_flag'];
}
if (data.hasOwnProperty('pinned_to_organization_flag')) {
obj['pinned_to_organization_flag'] = _ApiClient["default"].convertToType(data['pinned_to_organization_flag'], _NumberBoolean["default"]);
delete data['pinned_to_organization_flag'];
}
if (data.hasOwnProperty('pinned_to_person_flag')) {
obj['pinned_to_person_flag'] = _ApiClient["default"].convertToType(data['pinned_to_person_flag'], _NumberBoolean["default"]);
delete data['pinned_to_person_flag'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return Note;
}();
/**
* The content of the note in HTML format. Subject to sanitization on the back-end.
* @member {String} content
*/
Note.prototype['content'] = undefined;
/**
* The ID of the lead the note will be attached to
* @member {String} lead_id
*/
Note.prototype['lead_id'] = undefined;
/**
* The ID of the deal the note will be attached to
* @member {Number} deal_id
*/
Note.prototype['deal_id'] = undefined;
/**
* The ID of the person the note will be attached to
* @member {Number} person_id
*/
Note.prototype['person_id'] = undefined;
/**
* The ID of the organization the note will be attached to
* @member {Number} org_id
*/
Note.prototype['org_id'] = undefined;
/**
* The ID of the user who will be marked as the author of the note. Only an admin can change the author.
* @member {Number} user_id
*/
Note.prototype['user_id'] = undefined;
/**
* The optional creation date & time of the note in UTC. Can be set in the past or in the future. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
* @member {String} add_time
*/
Note.prototype['add_time'] = undefined;
/**
* If set, the results are filtered by note to lead pinning state (`lead_id` is also required)
* @member {module:model/NumberBoolean} pinned_to_lead_flag
*/
Note.prototype['pinned_to_lead_flag'] = undefined;
/**
* If set, the results are filtered by note to deal pinning state (`deal_id` is also required)
* @member {module:model/NumberBoolean} pinned_to_deal_flag
*/
Note.prototype['pinned_to_deal_flag'] = undefined;
/**
* If set, the results are filtered by note to organization pinning state (`org_id` is also required)
* @member {module:model/NumberBoolean} pinned_to_organization_flag
*/
Note.prototype['pinned_to_organization_flag'] = undefined;
/**
* If set, the results are filtered by note to person pinning state (`person_id` is also required)
* @member {module:model/NumberBoolean} pinned_to_person_flag
*/
Note.prototype['pinned_to_person_flag'] = undefined;
// Implement NoteAllOf interface:
/**
* The content of the note in HTML format. Subject to sanitization on the back-end.
* @member {String} content
*/
_NoteAllOf["default"].prototype['content'] = undefined;
// Implement NoteConnectToParams interface:
/**
* The ID of the lead the note will be attached to
* @member {String} lead_id
*/
_NoteConnectToParams["default"].prototype['lead_id'] = undefined;
/**
* The ID of the deal the note will be attached to
* @member {Number} deal_id
*/
_NoteConnectToParams["default"].prototype['deal_id'] = undefined;
/**
* The ID of the person the note will be attached to
* @member {Number} person_id
*/
_NoteConnectToParams["default"].prototype['person_id'] = undefined;
/**
* The ID of the organization the note will be attached to
* @member {Number} org_id
*/
_NoteConnectToParams["default"].prototype['org_id'] = undefined;
// Implement NoteParams interface:
/**
* The ID of the user who will be marked as the author of the note. Only an admin can change the author.
* @member {Number} user_id
*/
_NoteParams["default"].prototype['user_id'] = undefined;
/**
* The optional creation date & time of the note in UTC. Can be set in the past or in the future. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
* @member {String} add_time
*/
_NoteParams["default"].prototype['add_time'] = undefined;
/**
* If set, the results are filtered by note to lead pinning state (`lead_id` is also required)
* @member {module:model/NumberBoolean} pinned_to_lead_flag
*/
_NoteParams["default"].prototype['pinned_to_lead_flag'] = undefined;
/**
* If set, the results are filtered by note to deal pinning state (`deal_id` is also required)
* @member {module:model/NumberBoolean} pinned_to_deal_flag
*/
_NoteParams["default"].prototype['pinned_to_deal_flag'] = undefined;
/**
* If set, the results are filtered by note to organization pinning state (`org_id` is also required)
* @member {module:model/NumberBoolean} pinned_to_organization_flag
*/
_NoteParams["default"].prototype['pinned_to_organization_flag'] = undefined;
/**
* If set, the results are filtered by note to person pinning state (`person_id` is also required)
* @member {module:model/NumberBoolean} pinned_to_person_flag
*/
_NoteParams["default"].prototype['pinned_to_person_flag'] = undefined;
var _default = Note;
exports["default"] = _default;