Source: models/CategoryResult.js

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
/* Copyright (c) 2020 Mobify Research & Development Inc. All rights reserved. */
/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */

/**
 * Shop API
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 20.4
 *
 *
 * 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 Category from './Category'





/**
* The CategoryResult model module.
* @module models/CategoryResult
* @version 20.4
*/
export default class CategoryResult {
    /**
    * Constructs a new <code>CategoryResult</code>.
    * Result document containing an array of categories.
    * @alias module:models/CategoryResult
    * @class
    */

    constructor() {








    }

    /**
    * Constructs a <code>CategoryResult</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/CategoryResult} obj Optional instance to populate.
    * @return {module:models/CategoryResult} The populated <code>CategoryResult</code> instance.
    */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new CategoryResult()





            if (data.hasOwnProperty('count')) {
                obj.count = ApiClient.convertToType(data.count, 'Number')
            }
            if (data.hasOwnProperty('data')) {
                obj.data = ApiClient.convertToType(data.data, [Category])
            }
            if (data.hasOwnProperty('total')) {
                obj.total = ApiClient.convertToType(data.total, 'Number')
            }
        }
        return obj
    }

    /**
    * The number of returned documents.
    * @member {Number} count
    */
    count = undefined;
    /**
    * The array of category documents.
    * @member {Array.<module:models/Category>} data
    */
    data = undefined;
    /**
    * The total number of documents.
    * @member {Number} total
    */
    total = undefined;








}