/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Copyright (c) 2017 Mobify Research & Development Inc. All rights reserved. */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* OCC No description provided (generated by Swagger Codegen
* https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git Do not edit the class
* manually.
*
*/
import ApiClient from '../ApiClient'
/**
* The Image model module.
* @module models/Image
* @version v2
*/
export default class Image {
/**
* Constructs a new <code>Image</code>.
* @alias module:models/Image
* @class
*/
constructor() {
/**
*
* @member {String} imageType
*/
this.imageType = undefined
/**
*
* @member {String} format
*/
this.format = undefined
/**
*
* @member {String} url
*/
this.url = undefined
/**
*
* @member {String} altText
*/
this.altText = undefined
/**
*
* @member {Number} galleryIndex
*/
this.galleryIndex = undefined
}
/**
* Constructs a <code>Image</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 {module:models/Image} obj Optional instance to populate.
* @return {module:models/Image} The populated <code>Image</code>
* instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Image()
if (data.hasOwnProperty('imageType')) {
obj.imageType = ApiClient.convertToType(data.imageType, 'String')
}
if (data.hasOwnProperty('format')) {
obj.format = ApiClient.convertToType(data.format, 'String')
}
if (data.hasOwnProperty('url')) {
obj.url = ApiClient.convertToType(data.url, 'String')
}
if (data.hasOwnProperty('altText')) {
obj.altText = ApiClient.convertToType(data.altText, 'String')
}
if (data.hasOwnProperty('galleryIndex')) {
obj.galleryIndex = ApiClient.convertToType(data.galleryIndex, 'Number')
}
}
return obj
}
}