|
| 1 | +/** |
| 2 | + * Pipedrive API v1 |
| 3 | + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
| 4 | + * |
| 5 | + * The version of the OpenAPI document: 1.0.0 |
| 6 | + * |
| 7 | + * |
| 8 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 9 | + * https://openapi-generator.tech |
| 10 | + * Do not edit the class manually. |
| 11 | + * |
| 12 | + */ |
| 13 | + |
| 14 | +import ApiClient from '../ApiClient'; |
| 15 | + |
| 16 | +/** |
| 17 | + * The UpdateProductField model module. |
| 18 | + * @module model/UpdateProductField |
| 19 | + * @version 1.0.0 |
| 20 | + */ |
| 21 | +class UpdateProductField { |
| 22 | + /** |
| 23 | + * Constructs a new <code>UpdateProductField</code>. |
| 24 | + * @alias module:model/UpdateProductField |
| 25 | + */ |
| 26 | + constructor() { |
| 27 | + |
| 28 | + UpdateProductField.initialize(this); |
| 29 | + } |
| 30 | + |
| 31 | + /** |
| 32 | + * Initializes the fields of this object. |
| 33 | + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). |
| 34 | + * Only for internal use. |
| 35 | + */ |
| 36 | + static initialize(obj) { |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * Constructs a <code>UpdateProductField</code> from a plain JavaScript object, optionally creating a new instance. |
| 41 | + * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. |
| 42 | + * @param {Object} data The plain JavaScript object bearing properties of interest. |
| 43 | + * @param {module:model/UpdateProductField} obj Optional instance to populate. |
| 44 | + * @return {module:model/UpdateProductField} The populated <code>UpdateProductField</code> instance. |
| 45 | + */ |
| 46 | + static constructFromObject(data, obj) { |
| 47 | + if (data) { |
| 48 | + obj = obj || new UpdateProductField(); |
| 49 | + |
| 50 | + if (data.hasOwnProperty('name')) { |
| 51 | + obj['name'] = ApiClient.convertToType(data['name'], 'String'); |
| 52 | + |
| 53 | + delete data['name']; |
| 54 | + } |
| 55 | + if (data.hasOwnProperty('options')) { |
| 56 | + obj['options'] = ApiClient.convertToType(data['options'], [Object]); |
| 57 | + |
| 58 | + delete data['options']; |
| 59 | + } |
| 60 | + |
| 61 | + if (Object.keys(data).length > 0) { |
| 62 | + Object.assign(obj, data); |
| 63 | + } |
| 64 | + |
| 65 | + } |
| 66 | + return obj; |
| 67 | + } |
| 68 | + |
| 69 | + |
| 70 | +} |
| 71 | + |
| 72 | +/** |
| 73 | + * The name of the field |
| 74 | + * @member {String} name |
| 75 | + */ |
| 76 | +UpdateProductField.prototype['name'] = undefined; |
| 77 | + |
| 78 | +/** |
| 79 | + * When `field_type` is either set or enum, possible options on update must be supplied as an array of objects each containing id and label, for example: [{\"id\":1, \"label\":\"red\"},{\"id\":2, \"label\":\"blue\"},{\"id\":3, \"label\":\"lilac\"}] |
| 80 | + * @member {Array.<Object>} options |
| 81 | + */ |
| 82 | +UpdateProductField.prototype['options'] = undefined; |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | +export default UpdateProductField; |
| 90 | + |
0 commit comments