/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* 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'
import Image from './Image'
/**
* The Category model module.
* @module models/Category
* @version v2
*/
export default class Category {
/**
* Constructs a new <code>Category</code>.
* @alias module:models/Category
* @class
*/
constructor() {
/**
*
* @member {String} code
*/
this.code = undefined
/**
*
* @member {String} url
*/
this.url = undefined
/**
* @member {module:models/Image} image
*/
this.image = undefined
}
/**
* Constructs a <code>Category</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/Category} obj Optional instance to populate.
* @return {module:models/Category} The populated
* <code>Category</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Category()
if (data.hasOwnProperty('code')) {
obj.code = ApiClient.convertToType(data.code, 'String')
}
if (data.hasOwnProperty('url')) {
obj.url = ApiClient.convertToType(data.url, 'String')
}
if (data.hasOwnProperty('image')) {
obj.image = Image.constructFromObject(data.image)
}
}
return obj
}
}