Refactored suspiciously simple ItemIdType and OfferCount.

This commit is contained in:
David Ball 2024-07-17 23:15:29 -04:00
parent f6fc83de2a
commit d3b3625f41
3 changed files with 39 additions and 78 deletions

View File

@ -48,6 +48,7 @@ import { GetBrowseNodesResource } from "./model/GetBrowseNodesResource";
import { GetBrowseNodesResponse } from "./model/GetBrowseNodesResponse"; import { GetBrowseNodesResponse } from "./model/GetBrowseNodesResponse";
import { GetItemsRequest } from "./model/GetItemsRequest"; import { GetItemsRequest } from "./model/GetItemsRequest";
import { GetItemsResource } from "./model/GetItemsResource"; import { GetItemsResource } from "./model/GetItemsResource";
import { ItemIdType } from "./model/ItemIdType";
import { Languages } from "./model/Languages"; import { Languages } from "./model/Languages";
import { LanguageType } from "./model/LanguageType"; import { LanguageType } from "./model/LanguageType";
import { MultiValuedAttribute } from "./model/MultiValuedAttribute"; import { MultiValuedAttribute } from "./model/MultiValuedAttribute";

View File

@ -21,46 +21,35 @@
* *
*/ */
(function(root, factory) { /**
if (typeof define === 'function' && define.amd) { * Enum class ItemIdType.
// AMD. Register as an anonymous module. * @enum {}
define(['ApiClient'], factory); * @readonly
} else if (typeof module === 'object' && module.exports) { */
// CommonJS-like environments that support module.exports, like Node. export const ItemIdTypeValues = {
module.exports = factory(require('../ApiClient'));
} else {
// Browser globals (root is window)
if (!root.ProductAdvertisingAPIv1) {
root.ProductAdvertisingAPIv1 = {};
}
root.ProductAdvertisingAPIv1.ItemIdType = factory(root.ProductAdvertisingAPIv1.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/** /**
* Enum class ItemIdType. * value: "ASIN"
* @enum {} * @const
* @readonly
*/ */
var exports = { "ASIN": "ASIN",
/** };
* value: "ASIN"
* @const
*/
"ASIN": "ASIN" };
/**
* Enum class ItemIdType.
* @enum {}
* @readonly
*/
export class ItemIdType {
/**
* value: "ASIN"
* @const
*/
public static get ASIN() { return ItemIdTypeValues.ASIN; }
/** /**
* Returns a <code>ItemIdType</code> enum value from a Javascript object name. * Returns a <code>ItemIdType</code> enum value from a Javascript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value. * @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {module:model/ItemIdType} The enum <code>ItemIdType</code> value. * @return {module:model/ItemIdType} The enum <code>ItemIdType</code> value.
*/ */
exports.constructFromObject = function(object) { public static constructFromObject(object: any) { return object;}
return object; };
}
return exports;
}));

View File

@ -21,42 +21,20 @@
* *
*/ */
(function(root, factory) { /**
if (typeof define === 'function' && define.amd) { * The OfferCount model module.
// AMD. Register as an anonymous module. * @module model/OfferCount
define(['ApiClient'], factory); * @version 1.0.0
} 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.ProductAdvertisingAPIv1) {
root.ProductAdvertisingAPIv1 = {};
}
root.ProductAdvertisingAPIv1.OfferCount = factory(root.ProductAdvertisingAPIv1.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
// I'm not really even sure why this is a whole code module.
/**
* Constructs a new <code>OfferCount</code>.
/** * @alias module:model/OfferCount
* The OfferCount model module. * @class
* @module model/OfferCount */
* @version 1.0.0 export class OfferCount {
*/
/**
* Constructs a new <code>OfferCount</code>.
* @alias module:model/OfferCount
* @class
*/
var exports = function() {
var _this = this;
};
/** /**
* Constructs a <code>OfferCount</code> from a plain JavaScript object, optionally creating a new instance. * Constructs a <code>OfferCount</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. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@ -64,14 +42,7 @@
* @param {module:model/OfferCount} obj Optional instance to populate. * @param {module:model/OfferCount} obj Optional instance to populate.
* @return {module:model/OfferCount} The populated <code>OfferCount</code> instance. * @return {module:model/OfferCount} The populated <code>OfferCount</code> instance.
*/ */
exports.constructFromObject = function(data, obj) { public static constructFromObject(data: any, _obj?: string) {
return data; return data;
} }
};
return exports;
}));