Refactored model/Images.
This commit is contained in:
parent
3ccc837ba8
commit
dedccb86cc
|
|
@ -50,6 +50,7 @@ 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 { 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";
|
||||||
|
|
|
||||||
|
|
@ -21,43 +21,29 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function(root, factory) {
|
/**
|
||||||
if (typeof define === 'function' && define.amd) {
|
* The Images model module.
|
||||||
// AMD. Register as an anonymous module.
|
* @module model/Images
|
||||||
define(['ApiClient', 'model/ImageType'], 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'), 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';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import { ApiClient } from "../ApiClient";
|
||||||
|
import { ImageType } from "./ImageType";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a new <code>Images</code>.
|
||||||
|
* @alias module:model/Images
|
||||||
|
* @class
|
||||||
|
*/
|
||||||
|
export class Images {
|
||||||
/**
|
/**
|
||||||
* The Images model module.
|
* @member {module:model/ImageType} Primary
|
||||||
* @module model/Images
|
|
||||||
* @version 1.0.0
|
|
||||||
*/
|
*/
|
||||||
|
public Primary?: ImageType;
|
||||||
/**
|
/**
|
||||||
* Constructs a new <code>Images</code>.
|
* @member {Array.<module:model/ImageType>} Variants
|
||||||
* @alias module:model/Images
|
|
||||||
* @class
|
|
||||||
*/
|
*/
|
||||||
var exports = function() {
|
public Variants?: ImageType;
|
||||||
var _this = this;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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;
|
|
||||||
}));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user