Files
openapi-generator/samples/client/petstore/javascript/src/model/MapTest.js
William Cheng 3ebefccfa9 Prepare v4.1.2 release (#3873)
* update samples

* update date
2019-09-11 18:33:27 +08:00

117 lines
3.3 KiB
JavaScript

/**
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* 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
*
* OpenAPI Generator version: 4.1.2
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.OpenApiPetstore) {
root.OpenApiPetstore = {};
}
root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The MapTest model module.
* @module model/MapTest
* @version 1.0.0
*/
/**
* Constructs a new <code>MapTest</code>.
* @alias module:model/MapTest
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>MapTest</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/MapTest} obj Optional instance to populate.
* @return {module:model/MapTest} The populated <code>MapTest</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('map_map_of_string')) {
obj['map_map_of_string'] = ApiClient.convertToType(data['map_map_of_string'], {'String': {'String': 'String'}});
}
if (data.hasOwnProperty('map_of_enum_string')) {
obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
}
if (data.hasOwnProperty('direct_map')) {
obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
}
if (data.hasOwnProperty('indirect_map')) {
obj['indirect_map'] = ApiClient.convertToType(data['indirect_map'], {'String': 'Boolean'});
}
}
return obj;
}
/**
* @member {Object.<String, Object.<String, String>>} map_map_of_string
*/
exports.prototype['map_map_of_string'] = undefined;
/**
* @member {Object.<String, module:model/MapTest.InnerEnum>} map_of_enum_string
*/
exports.prototype['map_of_enum_string'] = undefined;
/**
* @member {Object.<String, Boolean>} direct_map
*/
exports.prototype['direct_map'] = undefined;
/**
* @member {Object.<String, Boolean>} indirect_map
*/
exports.prototype['indirect_map'] = undefined;
/**
* Allowed values for the <code>inner</code> property.
* @enum {String}
* @readonly
*/
exports.InnerEnum = {
/**
* value: "UPPER"
* @const
*/
"UPPER": "UPPER",
/**
* value: "lower"
* @const
*/
"lower": "lower" };
return exports;
}));