/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* 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 Suggestion from './Suggestion'
/**
* The SuggestionResult model module.
* @module models/SuggestionResult
* @version 20.4
*/
export default class SuggestionResult {
/**
* Constructs a new <code>SuggestionResult</code>.
* Document representing a search suggestion result.
* @alias module:models/SuggestionResult
* @class
*/
constructor() {
}
/**
* Constructs a <code>SuggestionResult</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/SuggestionResult} obj Optional instance to populate.
* @return {module:models/SuggestionResult} The populated <code>SuggestionResult</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new SuggestionResult()
if (data.hasOwnProperty('brand_suggestions')) {
obj.brand_suggestions = Suggestion.constructFromObject(data.brand_suggestions)
}
if (data.hasOwnProperty('category_suggestions')) {
obj.category_suggestions = Suggestion.constructFromObject(data.category_suggestions)
}
if (data.hasOwnProperty('content_suggestions')) {
obj.content_suggestions = Suggestion.constructFromObject(data.content_suggestions)
}
if (data.hasOwnProperty('custom_suggestions')) {
obj.custom_suggestions = Suggestion.constructFromObject(data.custom_suggestions)
}
if (data.hasOwnProperty('product_suggestions')) {
obj.product_suggestions = Suggestion.constructFromObject(data.product_suggestions)
}
if (data.hasOwnProperty('query')) {
obj.query = ApiClient.convertToType(data.query, 'String')
}
}
return obj
}
/**
* Returns the suggested brands.
* @member {module:models/Suggestion} brand_suggestions
*/
brand_suggestions = undefined;
/**
* Returns the suggested categories.
* @member {module:models/Suggestion} category_suggestions
*/
category_suggestions = undefined;
/**
* Returns the suggested content.
* @member {module:models/Suggestion} content_suggestions
*/
content_suggestions = undefined;
/**
* Returns the suggested custom suggestions.
* @member {module:models/Suggestion} custom_suggestions
*/
custom_suggestions = undefined;
/**
* Returns the suggested products.
* @member {module:models/Suggestion} product_suggestions
*/
product_suggestions = undefined;
/**
* The query phrase to search for.
* @member {String} query
*/
query = undefined;
}