Refactored model/BrowseNode.

This commit is contained in:
David Ball 2024-07-17 21:10:19 -04:00
parent cfa998e30a
commit d1c1164e5f
2 changed files with 50 additions and 82 deletions

View File

@ -23,6 +23,7 @@
import { ApiClient } from "./ApiClient"; import { ApiClient } from "./ApiClient";
import { Availability } from "./model/Availability"; import { Availability } from "./model/Availability";
import { BrowseNode } from "./model/BrowseNode";
import { BrowseNodeAncestor } from "./model/BrowseNodeAncestor"; import { BrowseNodeAncestor } from "./model/BrowseNodeAncestor";
import { BrowseNodeChild } from "./model/BrowseNodeChild"; import { BrowseNodeChild } from "./model/BrowseNodeChild";
import { ByLineInfo } from "./model/ByLineInfo"; import { ByLineInfo } from "./model/ByLineInfo";
@ -81,7 +82,7 @@ export {
* The BrowseNode model constructor. * The BrowseNode model constructor.
* @property {module:model/BrowseNode} * @property {module:model/BrowseNode}
*/ */
BrowseNode: BrowseNode, BrowseNode,
/** /**
* The BrowseNodeAncestor model constructor. * The BrowseNodeAncestor model constructor.
* @property {module:model/BrowseNodeAncestor} * @property {module:model/BrowseNodeAncestor}

View File

@ -21,48 +21,50 @@
* *
*/ */
(function(root, factory) { /**
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/BrowseNodeAncestor', 'model/BrowseNodeChild'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./BrowseNodeAncestor'), require('./BrowseNodeChild'));
} else {
// Browser globals (root is window)
if (!root.ProductAdvertisingAPIv1) {
root.ProductAdvertisingAPIv1 = {};
}
root.ProductAdvertisingAPIv1.BrowseNode = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.BrowseNodeAncestor, root.ProductAdvertisingAPIv1.BrowseNodeChild);
}
}(this, function(ApiClient, BrowseNodeAncestor, BrowseNodeChild) {
'use strict';
/**
* The BrowseNode model module. * The BrowseNode model module.
* @module model/BrowseNode * @module model/BrowseNode
* @version 1.0.0 * @version 1.0.0
*/ */
/** import { ApiClient } from "../ApiClient";
import { BrowseNodeAncestor } from "./BrowseNodeAncestor";
import { BrowseNodeChild } from "./BrowseNodeChild";
/**
* Constructs a new <code>BrowseNode</code>. * Constructs a new <code>BrowseNode</code>.
* @alias module:model/BrowseNode * @alias module:model/BrowseNode
* @class * @class
*/ */
var exports = function() { export class BrowseNode {
var _this = this; /**
* @member {module:model/BrowseNodeAncestor} Ancestor
*/
public Ancestor?: BrowseNodeAncestor = undefined;
/**
* @member {Array.<module:model/BrowseNodeChild>} Children
*/
public Children?: BrowseNodeChild[];
/**
}; * @member {String} ContextFreeName
*/
public ContextFreeName?: string;
/**
* @member {String} DisplayName
*/
public DisplayName?: string;
/**
* @member {String} Id
*/
public Id?: string;
/**
* @member {Boolean} IsRoot
*/
public IsRoot?: boolean;
/**
* @member {Number} SalesRank
*/
public SalesRank?: number;
/** /**
* Constructs a <code>BrowseNode</code> from a plain JavaScript object, optionally creating a new instance. * Constructs a <code>BrowseNode</code> from a plain JavaScript object, optionally creating a new instance.
@ -71,67 +73,32 @@
* @param {module:model/BrowseNode} obj Optional instance to populate. * @param {module:model/BrowseNode} obj Optional instance to populate.
* @return {module:model/BrowseNode} The populated <code>BrowseNode</code> instance. * @return {module:model/BrowseNode} The populated <code>BrowseNode</code> instance.
*/ */
exports.constructFromObject = function(data, obj) { public static constructFromObject(data: any, obj?: BrowseNode) {
if (data) { if (data) {
obj = obj || new exports(); obj = obj || new BrowseNode();
if (data.hasOwnProperty('Ancestor')) { if (data.hasOwnProperty('Ancestor')) {
obj['Ancestor'] = BrowseNodeAncestor.constructFromObject(data['Ancestor']); obj.Ancestor = BrowseNodeAncestor.constructFromObject(data['Ancestor']);
} }
if (data.hasOwnProperty('Children')) { if (data.hasOwnProperty('Children')) {
obj['Children'] = ApiClient.convertToType(data['Children'], [BrowseNodeChild]); obj.Children = ApiClient.convertToType(data['Children'], [BrowseNodeChild]);
} }
if (data.hasOwnProperty('ContextFreeName')) { if (data.hasOwnProperty('ContextFreeName')) {
obj['ContextFreeName'] = ApiClient.convertToType(data['ContextFreeName'], 'String'); obj.ContextFreeName = ApiClient.convertToType(data['ContextFreeName'], 'String');
} }
if (data.hasOwnProperty('DisplayName')) { if (data.hasOwnProperty('DisplayName')) {
obj['DisplayName'] = ApiClient.convertToType(data['DisplayName'], 'String'); obj.DisplayName = ApiClient.convertToType(data['DisplayName'], 'String');
} }
if (data.hasOwnProperty('Id')) { if (data.hasOwnProperty('Id')) {
obj['Id'] = ApiClient.convertToType(data['Id'], 'String'); obj.Id = ApiClient.convertToType(data['Id'], 'String');
} }
if (data.hasOwnProperty('IsRoot')) { if (data.hasOwnProperty('IsRoot')) {
obj['IsRoot'] = ApiClient.convertToType(data['IsRoot'], 'Boolean'); obj.IsRoot = ApiClient.convertToType(data['IsRoot'], 'Boolean');
} }
if (data.hasOwnProperty('SalesRank')) { if (data.hasOwnProperty('SalesRank')) {
obj['SalesRank'] = ApiClient.convertToType(data['SalesRank'], 'Number'); obj.SalesRank = ApiClient.convertToType(data['SalesRank'], 'Number');
} }
} }
return obj; return obj;
} }
};
/**
* @member {module:model/BrowseNodeAncestor} Ancestor
*/
exports.prototype['Ancestor'] = undefined;
/**
* @member {Array.<module:model/BrowseNodeChild>} Children
*/
exports.prototype['Children'] = undefined;
/**
* @member {String} ContextFreeName
*/
exports.prototype['ContextFreeName'] = undefined;
/**
* @member {String} DisplayName
*/
exports.prototype['DisplayName'] = undefined;
/**
* @member {String} Id
*/
exports.prototype['Id'] = undefined;
/**
* @member {Boolean} IsRoot
*/
exports.prototype['IsRoot'] = undefined;
/**
* @member {Number} SalesRank
*/
exports.prototype['SalesRank'] = undefined;
return exports;
}));