forked from loafle/openapi-generator-original
* mark js es5 deprecated, remove samples, migrate samples to use oas3 * update test in pom.xml * update js samples * delete js es5 samples * update js petstore * remove openapi3 js petstore * fix tests * skip test/model/AdditionalPropertiesArray.spec.js * fix test * update doc
164 lines
5.2 KiB
JavaScript
164 lines
5.2 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
|
|
* Do not edit the class manually.
|
|
*
|
|
*/
|
|
|
|
import ApiClient from '../ApiClient';
|
|
|
|
/**
|
|
* The NullableClass model module.
|
|
* @module model/NullableClass
|
|
* @version 1.0.0
|
|
*/
|
|
class NullableClass {
|
|
/**
|
|
* Constructs a new <code>NullableClass</code>.
|
|
* @alias module:model/NullableClass
|
|
* @extends Object
|
|
*/
|
|
constructor() {
|
|
|
|
NullableClass.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.
|
|
*/
|
|
static initialize(obj) {
|
|
}
|
|
|
|
/**
|
|
* Constructs a <code>NullableClass</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/NullableClass} obj Optional instance to populate.
|
|
* @return {module:model/NullableClass} The populated <code>NullableClass</code> instance.
|
|
*/
|
|
static constructFromObject(data, obj) {
|
|
if (data) {
|
|
obj = obj || new NullableClass();
|
|
|
|
ApiClient.constructFromObject(data, obj, 'Object');
|
|
|
|
|
|
if (data.hasOwnProperty('integer_prop')) {
|
|
obj['integer_prop'] = ApiClient.convertToType(data['integer_prop'], 'Number');
|
|
}
|
|
if (data.hasOwnProperty('number_prop')) {
|
|
obj['number_prop'] = ApiClient.convertToType(data['number_prop'], 'Number');
|
|
}
|
|
if (data.hasOwnProperty('boolean_prop')) {
|
|
obj['boolean_prop'] = ApiClient.convertToType(data['boolean_prop'], 'Boolean');
|
|
}
|
|
if (data.hasOwnProperty('string_prop')) {
|
|
obj['string_prop'] = ApiClient.convertToType(data['string_prop'], 'String');
|
|
}
|
|
if (data.hasOwnProperty('date_prop')) {
|
|
obj['date_prop'] = ApiClient.convertToType(data['date_prop'], 'Date');
|
|
}
|
|
if (data.hasOwnProperty('datetime_prop')) {
|
|
obj['datetime_prop'] = ApiClient.convertToType(data['datetime_prop'], 'Date');
|
|
}
|
|
if (data.hasOwnProperty('array_nullable_prop')) {
|
|
obj['array_nullable_prop'] = ApiClient.convertToType(data['array_nullable_prop'], [Object]);
|
|
}
|
|
if (data.hasOwnProperty('array_and_items_nullable_prop')) {
|
|
obj['array_and_items_nullable_prop'] = ApiClient.convertToType(data['array_and_items_nullable_prop'], [Object]);
|
|
}
|
|
if (data.hasOwnProperty('array_items_nullable')) {
|
|
obj['array_items_nullable'] = ApiClient.convertToType(data['array_items_nullable'], [Object]);
|
|
}
|
|
if (data.hasOwnProperty('object_nullable_prop')) {
|
|
obj['object_nullable_prop'] = ApiClient.convertToType(data['object_nullable_prop'], {'String': Object});
|
|
}
|
|
if (data.hasOwnProperty('object_and_items_nullable_prop')) {
|
|
obj['object_and_items_nullable_prop'] = ApiClient.convertToType(data['object_and_items_nullable_prop'], {'String': Object});
|
|
}
|
|
if (data.hasOwnProperty('object_items_nullable')) {
|
|
obj['object_items_nullable'] = ApiClient.convertToType(data['object_items_nullable'], {'String': Object});
|
|
}
|
|
}
|
|
return obj;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
* @member {Number} integer_prop
|
|
*/
|
|
NullableClass.prototype['integer_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {Number} number_prop
|
|
*/
|
|
NullableClass.prototype['number_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {Boolean} boolean_prop
|
|
*/
|
|
NullableClass.prototype['boolean_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {String} string_prop
|
|
*/
|
|
NullableClass.prototype['string_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {Date} date_prop
|
|
*/
|
|
NullableClass.prototype['date_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {Date} datetime_prop
|
|
*/
|
|
NullableClass.prototype['datetime_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {Array.<Object>} array_nullable_prop
|
|
*/
|
|
NullableClass.prototype['array_nullable_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {Array.<Object>} array_and_items_nullable_prop
|
|
*/
|
|
NullableClass.prototype['array_and_items_nullable_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {Array.<Object>} array_items_nullable
|
|
*/
|
|
NullableClass.prototype['array_items_nullable'] = undefined;
|
|
|
|
/**
|
|
* @member {Object.<String, Object>} object_nullable_prop
|
|
*/
|
|
NullableClass.prototype['object_nullable_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {Object.<String, Object>} object_and_items_nullable_prop
|
|
*/
|
|
NullableClass.prototype['object_and_items_nullable_prop'] = undefined;
|
|
|
|
/**
|
|
* @member {Object.<String, Object>} object_items_nullable
|
|
*/
|
|
NullableClass.prototype['object_items_nullable'] = undefined;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default NullableClass;
|
|
|