/**
* OpenAPI definition
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import {ApiClient} from '../ApiClient.js';
import { ImageInfo } from './ImageInfo.js';
/**
* The ThumbnailsRelated model module.
* @module model/ThumbnailsRelated
* @version v0
*/
export class ThumbnailsRelated {
/**
* Constructs a new <code>ThumbnailsRelated</code>.
* @alias ThumbnailsRelated
*/
constructor() {
/** images
* @type {Array.<ImageInfo>}
*/
this.images = undefined;
ThumbnailsRelated.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>ThumbnailsRelated</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.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {ThumbnailsRelated} obj Optional instance to populate.
* @return {ThumbnailsRelated} The populated <code>ThumbnailsRelated</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ThumbnailsRelated();
if (data.hasOwnProperty('images')) {
obj['images'] = ApiClient.convertToType(data['images'], [ImageInfo]);
}
}
return obj;
}
/**
* Validates the JSON data with respect to <code>ThumbnailsRelated</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ThumbnailsRelated</code>.
*/
static validateJSON(data) {
if (data['images']) { // data not null
// ensure the json data is an array
if (!Array.isArray(data['images'])) {
throw new Error("Expected the field `images` to be an array in the JSON data but got " + data['images']);
}
// validate the optional field `images` (array)
for (const item of data['images']) {
ImageInfo.validateJSON(item);
};
}
return true;
}
}
export default ThumbnailsRelated;