|
| 1 | +(function(root, factory) { |
| 2 | + if (typeof define === 'function' && define.amd) { |
| 3 | + // AMD. Register as an anonymous module. |
| 4 | + define(['../ApiClient', './Animal'], factory); |
| 5 | + } else if (typeof module === 'object' && module.exports) { |
| 6 | + // CommonJS-like environments that support module.exports, like Node. |
| 7 | + module.exports = factory(require('../ApiClient'), require('./Animal')); |
| 8 | + } else { |
| 9 | + // Browser globals (root is window) |
| 10 | + if (!root.SwaggerPetstore) { |
| 11 | + root.SwaggerPetstore = {}; |
| 12 | + } |
| 13 | + root.SwaggerPetstore.Cat = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Animal); |
| 14 | + } |
| 15 | +}(this, function(ApiClient, Animal) { |
| 16 | + 'use strict'; |
| 17 | + |
| 18 | + /** |
| 19 | + * The Cat model module. |
| 20 | + * @module model/Cat |
| 21 | + * @version 1.0.0 |
| 22 | + */ |
| 23 | + |
| 24 | + /** |
| 25 | + * Constructs a new <code>Cat</code>. |
| 26 | + * @alias module:model/Cat |
| 27 | + * @class |
| 28 | + * @extends module:model/Animal |
| 29 | + * @param className |
| 30 | + */ |
| 31 | + var exports = function(className) { |
| 32 | + Animal.call(this, className); |
| 33 | + |
| 34 | + }; |
| 35 | + |
| 36 | + /** |
| 37 | + * Constructs a <code>Cat</code> from a plain JavaScript object, optionally creating a new instance. |
| 38 | + * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. |
| 39 | + * @param {Object} data The plain JavaScript object bearing properties of interest. |
| 40 | + * @param {module:model/Cat} obj Optional instance to populate. |
| 41 | + * @return {module:model/Cat} The populated <code>Cat</code> instance. |
| 42 | + */ |
| 43 | + exports.constructFromObject = function(data, obj) { |
| 44 | + if (data) { |
| 45 | + obj = obj || new exports(); |
| 46 | + Animal.constructFromObject(data, obj); |
| 47 | + if (data.hasOwnProperty('declawed')) { |
| 48 | + obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean'); |
| 49 | + } |
| 50 | + } |
| 51 | + return obj; |
| 52 | + } |
| 53 | + |
| 54 | + exports.prototype = Object.create(Animal.prototype); |
| 55 | + exports.prototype.constructor = exports; |
| 56 | + |
| 57 | + |
| 58 | + /** |
| 59 | + * @member {Boolean} declawed |
| 60 | + */ |
| 61 | + exports.prototype['declawed'] = undefined; |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + return exports; |
| 67 | +})); |
0 commit comments