/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* 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 Query from './Query'
/**
* The BoolQuery model module.
* @module models/BoolQuery
* @version 20.4
*/
export default class BoolQuery {
/**
* Constructs a new <code>BoolQuery</code>.
* A boolean query allows construction of full logical expression trees consisting of other queries (usually term and text queries). A boolean query basically has 3 sets of clauses that 'must', 'should' and / or 'must not' match. If 'must', 'must_not', or 'should' appear in the same boolean query, they are combined logically using the AND operator.
* @alias module:models/BoolQuery
* @class
*/
constructor() {
}
/**
* Constructs a <code>BoolQuery</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/BoolQuery} obj Optional instance to populate.
* @return {module:models/BoolQuery} The populated <code>BoolQuery</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new BoolQuery()
if (data.hasOwnProperty('must')) {
obj.must = ApiClient.convertToType(data.must, [Query])
}
if (data.hasOwnProperty('must_not')) {
obj.must_not = ApiClient.convertToType(data.must_not, [Query])
}
if (data.hasOwnProperty('should')) {
obj.should = ApiClient.convertToType(data.should, [Query])
}
}
return obj
}
/**
* List of queries that must match.
* @member {Array.<module:models/Query>} must
*/
must = undefined;
/**
* List of queries that must not match.
* @member {Array.<module:models/Query>} must_not
*/
must_not = undefined;
/**
* List of queries that should match.
* @member {Array.<module:models/Query>} should
*/
should = undefined;
}