Refactored model/ImageSize.
This commit is contained in:
parent
2e767d688c
commit
fa047d9a40
|
|
@ -48,6 +48,7 @@ import { GetBrowseNodesResource } from "./model/GetBrowseNodesResource";
|
|||
import { GetBrowseNodesResponse } from "./model/GetBrowseNodesResponse";
|
||||
import { GetItemsRequest } from "./model/GetItemsRequest";
|
||||
import { GetItemsResource } from "./model/GetItemsResource";
|
||||
import { ImageSize } from "./model/ImageSize";
|
||||
import { ItemIdType } from "./model/ItemIdType";
|
||||
import { Languages } from "./model/Languages";
|
||||
import { LanguageType } from "./model/LanguageType";
|
||||
|
|
@ -94,7 +95,7 @@ import { WebsiteSalesRank } from "./model/WebsiteSalesRank";
|
|||
* </pre>
|
||||
* </p>
|
||||
* @module index
|
||||
* @version 2.0.0
|
||||
* @version 2.1.0
|
||||
*/
|
||||
export {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -21,45 +21,32 @@
|
|||
*
|
||||
*/
|
||||
|
||||
(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.ProductAdvertisingAPIv1) {
|
||||
root.ProductAdvertisingAPIv1 = {};
|
||||
}
|
||||
root.ProductAdvertisingAPIv1.ImageSize = factory(root.ProductAdvertisingAPIv1.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The ImageSize model module.
|
||||
* @module model/ImageSize
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
import { ApiClient } from "../ApiClient";
|
||||
|
||||
/**
|
||||
* Constructs a new <code>ImageSize</code>.
|
||||
* @alias module:model/ImageSize
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
export class ImageSize {
|
||||
/**
|
||||
* @member {String} URL
|
||||
*/
|
||||
public URL?: string;
|
||||
/**
|
||||
* @member {Number} Height
|
||||
*/
|
||||
public Height?: number;
|
||||
/**
|
||||
* @member {Number} Width
|
||||
*/
|
||||
public Width?: number;
|
||||
/**
|
||||
* 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.
|
||||
|
|
@ -67,39 +54,20 @@
|
|||
* @param {module:model/ImageSize} obj Optional instance to populate.
|
||||
* @return {module:model/ImageSize} The populated <code>ImageSize</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
public static constructFromObject(data: any, obj?: ImageSize) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
obj = obj || new ImageSize();
|
||||
|
||||
if (data.hasOwnProperty('URL')) {
|
||||
obj['URL'] = ApiClient.convertToType(data['URL'], 'String');
|
||||
obj.URL = ApiClient.convertToType(data['URL'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('Height')) {
|
||||
obj['Height'] = ApiClient.convertToType(data['Height'], 'Number');
|
||||
obj.Height = ApiClient.convertToType(data['Height'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('Width')) {
|
||||
obj['Width'] = ApiClient.convertToType(data['Width'], 'Number');
|
||||
obj.Width = ApiClient.convertToType(data['Width'], 'Number');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} URL
|
||||
*/
|
||||
exports.prototype['URL'] = undefined;
|
||||
/**
|
||||
* @member {Number} Height
|
||||
*/
|
||||
exports.prototype['Height'] = undefined;
|
||||
/**
|
||||
* @member {Number} Width
|
||||
*/
|
||||
exports.prototype['Width'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user