File: /var/www/fintechfuel/node_modules/pipedrive/dist/model/GoalsResponseComponent.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 _Assignee = _interopRequireDefault(require("./Assignee"));
var _Duration = _interopRequireDefault(require("./Duration"));
var _ExpectedOutcome = _interopRequireDefault(require("./ExpectedOutcome"));
var _GoalType = _interopRequireDefault(require("./GoalType"));
/**
* 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 GoalsResponseComponent model module.
* @module model/GoalsResponseComponent
* @version 1.0.0
*/
var GoalsResponseComponent = /*#__PURE__*/function () {
/**
* Constructs a new <code>GoalsResponseComponent</code>.
* @alias module:model/GoalsResponseComponent
*/
function GoalsResponseComponent() {
(0, _classCallCheck2["default"])(this, GoalsResponseComponent);
GoalsResponseComponent.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"])(GoalsResponseComponent, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>GoalsResponseComponent</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/GoalsResponseComponent} obj Optional instance to populate.
* @return {module:model/GoalsResponseComponent} The populated <code>GoalsResponseComponent</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new GoalsResponseComponent();
if (data.hasOwnProperty('id')) {
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
delete data['id'];
}
if (data.hasOwnProperty('owner_id')) {
obj['owner_id'] = _ApiClient["default"].convertToType(data['owner_id'], 'Number');
delete data['owner_id'];
}
if (data.hasOwnProperty('title')) {
obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
delete data['title'];
}
if (data.hasOwnProperty('type')) {
obj['type'] = _GoalType["default"].constructFromObject(data['type']);
delete data['type'];
}
if (data.hasOwnProperty('assignee')) {
obj['assignee'] = _Assignee["default"].constructFromObject(data['assignee']);
delete data['assignee'];
}
if (data.hasOwnProperty('interval')) {
obj['interval'] = _ApiClient["default"].convertToType(data['interval'], 'String');
delete data['interval'];
}
if (data.hasOwnProperty('duration')) {
obj['duration'] = _Duration["default"].constructFromObject(data['duration']);
delete data['duration'];
}
if (data.hasOwnProperty('expected_outcome')) {
obj['expected_outcome'] = _ExpectedOutcome["default"].constructFromObject(data['expected_outcome']);
delete data['expected_outcome'];
}
if (data.hasOwnProperty('is_active')) {
obj['is_active'] = _ApiClient["default"].convertToType(data['is_active'], 'Boolean');
delete data['is_active'];
}
if (data.hasOwnProperty('report_ids')) {
obj['report_ids'] = _ApiClient["default"].convertToType(data['report_ids'], ['String']);
delete data['report_ids'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return GoalsResponseComponent;
}();
/**
* The ID of the goal
* @member {String} id
*/
GoalsResponseComponent.prototype['id'] = undefined;
/**
* The ID of the creator of the goal
* @member {Number} owner_id
*/
GoalsResponseComponent.prototype['owner_id'] = undefined;
/**
* The title of the goal
* @member {String} title
*/
GoalsResponseComponent.prototype['title'] = undefined;
/**
* @member {module:model/GoalType} type
*/
GoalsResponseComponent.prototype['type'] = undefined;
/**
* @member {module:model/Assignee} assignee
*/
GoalsResponseComponent.prototype['assignee'] = undefined;
/**
* The interval of the goal
* @member {String} interval
*/
GoalsResponseComponent.prototype['interval'] = undefined;
/**
* @member {module:model/Duration} duration
*/
GoalsResponseComponent.prototype['duration'] = undefined;
/**
* @member {module:model/ExpectedOutcome} expected_outcome
*/
GoalsResponseComponent.prototype['expected_outcome'] = undefined;
/**
* Whether the goal is currently active or not
* @member {Boolean} is_active
*/
GoalsResponseComponent.prototype['is_active'] = undefined;
/**
* The IDs of the reports that belong to the goal
* @member {Array.<String>} report_ids
*/
GoalsResponseComponent.prototype['report_ids'] = undefined;
var _default = GoalsResponseComponent;
exports["default"] = _default;