/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* 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 VariantCategory from './VariantCategory'
/**
* The VariantValueCategory model module.
* @module models/VariantValueCategory
* @version v2
*/
export default class VariantValueCategory {
/**
* Constructs a new <code>VariantValueCategory</code>.
* @alias module:models/VariantValueCategory
* @class
*/
constructor() {
/**
*
* @member {String} name
*/
this.name = undefined
/**
*
* @member {Number} sequence
*/
this.sequence = undefined
/**
*
* @member {Array.<module:models/VariantCategory>} superCategories
*/
this.superCategories = undefined
}
/**
* Constructs a <code>VariantValueCategory</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/VariantValueCategory} obj Optional instance to
* populate.
* @return {module:models/VariantValueCategory} The populated
* <code>VariantValueCategory</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new VariantValueCategory()
if (data.hasOwnProperty('name')) {
obj.name = ApiClient.convertToType(data.name, 'String')
}
if (data.hasOwnProperty('sequence')) {
obj.sequence = ApiClient.convertToType(data.sequence, 'Number')
}
if (data.hasOwnProperty('superCategories')) {
obj.superCategories = ApiClient.convertToType(data.superCategories, [VariantCategory])
}
}
return obj
}
}