File: /var/www/quadcode.com/node_modules/pipedrive/dist/model/DealPersonDataWithId.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 _DealPersonData = _interopRequireDefault(require("./DealPersonData"));
var _DealPersonDataEmail = _interopRequireDefault(require("./DealPersonDataEmail"));
var _DealPersonDataPhone = _interopRequireDefault(require("./DealPersonDataPhone"));
var _DealPersonDataWithIdAllOf = _interopRequireDefault(require("./DealPersonDataWithIdAllOf"));
/**
* 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 DealPersonDataWithId model module.
* @module model/DealPersonDataWithId
* @version 1.0.0
*/
var DealPersonDataWithId = /*#__PURE__*/function () {
/**
* Constructs a new <code>DealPersonDataWithId</code>.
* @alias module:model/DealPersonDataWithId
* @implements module:model/DealPersonData
* @implements module:model/DealPersonDataWithIdAllOf
*/
function DealPersonDataWithId() {
(0, _classCallCheck2["default"])(this, DealPersonDataWithId);
_DealPersonData["default"].initialize(this);
_DealPersonDataWithIdAllOf["default"].initialize(this);
DealPersonDataWithId.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"])(DealPersonDataWithId, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>DealPersonDataWithId</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/DealPersonDataWithId} obj Optional instance to populate.
* @return {module:model/DealPersonDataWithId} The populated <code>DealPersonDataWithId</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new DealPersonDataWithId();
_DealPersonData["default"].constructFromObject(data, obj);
_DealPersonDataWithIdAllOf["default"].constructFromObject(data, obj);
if (data.hasOwnProperty('active_flag')) {
obj['active_flag'] = _ApiClient["default"].convertToType(data['active_flag'], 'Boolean');
delete data['active_flag'];
}
if (data.hasOwnProperty('name')) {
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
delete data['name'];
}
if (data.hasOwnProperty('email')) {
obj['email'] = _ApiClient["default"].convertToType(data['email'], [_DealPersonDataEmail["default"]]);
delete data['email'];
}
if (data.hasOwnProperty('phone')) {
obj['phone'] = _ApiClient["default"].convertToType(data['phone'], [_DealPersonDataPhone["default"]]);
delete data['phone'];
}
if (data.hasOwnProperty('owner_id')) {
obj['owner_id'] = _ApiClient["default"].convertToType(data['owner_id'], 'Number');
delete data['owner_id'];
}
if (data.hasOwnProperty('value')) {
obj['value'] = _ApiClient["default"].convertToType(data['value'], 'Number');
delete data['value'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return DealPersonDataWithId;
}();
/**
* Whether the associated person is active or not
* @member {Boolean} active_flag
*/
DealPersonDataWithId.prototype['active_flag'] = undefined;
/**
* The name of the person associated with the deal
* @member {String} name
*/
DealPersonDataWithId.prototype['name'] = undefined;
/**
* The emails of the person associated with the deal
* @member {Array.<module:model/DealPersonDataEmail>} email
*/
DealPersonDataWithId.prototype['email'] = undefined;
/**
* The phone numbers of the person associated with the deal
* @member {Array.<module:model/DealPersonDataPhone>} phone
*/
DealPersonDataWithId.prototype['phone'] = undefined;
/**
* The ID of the owner of the person that is associated with the deal
* @member {Number} owner_id
*/
DealPersonDataWithId.prototype['owner_id'] = undefined;
/**
* The ID of the person associated with the deal
* @member {Number} value
*/
DealPersonDataWithId.prototype['value'] = undefined;
// Implement DealPersonData interface:
/**
* Whether the associated person is active or not
* @member {Boolean} active_flag
*/
_DealPersonData["default"].prototype['active_flag'] = undefined;
/**
* The name of the person associated with the deal
* @member {String} name
*/
_DealPersonData["default"].prototype['name'] = undefined;
/**
* The emails of the person associated with the deal
* @member {Array.<module:model/DealPersonDataEmail>} email
*/
_DealPersonData["default"].prototype['email'] = undefined;
/**
* The phone numbers of the person associated with the deal
* @member {Array.<module:model/DealPersonDataPhone>} phone
*/
_DealPersonData["default"].prototype['phone'] = undefined;
/**
* The ID of the owner of the person that is associated with the deal
* @member {Number} owner_id
*/
_DealPersonData["default"].prototype['owner_id'] = undefined;
// Implement DealPersonDataWithIdAllOf interface:
/**
* The ID of the person associated with the deal
* @member {Number} value
*/
_DealPersonDataWithIdAllOf["default"].prototype['value'] = undefined;
var _default = DealPersonDataWithId;
exports["default"] = _default;