Source: models/Suggestion.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 SuggestedCategory from './SuggestedCategory'
import SuggestedContent from './SuggestedContent'
import SuggestedPhrase from './SuggestedPhrase'
import SuggestedProduct from './SuggestedProduct'
import SuggestedTerms from './SuggestedTerms'





/**
* The Suggestion model module.
* @module models/Suggestion
* @version 20.4
*/
export default class Suggestion {
    /**
    * Constructs a new <code>Suggestion</code>.
    * Document representing a suggestion.
    * @alias module:models/Suggestion
    * @class
    */

    constructor() {








    }

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





            if (data.hasOwnProperty('brands')) {
                obj.brands = ApiClient.convertToType(data.brands, ['String'])
            }
            if (data.hasOwnProperty('categories')) {
                obj.categories = ApiClient.convertToType(data.categories, [SuggestedCategory])
            }
            if (data.hasOwnProperty('content')) {
                obj.content = ApiClient.convertToType(data.content, [SuggestedContent])
            }
            if (data.hasOwnProperty('custom_suggestions')) {
                obj.custom_suggestions = ApiClient.convertToType(data.custom_suggestions, ['String'])
            }
            if (data.hasOwnProperty('products')) {
                obj.products = ApiClient.convertToType(data.products, [SuggestedProduct])
            }
            if (data.hasOwnProperty('suggested_phrases')) {
                obj.suggested_phrases = ApiClient.convertToType(data.suggested_phrases, [SuggestedPhrase])
            }
            if (data.hasOwnProperty('suggested_terms')) {
                obj.suggested_terms = ApiClient.convertToType(data.suggested_terms, [SuggestedTerms])
            }
        }
        return obj
    }

    /**
    * The sorted list of suggested brands. This list can be empty.
    * @member {Array.<String>} brands
    */
    brands = undefined;
    /**
    * The sorted list of suggested categories. This list can be empty.
    * @member {Array.<module:models/SuggestedCategory>} categories
    */
    categories = undefined;
    /**
    * The sorted list of suggested content. This list can be empty.
    * @member {Array.<module:models/SuggestedContent>} content
    */
    content = undefined;
    /**
    * The sorted list of suggested custom suggestions. This list can be empty.
    * @member {Array.<String>} custom_suggestions
    */
    custom_suggestions = undefined;
    /**
    * The sorted list of suggested products. This list can be empty.
    * @member {Array.<module:models/SuggestedProduct>} products
    */
    products = undefined;
    /**
    * A list of suggested phrases. This list can be empty.
    * @member {Array.<module:models/SuggestedPhrase>} suggested_phrases
    */
    suggested_phrases = undefined;
    /**
    * A list of suggested terms. This list can be empty.
    * @member {Array.<module:models/SuggestedTerms>} suggested_terms
    */
    suggested_terms = undefined;








}