Compare commits

...

2 Commits

Author SHA1 Message Date
dedccb86cc Refactored model/Images. 2024-07-17 23:30:02 -04:00
3ccc837ba8 Refactored model/ImageType. 2024-07-17 23:27:35 -04:00
4 changed files with 53 additions and 110 deletions

View File

@ -49,6 +49,8 @@ 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 { ImageSize } from "./model/ImageSize"; import { ImageSize } from "./model/ImageSize";
import { ImageType } from "./model/ImageType";
import { Images } from "./model/Images";
import { ItemIdType } from "./model/ItemIdType"; 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";

View File

@ -47,6 +47,7 @@ export class ImageSize {
* @member {Number} Width * @member {Number} Width
*/ */
public Width?: number; public Width?: number;
/** /**
* Constructs a <code>ImageSize</code> from a plain JavaScript object, optionally creating a new instance. * Constructs a <code>ImageSize</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.

View File

@ -15,50 +15,38 @@
* permissions and limitations under the License. * permissions and limitations under the License.
*/ */
/** /**
* ProductAdvertisingAPI * ProductAdvertisingAPI
* https://webservices.amazon.com/paapi5/documentation/index.html * https://webservices.amazon.com/paapi5/documentation/index.html
* *
*/ */
(function(root, factory) { /**
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/ImageSize'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./ImageSize'));
} else {
// Browser globals (root is window)
if (!root.ProductAdvertisingAPIv1) {
root.ProductAdvertisingAPIv1 = {};
}
root.ProductAdvertisingAPIv1.ImageType = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.ImageSize);
}
}(this, function(ApiClient, ImageSize) {
'use strict';
/**
* The ImageType model module. * The ImageType model module.
* @module model/ImageType * @module model/ImageType
* @version 1.0.0 * @version 1.0.0
*/ */
/** import { ImageSize } from "./ImageSize";
/**
* Constructs a new <code>ImageType</code>. * Constructs a new <code>ImageType</code>.
* @alias module:model/ImageType * @alias module:model/ImageType
* @class * @class
*/ */
var exports = function() { export class ImageType {
var _this = this; /**
* @member {module:model/ImageSize} Small
*/
public Small?: ImageSize;
/**
}; * @member {module:model/ImageSize} Medium
*/
public Medium?: ImageSize
/**
* @member {module:model/ImageSize} Large
*/
public Large?: ImageSize;
/** /**
* Constructs a <code>ImageType</code> from a plain JavaScript object, optionally creating a new instance. * Constructs a <code>ImageType</code> from a plain JavaScript object, optionally creating a new instance.
@ -67,39 +55,20 @@
* @param {module:model/ImageType} obj Optional instance to populate. * @param {module:model/ImageType} obj Optional instance to populate.
* @return {module:model/ImageType} The populated <code>ImageType</code> instance. * @return {module:model/ImageType} The populated <code>ImageType</code> instance.
*/ */
exports.constructFromObject = function(data, obj) { public static constructFromObject(data: any, obj?: ImageType) {
if (data) { if (data) {
obj = obj || new exports(); obj = obj || new ImageType();
if (data.hasOwnProperty('Small')) { if (data.hasOwnProperty('Small')) {
obj['Small'] = ImageSize.constructFromObject(data['Small']); obj.Small = ImageSize.constructFromObject(data['Small']);
} }
if (data.hasOwnProperty('Medium')) { if (data.hasOwnProperty('Medium')) {
obj['Medium'] = ImageSize.constructFromObject(data['Medium']); obj.Medium = ImageSize.constructFromObject(data['Medium']);
} }
if (data.hasOwnProperty('Large')) { if (data.hasOwnProperty('Large')) {
obj['Large'] = ImageSize.constructFromObject(data['Large']); obj.Large = ImageSize.constructFromObject(data['Large']);
} }
} }
return obj; return obj;
} }
};
/**
* @member {module:model/ImageSize} Small
*/
exports.prototype['Small'] = undefined;
/**
* @member {module:model/ImageSize} Medium
*/
exports.prototype['Medium'] = undefined;
/**
* @member {module:model/ImageSize} Large
*/
exports.prototype['Large'] = undefined;
return exports;
}));

View File

@ -21,43 +21,29 @@
* *
*/ */
(function(root, factory) { /**
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/ImageType'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./ImageType'));
} else {
// Browser globals (root is window)
if (!root.ProductAdvertisingAPIv1) {
root.ProductAdvertisingAPIv1 = {};
}
root.ProductAdvertisingAPIv1.Images = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.ImageType);
}
}(this, function(ApiClient, ImageType) {
'use strict';
/**
* The Images model module. * The Images model module.
* @module model/Images * @module model/Images
* @version 1.0.0 * @version 1.0.0
*/ */
/** import { ApiClient } from "../ApiClient";
import { ImageType } from "./ImageType";
/**
* Constructs a new <code>Images</code>. * Constructs a new <code>Images</code>.
* @alias module:model/Images * @alias module:model/Images
* @class * @class
*/ */
var exports = function() { export class Images {
var _this = this; /**
* @member {module:model/ImageType} Primary
*/
public Primary?: ImageType;
}; /**
* @member {Array.<module:model/ImageType>} Variants
*/
public Variants?: ImageType;
/** /**
* Constructs a <code>Images</code> from a plain JavaScript object, optionally creating a new instance. * Constructs a <code>Images</code> from a plain JavaScript object, optionally creating a new instance.
@ -66,32 +52,17 @@
* @param {module:model/Images} obj Optional instance to populate. * @param {module:model/Images} obj Optional instance to populate.
* @return {module:model/Images} The populated <code>Images</code> instance. * @return {module:model/Images} The populated <code>Images</code> instance.
*/ */
exports.constructFromObject = function(data, obj) { public static constructFromObject(data: any, obj?: Images) {
if (data) { if (data) {
obj = obj || new exports(); obj = obj || new Images();
if (data.hasOwnProperty('Primary')) { if (data.hasOwnProperty('Primary')) {
obj['Primary'] = ImageType.constructFromObject(data['Primary']); obj.Primary = ImageType.constructFromObject(data['Primary']);
} }
if (data.hasOwnProperty('Variants')) { if (data.hasOwnProperty('Variants')) {
obj['Variants'] = ApiClient.convertToType(data['Variants'], [ImageType]); obj.Variants = ApiClient.convertToType(data['Variants'], [ImageType]);
} }
} }
return obj; return obj;
} }
};
/**
* @member {module:model/ImageType} Primary
*/
exports.prototype['Primary'] = undefined;
/**
* @member {Array.<module:model/ImageType>} Variants
*/
exports.prototype['Variants'] = undefined;
return exports;
}));