File: /var/www/quadcode.com/node_modules/pipedrive/dist/model/ActivityTypeObjectResponse.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 _IconKey = _interopRequireDefault(require("./IconKey"));
/**
* 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 ActivityTypeObjectResponse model module.
* @module model/ActivityTypeObjectResponse
* @version 1.0.0
*/
var ActivityTypeObjectResponse = /*#__PURE__*/function () {
/**
* Constructs a new <code>ActivityTypeObjectResponse</code>.
* @alias module:model/ActivityTypeObjectResponse
*/
function ActivityTypeObjectResponse() {
(0, _classCallCheck2["default"])(this, ActivityTypeObjectResponse);
ActivityTypeObjectResponse.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"])(ActivityTypeObjectResponse, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>ActivityTypeObjectResponse</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/ActivityTypeObjectResponse} obj Optional instance to populate.
* @return {module:model/ActivityTypeObjectResponse} The populated <code>ActivityTypeObjectResponse</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new ActivityTypeObjectResponse();
if (data.hasOwnProperty('id')) {
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
delete data['id'];
}
if (data.hasOwnProperty('name')) {
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
delete data['name'];
}
if (data.hasOwnProperty('icon_key')) {
obj['icon_key'] = _IconKey["default"].constructFromObject(data['icon_key']);
delete data['icon_key'];
}
if (data.hasOwnProperty('color')) {
obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String');
delete data['color'];
}
if (data.hasOwnProperty('order_nr')) {
obj['order_nr'] = _ApiClient["default"].convertToType(data['order_nr'], 'Number');
delete data['order_nr'];
}
if (data.hasOwnProperty('key_string')) {
obj['key_string'] = _ApiClient["default"].convertToType(data['key_string'], 'String');
delete data['key_string'];
}
if (data.hasOwnProperty('active_flag')) {
obj['active_flag'] = _ApiClient["default"].convertToType(data['active_flag'], 'Boolean');
delete data['active_flag'];
}
if (data.hasOwnProperty('is_custom_flag')) {
obj['is_custom_flag'] = _ApiClient["default"].convertToType(data['is_custom_flag'], 'Boolean');
delete data['is_custom_flag'];
}
if (data.hasOwnProperty('add_time')) {
obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'Date');
delete data['add_time'];
}
if (data.hasOwnProperty('update_time')) {
obj['update_time'] = _ApiClient["default"].convertToType(data['update_time'], 'Date');
delete data['update_time'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}]);
return ActivityTypeObjectResponse;
}();
/**
* The ID of the activity type
* @member {Number} id
*/
ActivityTypeObjectResponse.prototype['id'] = undefined;
/**
* The name of the activity type
* @member {String} name
*/
ActivityTypeObjectResponse.prototype['name'] = undefined;
/**
* @member {module:model/IconKey} icon_key
*/
ActivityTypeObjectResponse.prototype['icon_key'] = undefined;
/**
* A designated color for the activity type in 6-character HEX format (e.g. `FFFFFF` for white, `000000` for black)
* @member {String} color
*/
ActivityTypeObjectResponse.prototype['color'] = undefined;
/**
* An order number for the activity type. Order numbers should be used to order the types in the activity type selections.
* @member {Number} order_nr
*/
ActivityTypeObjectResponse.prototype['order_nr'] = undefined;
/**
* A string that is generated by the API based on the given name of the activity type upon creation
* @member {String} key_string
*/
ActivityTypeObjectResponse.prototype['key_string'] = undefined;
/**
* The active flag of the activity type
* @member {Boolean} active_flag
*/
ActivityTypeObjectResponse.prototype['active_flag'] = undefined;
/**
* Whether the activity type is a custom one or not
* @member {Boolean} is_custom_flag
*/
ActivityTypeObjectResponse.prototype['is_custom_flag'] = undefined;
/**
* The creation time of the activity type
* @member {Date} add_time
*/
ActivityTypeObjectResponse.prototype['add_time'] = undefined;
/**
* The update time of the activity type
* @member {Date} update_time
*/
ActivityTypeObjectResponse.prototype['update_time'] = undefined;
var _default = ActivityTypeObjectResponse;
exports["default"] = _default;