File: /var/www/fintechfuel/node_modules/pipedrive/dist/model/LinkFileToItemRequest.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 LinkFileToItemRequest model module.
* @module model/LinkFileToItemRequest
* @version 1.0.0
*/
var LinkFileToItemRequest = /*#__PURE__*/function () {
/**
* Constructs a new <code>LinkFileToItemRequest</code>.
* @alias module:model/LinkFileToItemRequest
* @param itemType {module:model/LinkFileToItemRequest.ItemTypeEnum} The item type
* @param itemId {Number} ID of the item to associate the file with
* @param remoteId {String} The remote item id
* @param remoteLocation {module:model/LinkFileToItemRequest.RemoteLocationEnum} The location type to send the file to. Only `googledrive` is supported at the moment.
*/
function LinkFileToItemRequest(itemType, itemId, remoteId, remoteLocation) {
(0, _classCallCheck2["default"])(this, LinkFileToItemRequest);
LinkFileToItemRequest.initialize(this, itemType, itemId, remoteId, remoteLocation);
}
/**
* 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"])(LinkFileToItemRequest, null, [{
key: "initialize",
value: function initialize(obj, itemType, itemId, remoteId, remoteLocation) {
obj['item_type'] = itemType;
obj['item_id'] = itemId;
obj['remote_id'] = remoteId;
obj['remote_location'] = remoteLocation;
}
/**
* Constructs a <code>LinkFileToItemRequest</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/LinkFileToItemRequest} obj Optional instance to populate.
* @return {module:model/LinkFileToItemRequest} The populated <code>LinkFileToItemRequest</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new LinkFileToItemRequest();
if (data.hasOwnProperty('item_type')) {
obj['item_type'] = _ApiClient["default"].convertToType(data['item_type'], 'String');
delete data['item_type'];
}
if (data.hasOwnProperty('item_id')) {
obj['item_id'] = _ApiClient["default"].convertToType(data['item_id'], 'Number');
delete data['item_id'];
}
if (data.hasOwnProperty('remote_id')) {
obj['remote_id'] = _ApiClient["default"].convertToType(data['remote_id'], 'String');
delete data['remote_id'];
}
if (data.hasOwnProperty('remote_location')) {
obj['remote_location'] = _ApiClient["default"].convertToType(data['remote_location'], 'String');
delete data['remote_location'];
}
if (Object.keys(data).length > 0) {
obj['extra'] = data;
}
}
return obj;
}
}]);
return LinkFileToItemRequest;
}();
/**
* The item type
* @member {module:model/LinkFileToItemRequest.ItemTypeEnum} item_type
*/
LinkFileToItemRequest.prototype['item_type'] = undefined;
/**
* ID of the item to associate the file with
* @member {Number} item_id
*/
LinkFileToItemRequest.prototype['item_id'] = undefined;
/**
* The remote item id
* @member {String} remote_id
*/
LinkFileToItemRequest.prototype['remote_id'] = undefined;
/**
* The location type to send the file to. Only `googledrive` is supported at the moment.
* @member {module:model/LinkFileToItemRequest.RemoteLocationEnum} remote_location
*/
LinkFileToItemRequest.prototype['remote_location'] = undefined;
/**
* Allowed values for the <code>item_type</code> property.
* @enum {String}
* @readonly
*/
LinkFileToItemRequest['ItemTypeEnum'] = {
/**
* value: "deal"
* @const
*/
"deal": "deal",
/**
* value: "organization"
* @const
*/
"organization": "organization",
/**
* value: "person"
* @const
*/
"person": "person"
};
/**
* Allowed values for the <code>remote_location</code> property.
* @enum {String}
* @readonly
*/
LinkFileToItemRequest['RemoteLocationEnum'] = {
/**
* value: "googledrive"
* @const
*/
"googledrive": "googledrive"
};
var _default = LinkFileToItemRequest;
exports["default"] = _default;